What's up, home? part 26
Can you create fairy tales with Zabbix? Of course you can!

What's up, home? part 26

Can you create fairy tales with Zabbix? Of course you can! By day, I am a monitoring technical 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.

We all know how Zabbix has the never-ending list of integrations for just about everything --need to integrate it with OpsGenie, PagerDuty, Teams, Slack or something else? No problem, there's probably a ready-made integration for that already.

But, based on questions I've received over the years at work, not everyone realises how utterly powerful the alert message templating engine is for you to create custom messages with the help of built-in macros and of course the user macros you can define . The default Zabbix HTML e-mail message template is very compact in its format, and for me easy to read, but years ago someone at work told me that the alerts were not easy for him to follow.

What I did back then was that I created an alert template of my own, which tells about the events in a bit different format, here's a short snippet from those alerts.

No alt text provided for this image

Fairy tale time!

Now that at home we have our almost-three-months-old-baby, I'm using her as the perfect excuse to make Zabbix alerts be like fairy tales. You know the drill. Your kiddo wants to hear a yet another story before he or she falls asleep, and you have already run out of fresh stories to read.

What if your Zabbix would generate fairy tales for you? Well, not really, but at least the following would make the stories a bit more amusing to you and very confusing to your kid.

Let's first create a new media type via Zabbix Administration --> Media types. For this, I just cloned the default HTML e-mail media type and gave it a name.

No alt text provided for this image

And then, my fantastic story template looks like this:

No alt text provided for this image

Add the template to user media type

Next, to actually receive these alerts, you need to configure your user profile and in its media types add the new media type.

No alt text provided for this image

Using the template

Getting the new template into use is easy; just go to Zabbix Configuration --> Actions and create a new trigger action with whatever conditions you like.

No alt text provided for this image
No alt text provided for this image

And then on Operations tab make Zabbix send the alerts via your new fairy tale media type.

No alt text provided for this image

The alert e-mail

So this is how the e-mail looks like.

No alt text provided for this image

Now go and add some CSS, pictures, whatever you like to your stories. And, perhaps, unlike me, go and change the {ITEM.DESCRIPTION} macro to contain also some instructions what to do with the alert, like at our custom alerts at work I have a tendency to add some hints about how to resolve the issue.

I have been working at Forcepoint since 2014 and I would have many stories to tell you about all these years.

要查看或添加评论,请登录

Janne Pikkarainen的更多文章

  • What's up, home? part 30

    What's up, home? part 30

    Can you monitor Northern Lights with Zabbix? Of course you can! By day, I am a monitoring tech lead in a global cyber…

    3 条评论
  • What's up, home? part 29

    What's up, home? part 29

    Can you detect a crying baby with Zabbix? Of course you can! By day, I am a monitoring tech lead in a global cyber…

    2 条评论
  • What's up, home? part 28

    What's up, home? part 28

    Can you monitor FlightGear flight simulator with Zabbix? Of course you can! By day, I am a monitoring tech lead in a…

    9 条评论
  • What's up, home? part 27

    What's up, home? part 27

    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…

    4 条评论
  • What's up, home? part 25

    What's up, home? part 25

    Can you monitor your backups with Zabbix? Of course you can -- and you should! By day, I am a monitoring tech lead in a…

    1 条评论
  • What's up, home? part 24

    What's up, home? part 24

    Can you monitor Finland's total real-time power consumption with Zabbix? Of course you can! By day, I am a monitoring…

    4 条评论
  • What's up, home? part 23

    What's up, home? part 23

    Can you monitor a banana with Zabbix? Of course you can! By day, I am a monitoring tech lead in a global cyber security…

    4 条评论
  • What's up, home? part 22

    What's up, home? part 22

    Can you use Zabbix as a countdown timer? Of course you can! By day, I am a monitoring technical lead in a global cyber…

    9 条评论
  • What's up, home? part 21

    What's up, home? part 21

    Can you make sure your video streams are up with Zabbix? Of course you can! By day, I am a monitoring technical lead in…

  • What's up, home? part 20

    What's up, home? part 20

    Can you monitor your upcoming electricity bill with Zabbix? Of course you can! By day, I am a monitoring technical lead…

社区洞察

其他会员也浏览了