Ansible-Nagios icon indicating copy to clipboard operation
Ansible-Nagios copied to clipboard

cores are ignored

Open ak370 opened this issue 3 years ago • 5 comments

suggest replacing ansible_processor_count to ansible_processor_vcpus in Ansible-Nagios/defaults/main.yml

ak370 avatar Jun 11 '21 18:06 ak370

Good idea. Fixed.

sdarwin avatar Jun 11 '21 19:06 sdarwin

Thanks for the prompt one. restart nrpe action doesn't happen though /etc/nagios/nrpe.d/check_load.cfg got changed. Any idea?

ak370 avatar Jun 11 '21 19:06 ak370

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

ak370 avatar Jun 11 '21 19:06 ak370

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

sdarwin avatar Jun 11 '21 19:06 sdarwin

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

ak370 avatar Jun 11 '21 20:06 ak370