Can you monitor NixOS with Zabbix? Of course you can! And that's why I've been silent lately.
Well the bold text is pretty much unnecassary. NixOS is at least semi-supported for Zabbix. I would not set my primary server with NixOS, not with its current state, but for everything else, it's awesome and different.
What is NixOS?
It's a very different kind of Linux distribution. It's like a merger of Gentoo, Arch and Ansible. You declare what you want, and behold, that happens. You can take your /etc/nixos/configuration.nix file and on any machine, be sure your machine will be reinstalled to exact state it was with your previous machine. It's immutable, you will always have a working configuration available.
This is a monitoring blog, why NixOS blurb?
Just because getting Zabbix agent to work on NixOS was so super easy! See, this is all I added to /etc/nixos/configuration.nix file
services.zabbixAgent.enable = true;
services.zabbixAgent.openFirewall = true;
services.zabbixAgent.server = "my.whatsuphome.zabbix.server.address"
.. and on top of that, in the same file there's a list of packages you want to add, I added zabbixAgent there.
That's all to it!
So far after a week or two of NixOS investigation, I'm very impressed with it. It has 80,000 packages in its package repository; It guarantees it cannot break as you will always have your previous working configuration (or dozens of them) available; you can create profiles for all kinds of use cases you have from work to hobbies to banking; and all this just works!
No, it's not for beginners, but for advanced Linux users, possibly for the ones with Puppet/Ansible/whatever similar experience it's amazing.
Comments