

OPM – Open PostgreSQL Monitoring - rayshan
http://opm.io/

======
mw44118
There's no install instructions in the .zip file, but there is a github wiki.
But that has obsolete instructions. But there's an open issue, and the
comments for that issue include fixes to that.

I stopped messing with it once I saw how they wanted me to install something
into root's crontab.

My hypothesis: postgresql has none of these jazzy monitoring tools because it
never crashes.

Sure, as traffic grows, slow queries need to be optimized, crappy N+1 ORMs
need to be replaced, and boxes need more RAM and faster disks, but when was
the last time you heard of anyone complain about postgresql or blame it for
any downtime?

~~~
majorsc2noob
I want to be able to scale out by adding more machines. I want to be able to
failover automatically to another data center when the first one goes down. I
have yet to see a straight forward way to accomplish this with PG. Their wiki
lists a bunch of tools related to this but they are either abandoned or does
not cover this as far as I can tell. I can't understand all the positive I
read about PG..

~~~
fdr
I'd say the way failover/HA is done at Heroku is straightforward. Will (the
designer) or I plan to write about it some day, pending laziness.

It took some time to figure out because it required breaking some orthodoxy,
but I'm happy with the result.

The thresholds are documented at
[https://devcenter.heroku.com/articles/heroku-postgres-
ha#fai...](https://devcenter.heroku.com/articles/heroku-postgres-ha#failover-
conditions).

The promotion is done by rebinding the URL of the database and restarting the
app. This shares mechanism neatly with changing of passwords, which is one
reason we decided it was worth throwing out network-transparent orthodoxy when
it came to HA: the clients must be controlled anyway to deal with security
considerations.

~~~
majorsc2noob
> I'd say the way failover/HA is done at Heroku is straightforward.

> It took some time to figure out because it required breaking some orthodoxy

If it's hard to figure out, it does not sounds too straight forward.

~~~
fdr
Only because the idea of manipulating clients of the database to do HA is
somewhat heretical.

------
STRiDEX
I'm not sure how these two projects are different, but they seem to be worked
on by the same people/person.

[http://dalibo.github.io/powa/](http://dalibo.github.io/powa/)

~~~
moondowner
Just noticed that as well.

I wonder why two different projects for the same thing? Are there any
differences between OPM and PoWA? Is OPM built on top of PoWA?

~~~
daamien
Hi !

I'm involved in both projects. Here' s some insight :

OPM and POWA are not related. They were born at different times and developed
by two different R&D teams at DALIBO, a French PostgreSQL company. The fact
that they've been released publicly almost at the same time is merely a
coincidence

OPM is designed to help a DBA to manage a very large number of servers. It
provides answers to the questions : "Is there a problem somewhere on my
PostgreSQL servers ? Which instances need to improvements ?"

POWA is more focused showing the "real-time" activity of one specific
instance. It provides answers to questions like : "Which queries are slowing
down my server right now ?"

If you're familiar with Oracle products, the difference between OPM and POWA
is more-or-less the difference between Oracle AWR and Oracle Grid Control.

In a nutshell, if you only have one or two PostgreSQL servers in production,
then POWA is easier to install and probably enough for you. If you want more
stats and an overview of your servers, then OPM is a better choice.

Both projects are autonomous and moving fast. We're just pushing code on
github without direct economic goals or marketing plans :-) In the long run
we'll see which one finds its user base and how they evolve.

That being said, we also have other guys working on other similar PostgreSQL
tools, in particular :

pgBadger (
[http://dalibo.github.io/pgbadger/](http://dalibo.github.io/pgbadger/) ) is a
log analyzer which provides rich reports of the database activity. Basically
it answers to the question "Which queries should be optimized ?"

pgCluu ( [http://pgcluu.darold.net/](http://pgcluu.darold.net/) ) is a
audit/reporting tools, more focused on system and resource utilization. It
answers to questions such as "What's the load on my CPUs ? Is my memory
swapping ?"

pg_activity (
[https://github.com/julmon/pg_activity/](https://github.com/julmon/pg_activity/)
): is like linux "top" command but for PostgreSQL queries.

pg_stat_kcache (
[https://github.com/dalibo/pg_stat_kcache](https://github.com/dalibo/pg_stat_kcache)
) will gather statistics about reads done by the filesystem layer

So basically regarding PostgreSQL monitoring, we're just moving in every
possible directions at the same time... Some say it's a "waste of time", we
prefer the term "Darwinian Approach" :P

~~~
moondowner
Thanks for the clarification!

------
sarnowski
Since we (Zalando) are heavy PostgreSQL users, we also had the need for
monitoring and part of the result we came up with is
[http://zalando.github.io/PGObserver/](http://zalando.github.io/PGObserver/)
and [https://github.com/zalando/pg_view](https://github.com/zalando/pg_view)

------
davidw
Minor grammar nitpick: "Open PostgreSQL Monitoring is a free software" is
incorrect English, as software is an uncountable: we don't say "a software",
but a program, a system, or something like that. You could also say "is free
software".

~~~
daamien
fixed.

------
Cieplak
htop like application for PostgreSQL server activity monitoring:

[https://github.com/julmon/pg_activity/](https://github.com/julmon/pg_activity/)

------
rpedela
I am unsure what some of the graphs measure and labels mean when viewing the
demo. Tooltips, descriptions, etc would be helpful in my opinion. Overall it
seems like a great start though.

~~~
rjuju
For all PGSQL graphs, the signification of each graph and label is (only :/)
documented in the check_pgactivity "\--help" option, as it's the direct source
of these graphs. Sadly, we didn't have time yet to write a proper
documentation on the wiki page, or on the UI. We'll add a better documentation
as soon as possible.

For the SYSTM graphs, they correspond to standard nagios system checks.

------
therealmarv
Is there anything similar for Newrelic out there? Nice project btw.

------
tvon
The "fork" link goes nowhere, FYI.

~~~
rjuju
This has been fixed. Thanks for the report !

