Skip to main content
  1. Posts/

Zabbix Template: Monitor health of DRBD 9.x (NEW VERSION)

·397 words·2 mins· loading · loading ·
Table of Contents
thetorminal/zabbix-drbd

Monitoring the status of drbd with Zabbix.

null
0
0

Zabbix drbd monitoring
#

Monitoring the status of drbd with Zabbix.

This template is now part of the official community-templates repository of zabbix:
Github - Zabbix/community-templates/drbd

Description
#

I updated my old DRBD Monitoring template for zabbix to use drbdadm status instead of reading the contents of /proc/drbd. You can find the original blog post here: Torminal - Zabbix Template: Monitor health of DRBD .
The repository is now split in two versions, one for DRBD < version 9.x and a new for DRBD > version 9.x.

  • older than Version 9.x: Github - zabbix-old-version
    • Shows warning if the primary DRBD host becomes secondary or the secondary goes offline.
    • The /proc/drbd file in the Linux system is read for this purpose.
  • newer than version 9.x: Github - zabbix-new-version
    • Shows warning if:
      • Host is no longer Primary
      • Local disk is not UpToDate
      • Peer is not Secondary (connection problem)
      • Replication not established
    • Reads the content of the drbdadm status command.

Tested with:

  • Zabbix Server 6 & Zabbix Server 7
  • zabbix-agent2
  • DRBD 8.x (on Debian 12 server)
  • DRBD 9.x (on Debian 12 server)

Dependencies
#

  • Zabbix-Server
  • Host with zabbix-agent2 and DRBD installed

Installing
#

New Version, based on “drbdadm status”
#

Example alerts:
drbd_example_zabbix

On Zabbix frontend server:
#

  • Files can be found at Github - zabbix-new-version
  • Download and import the template drbd9-status.yaml
  • Assign the Template DRBD 9.x Status to the docker host(s) you want to monitor

On the DRBD Primary Node
#

  • Add the file drbd.conf in the zabbix-agent2 configuration path at /etc/zabbix/zabbix_agent2.d
  • Restart zabbix-agent2 with systemctl restart zabbix-agent2

Now you should be able to get warnings in Zabbix. You can test it with switching primary and secondary node, you should get a warning after up to 10 minutes that says “Host is no longer Primary”.

Old Version, based on “/proc/drbd”
#

On Zabbix frontend server:
#

  • Files can be found at Github - zabbix-old-version
  • Download and import the template drbd-status.yaml
  • Assign the Template DRBD Status to the docker host(s) you want to monitor

Conclusion
#

The new version of the template now got a bunch of new warnings. Thanks to Lukáš Grygera, who commented on the old blog-post at told me about “drbdadm status”.
If you have more requests, issues with the template or anything else to tell me, feel free to leave a comment below (no registration required).

torminal
Author
torminal
IT enthusiast

Related

Zabbix Template: Monitor health of DRBD
134 words·1 min· loading · loading
Zabbix Template: Monitor Wordpress updates of multiple websites
251 words·2 mins· loading · loading
Zabbix Template: Monitor updates of docker images
315 words·2 mins· loading · loading