Ad Widget

Collapse

Monitoring failover setups where hosts transition between master/slave roles

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lobster_johnson
    Junior Member
    • Jun 2010
    • 2

    #1

    Monitoring failover setups where hosts transition between master/slave roles

    We are monitoring a cluster with Zabbix where several hosts transition between master/slave roles.

    Masters and slaves have the same items, but need to have different triggers -- for example, a Postgres database slave will be running pg_standby, so the trigger needs to check whether it's running and the replica is sane, whereas on the master one expects the live database to be running.

    We could possibly solve this by creating "master" and "slave" templates and then manually linking/unlinking whenever the role transition occurs. However, that seems overly cumbersome.

    A simpler scenario would be to have master and slave each have a dummy file (eg., /srv/myapp/.master) whose contents is monitored by an item; the triggers then use an AND expression that checks that item's value.

    Another option is to use a macro on the template, set to the host name of the current master. However, I don't know whether it's possible to check for macros in a trigger.
Working...