Skip to header Skip to main navigation Skip to main content Skip to footer

Search form

Site branding

Home
What's up, home?

Main navigation

  • Home
  • Story mode
  • About
  • Features
  • Hardware list
  • Videos
  • GitHub (opens in new tab)
  • Daily AI generated stories (opens in new tab)

Part 27: No more blackouts with Zabbix HA cluster

Breadcrumbs

Breadcrumb

  • Home
  • Part 27: No more blackouts with Zabbix HA cluster

Main page content

By whatsuphome | 11:17 AM EET, Wed November 16, 2022

TL;DR

I set up a two-node Zabbix high-availability cluster at home so my monitoring survives rolling blackouts. The standby node runs on my laptop on battery while the primary runs on a Raspberry Pi, both sharing the same database. Enabling HA in Zabbix
Two Zabbix cubes

Can you have a Zabbix HA cluster at home? Of course you can! By day, I am a monitoring tech lead in a global cyber security company. By night, I monitor my home with Zabbix & Grafana and do some weird experiments with them. Welcome to my blog about this project.

The winter is coming, and due the world events it might bring one to two hours rolling blackouts here in Finland, too. As I have my home Zabbix running on my Raspberry Pi, without an UPS this would mean my Zabbix possibly could not monitor the actual duration of the outages, as my Zabbix server would be without power, too, right?

No. Thanks to simplicity of setting up a HA cluster with Zabbix, I now have a two-node Zabbix server setup at home, with the standby node running on my laptop, which of course can run on battery for the duration of the blackout. So, while this post is kind of boring -- I'm not introducing anything weird to monitor today -- I hope the post encourages you to try out the high-availability features of Zabbix. It's easy!

Setup the nodes

As written on Zabbix documentation, setting up HA on Zabbix means two additional lines added to your zabbix_server.conf file:

 

  • HANodeName for descriptive, unique name of the node
  • NodeAddress, which should be the address Zabbix front-end will then use

 

That's it! And, that is what I did. Then make sure your Zabbix servers point to same database, and that all your Zabbix servers can connect to that database.

But does it work?

Of course it does!

Here's the status as seen from Zabbix Reports --> System Information:

No alt text provided for this image

And here's the status as reported by sudo zabbix_server -R ha_status from the command line on my Raspberry Pi:

No alt text provided for this image

Out of the curiosity I tried out what happens if I try the same command on my laptop. This happens:

No alt text provided for this image

Still to do

As nowadays due our baby my time is very limited, I do have one remaining task to make this perfect: to setup a database cluster. For now MariaDB is running on my Raspberry Pi only, so I would need to spread it to run on my laptop, too. I will most likely do this with MariaDB Galera Cluster, but that will be another story.

Winter, you might take out my electricity, but you won't take down my Zabbix.

I have been working at Forcepoint since 2014 and I won't let my systems go down.

 

whatsuphome
zabbix
cluster
highavailability
laptop
blackout
part27
  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
I set up a two-node Zabbix high-availability cluster at home so my monitoring survives rolling blackouts. The standby node runs on my laptop on battery while the primary runs on a Raspberry Pi, both sharing the same database. Enabling HA in Zabbix

Search

Who am I?

  • Janne Pikkarainen from Finland 🇫🇮
  • Began with computers in 1986 with C64
  • Doing IT for living since 1999
  • Principal Site Reliability Engineer at Forcepoint
  • A Zabbix Summit speaker every year since 2022
  • Walking, talking Zabbix commercial

Support my project

Buy me a coffee 

Footer menu

  • Contact

What's up, home? | Janne Pikkarainen | contact(at)whatsuphome.fi | 2022 - 2026

Developed and Designed by Janne Pikkarainen