AIx 7 nrpe startup from inittab

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
ebuttice
Posts: 10
Joined: Fri May 09, 2014 2:24 pm

AIx 7 nrpe startup from inittab

Post by ebuttice »

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
ebuttice
Posts: 10
Joined: Fri May 09, 2014 2:24 pm

Re: AIx 7 nrpe startup from inittab

Post by ebuttice »

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.
ebuttice
Posts: 10
Joined: Fri May 09, 2014 2:24 pm

Re: AIx 7 nrpe startup from inittab

Post by ebuttice »

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
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: AIx 7 nrpe startup from inittab

Post by tgriep »

Where did you download or get the NRPE agent from?

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!
Locked