Hi, we are using Nagios since many many years and with the time we added tons of nodes (servers, switches, IoT, etc..) with many test. Our environment is Windows and Linux and all kind of other things.
I'm always facing the same issue and I didn't find any good solution regarding that so I'm asking you. Maybe my google is not good enough ;-(
It's possible to manage the Nagios xi Configuration as Code. Like
For all Linux, use this set of services monitoring
For all Windows, use this set services monitoring
For all production use this set of notification
etc..
Don't tell me to play with Template, they are good but not dynamic and they do not change a server configuration if I decide to add a new based services in the All Linux template.
Another idea I got is to run a report and check which server doesn't have this kind of test and then do the change manually. But I prefer something like Ansible with playbook that will recreate the entire Nagios configuration based on the playbook.
I found some few thing with Nagios + Ansible but it's mostly to deploy the client.
My goal is to have a consistency in the Nagios configuration and not having a surprise on "Yeah we added this server last week and forgot to add a monitor for the root filesystem".
Thanks
Solution to manage tons of nodes and tests in Nagios xi
-
- Posts: 1
- Joined: Tue Jan 05, 2021 1:19 pm
-
- Posts: 1114
- Joined: Tue Dec 02, 2014 12:00 pm
Re: Solution to manage tons of nodes and tests in Nagios xi
Templates have their place. My hosts for example have only the hostname, address and template defined. Similarly, services only have what's needed to define the service, with other info in the template.
Do you have lots of services that do the same thing or a single service (per OS type) for each check? If you're good with having standard arguments, for all hosts, for example, x% and y% memory free for warning and critical, I'd define s single service rather than many. I ask because some folks add new services (with wizards) each time a host is added rather than attaching the host to a single service. Using a single service of each type allows the use of hostgroups. Add the hosts to the hostgroup and the hostgroup to the services, and the monitoring will be consistent.
Of course, converting to templates and hostgroups can be a pain...
Since in Nxi the configuration is stored in the DB, and config files written by CCM, you can't update config files directly. You would need to import them, or use the API to make changes.
Do you have lots of services that do the same thing or a single service (per OS type) for each check? If you're good with having standard arguments, for all hosts, for example, x% and y% memory free for warning and critical, I'd define s single service rather than many. I ask because some folks add new services (with wizards) each time a host is added rather than attaching the host to a single service. Using a single service of each type allows the use of hostgroups. Add the hosts to the hostgroup and the hostgroup to the services, and the monitoring will be consistent.
Of course, converting to templates and hostgroups can be a pain...
Since in Nxi the configuration is stored in the DB, and config files written by CCM, you can't update config files directly. You would need to import them, or use the API to make changes.