Part 67: Track airport departures with Grafana's Infinity data source
Here's something different to leave my Generative AI thing and overall Zabbix theme for a moment.
Here's something different to leave my Generative AI thing and overall Zabbix theme for a moment.
Now that my (admittedly repetitive) Generative AI blog has been up and running for a while, it's time to give you ideas how to utilize this AI weirdness inside your Zabbix or Grafana, too.
How about an automatically updated alert summary for the next on-call person around the time the shift is about to change? There would be multiple ways of doing that, in my case I did it like this.
My cronjob runs the following every hour:
For those of you who were present in Zabbix Summit 2023 in Riga, Latvia do probably remember how InitMAX demoed their Zabbix 7.0 ChatGPT widget. That was and is extremely cool, but even though the plugin itself is freely available and open source, using it with ChatGPT requires a ChatGPT account and real money.
As I now have GPT4All perfectly suitable for writing fascinating stories about everything, why not to utilize it even more? Please welcome the new spin-off website, What's up, home? Generative AI Edition. A cronjob running on my What's up, home? environment will run itself every morning 7am Finnish time, generate a fresh new story based on active Zabbix alerts, and post it to the new website over Drupal API.
Maybe you'd like to have a random desktop background picture? Or one of your dashboards would need a changing image? Let the alerts flowing in to your alerting system be your artist.
As I am now entering the dungeons of Generative AI, of course I'm having some fun. Instead of just analyzing a single alert through Zabbix manual actions, how about using the Zabbix API and the official zabbix_utils for querying the active alerts and feeding the list to GPT4All?
I just integrated my Zabbix with locally running generative AI in five minutes. You could do it, too. Here's how.
For my test, I'm using GPT4All, or its Python libraries. Install it with
pip install gpt4allNext, I took one of their example scripts and added very primitive command line argument handling. Here's the full Python script.
Ever since I started my What's up, home? project back in the spring of 2022, the Raspberry Pi 4 I bought back then has been running on Raspberry OS 11 -- or, a rebranded Debian 11 with a splash of love to make it perfect for these little credit-card sized computer marvels.
Today I took a brave step and upgraded my Raspberry Pi to Rasberry Pi OS 12, or again, to modified Debian 12. Even though Debian 12 has been out for some time now, Raspberry Pi OS 12 only came out late last year.
As Zabbix 7.0 will come with the new widget framework, allowing communication between different widgets on dashboards, of course I had to try it out.
The blog post title is a bit of a clickbait in a sense that this example is just 1:1 from Zabbix Summit 2023 custom widgets workshop session. I made some very, very minor modifications to code, mainly just changed my name and so on to manifest.json files. Since the code itself was obtained from the workshop session, I'm not going to publish it, but this much I will tease:
Since I will have some real use for Zabbix 7.0 when it comes out, I figured out that maybe it's time to switch my What's up, home? main instance to run on Zabbix 7.0beta1. Actually, I first upgraded to Zabbix 7.0alpha9 early yesterday, but then 7.0beta1 got released later in the evening before I had time to play around with alpha9.
Anyway, now my Raspberry Pi 4 is running the latest-and-greatest version of Zabbix. A possible bumpy ride ahead, but I'm ready!
What's up, home? | Janne Pikkarainen | contact(at)whatsuphome.fi | 2022 - 2026
Developed and Designed by Janne Pikkarainen