Ansible-Nagios
Ansible-Nagios copied to clipboard
cores are ignored
suggest replacing ansible_processor_count to ansible_processor_vcpus in Ansible-Nagios/defaults/main.yml
Good idea. Fixed.
Thanks for the prompt one. restart nrpe action doesn't happen though /etc/nagios/nrpe.d/check_load.cfg got changed. Any idea?
There also could be additional step in ansible to check if any nrpe files age is lower than nrpe process age. This could be additional safety check to avoid effectively broken monitoring system.
Similar issues with chef a while ago https://github.com/sous-chefs/nrpe/issues/7
There's an ansible handler, which is supposed to restart the nrpe service.
- which exact operating system are you on?
- what is the exact name of the nrpe service? For example, I get this:
systemctl | grep nrpe
nagios-nrpe-server.service
Yeah I see below should work but either it does not either it was skipped by me stopping ansible run mid way.
- name: restart nrpe become: true service: name={{ nrpe_service_name }} state=restarted
I am having the same both on Ubuntu20.04.2 systemctl | grep nrpe nagios-nrpe-server.service
and on Centos 7.9.2009: systemctl | grep nrpe nrpe.service
I see nrpe is just not restarted and then all good once I restart manually.
On another round I just changed warning threshold for memory and nrpe was restarted on all. HMM.
It might be I just stopped ansible before NRPE handler.
Thanks