Building Nagios on a Raspberry Pi
I thought it would be a fun exercise to build Nagios at home. It was fairly straightforward to spin up a low-resource VM and build it on CentOS. However, it was kind of pointless to have my monitoring on a virtual machine, as when the virtual host would go down then alerts would stop entirely.
So, I dug up my old Raspberry Pi (1st Generation) and decided to put it to some use for once, rather than having it sitting around the house collecting dust.
I stuck a 4GB SD card into it with NOOBS loaded on it, and installed Raspbian. Here’s what I did in the shell to get Nagios up and running:
1 | ## Update the server, and install the prerequisites |
After this point, Nagios should be listening on localhost/nagios and you can authenticate using the nagiosadmin account that was created. Of course then you need to define hosts, services, etc. so this is only the beginning of the configuration.
Here’s it running after configuration, with some sensitive info omitted:
I have a problem now in that my Pi has about 100mb of space left, so I’ll look into either finding a way to reduce the space consumed by the system or to get a larger SD card for it.