Running into an issue where nrpe starts up as root user in Aix 7.1 and nagios fails to check properly and starts up as root and not nagios
root 4325726 1 0 15:55:53 - 0:00 /usr/local/nagios/bin/nrpe -n -c /usr/local/nagios/etc/nrpe.cfg -d
[nagios@vnagp01 libexec]$ ./check_nrpe -H aixpowerha01
CHECK_NRPE: Error - Could not complete SSL handshake.
[nagios@vnagp01 libexec]$ ./check_nrpe -n -H aixpowerha01
NRPE v3.0.1
If I kill and restart using the nagios user ssl works fine.
Any suggestions ? Or please let me know the proper way of having nrpe startup on reboot.
Thanks
AIx 7 nrpe startup from inittab
Re: AIx 7 nrpe startup from inittab
I figured out my issue. The inittab file had the -n flag in the command, also didn't register in my brain even though I saw the flag. This may have been propagated from another server that did not have openssl working and was never removed from the script for use as the standard for other servers.
That's one problem solved but the one about the process being run as root and not nagios is still there.
root 8454648 1 0 12:16:41 - 0:00 /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d
nrpe.cfg has the run as nagios directive in it but looks like it's ignored.
I'll try running it via /etc/rc.local using su - nagios -c "/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d"
unless there is a better way.
That's one problem solved but the one about the process being run as root and not nagios is still there.
root 8454648 1 0 12:16:41 - 0:00 /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d
nrpe.cfg has the run as nagios directive in it but looks like it's ignored.
I'll try running it via /etc/rc.local using su - nagios -c "/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d"
unless there is a better way.
Re: AIx 7 nrpe startup from inittab
Confirmed that nrpe runs as the nagios user when running it from /etc/rc.local.
If anyone knows why it wouldn't work running out of inittab as the nagios user or has a fix it would be nice to know
Thanks
If anyone knows why it wouldn't work running out of inittab as the nagios user or has a fix it would be nice to know
Thanks
Re: AIx 7 nrpe startup from inittab
Where did you download or get the NRPE agent from?
Can you post how the NRPE agent was configured in the inittab file?
Can you post how the NRPE agent was configured in the inittab file?
Be sure to check out our Knowledgebase for helpful articles and solutions!