Search code examples
databasepostgresqlmonitoringprobe

Postgres monitoring with Intermapper


Does someone know of an Intermapper probe to test if a SQL database is alive and kick'n?

Plan B: Does someone know the basic steps with are necessary to program such a probe?


Solution

  • According to Wikipedia InterMapper supports SNMP. pgsnmpd is a SNMP agent for PostgreSQL readily available. You can connect both right out of the box(es).

    Otherwise: InterMapper said to be written in Java. It also stores its own data in PostgreSQL. This CALLS for either a generic JDBC-probe or at least one for PostgreSQL right from the start. So the best solution is to call them and persuade them to provide such a probe by default - if they don't do that already somewhere.

    Regarding Plan B: The support page has a document describing the process for creating custom probes. A quick glance over it leaves three options:

    • define your own probe type - by hacking some XML
    • use "command line probes" which basically calls an external program. On Linux/Unix writing a script using psql to connect to the DB and issue some silly command seems not to complicated too.
    • They have Nagios support for commandline probes and there are plenty Nagios-PostgreSQL plugins available.

    And of course you can use the contributed probes page to get enough examples - the MS-SQL probe in the "Application Monitoring Probes" section might be a good start.