What's up, home? part 24
Can you monitor Finland's real-time power consumption with Zabbix? Of course you can!

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 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.

After my speech at the Zabbix Summit 2022, someone asked how deeply my wife is involved with this home monitoring project, and I responded back that most of the time she gives me ideas by accident. You know, she's a funny and talkative person up to the point that I call her as the comment track or the voice-over of my life, so even as a non-techie she will for sure give me new ideas.

Well, this time she gave the idea for this post on purpose -- now that winter and the dark days & nights are approaching fast, she asked if Zabbix could turn our decorational seasonal lights on and off based on the current electricity price.

Of course it can! I am anyway already monitoring the current electricity price. But let's take it further -- using Zabbix, we can also check Finland's current real-time power consumption. It would be kind NOT to turn on the lights even during the cheap hours, if our power grid would be near its maximum limit.

Hello, Fingrid

Our electricity network Fingrid offers open data for all kinds of details about our power grid, one of them being the current electricity consumption. Using their services is free, all you need is to create an account to get an API key, so I tried if I can use the API with Zabbix. Well, Zabbix integration was easy, though due the time constraints set by our now-10-weeks-old-baby, this current version is bit of a kludge and not yet finished. But hey, I have this blog to write!

So, after getting my API key, I created a new HTTP agent item to my Zabbix, and did parse it with Zabbix JSONPath for the value.

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

Why the regular expression? The value was not returned in pure numeric format, and I know it must be just my JSONPath expression that has something wrong, but to get this working today, I just brute-forced the extra characters away. I'll fix that one day. Maybe. The most important for now is that this works; the values shown are in megawatts.

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

What's next?

Now that the ground work has been done, albeit in an ugly way, in the near future (when we actually install the seasonal lights), I can start controlling them via smart power sockets and smart lights. Thanks to total flexibility of Zabbix, I can then create triggers such as turn on seasonal lights if electricity cost is maximum of X EUR/kWh AND Finland's power grid total consumption is not more than Y MWh AND time of day is something when we would be awake (we would turn the lights off during the graveyard hours in any case).

I have some additional research to do; I'm sure I can find out Finland's total power grid capacity from somewhere, maybe even via Fingrid API (I first tried it about one hour ago). But, as this winter is going to be totally different than our usual winters, Zabbix can help you in this area, too.

I have been working at Forcepoint since 2014 and just like a small part of Forcepoint's logo, I'm trying to be green as well.

Faustine Chisasa

Information Technology Consultant | Network Engineering | Observability Enthusiast

2 年

Arturs was a great host, he asked the question in a nice way ?? , my question was if your wife is a techie and now I got my answer.?? Such a useful use case ??

Eyal Klein

Director of IT @ SentinelOne

2 年
回复

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

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 26

    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…

  • 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 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…

社区洞察

其他会员也浏览了