NagiosEnterprises / ncpa

Nagios Cross-Platform Agent
Other
176 stars 95 forks source link

RHEL 8 ncpa service not starting after upgrade to version 3.0.0 #1028

Closed Matty-uk closed 7 months ago

Matty-uk commented 8 months ago

ncpa service fails to start - seeing this on 100+ servers

ps aux | grep nagios nagios 500675 0.1 0.7 346084 42756 ? S Nov15 5:54 /usr/local/ncpa/ncpa_passive --start nagios 500678 0.0 0.7 268924 41196 ? Sl Nov15 0:00 /usr/local/ncpa/ncpa_listener --start

If I kill the pids the service will then start and if I check again

ps aux | grep nagios nagios 656342 0.1 0.9 170732 54984 ? Ss 08:47 0:01 /usr/local/ncpa/ncpa -n nagios 656344 0.1 0.8 266592 50628 ? S 08:47 0:01 /usr/local/ncpa/ncpa -n nagios 656345 0.0 0.7 248848 43044 ? S 08:47 0:00 /usr/local/ncpa/ncpa -n

Worth pointing out that even though the service does not start the agent (reporting as 2.4.1) is still sending data. So If I had not checked the agent version and/or the service I would not have noticed.

Matty-uk commented 8 months ago

I've pushed the below to fix my agents:

ps aux | grep '/usr/local/ncpa/ncpa_' | grep 'nagios' | awk '{print $2}' | xargs kill -9 systemctl start ncpa

ne-jmichaelson commented 8 months ago

ncpa_passive and ncpa_listener are leftover services from NCPA <3.0.0. Fixes for these have been merged into the dev-v3.0.1 branch.