Page 2 of 2
Re: monitor and alert using NRP agent on a RedHat client
Posted: Fri Jun 29, 2012 1:09 pm
by scottwilkerson
I am going to have our AIX guy take a look at this, with the holiday it may be a bit before I have a solid response.
Re: monitor and alert using NRP agent on a RedHat client
Posted: Thu Jul 05, 2012 11:21 am
by spcmidrange
Scott
Thanks, but you misunderstood me. I only mentioned AIX as an example of servers i have monitored in the past. My specific problem/screenshot is with RHEL/Linux servers. From the screenshot in my first post (2 posts previous), an inetd server being monitored says its down, but Nagios says that its "OK"
Just to repeat, this has nothing to do with AIX, only Linux/RHEL
Apologizes for the confusion.
Cheers!
Ryan
Re: monitor and alert using NRP agent on a RedHat client
Posted: Thu Jul 05, 2012 11:36 am
by scottwilkerson
Can you tell me what nrpe command these are using and if possible send me the corresponding plugin from the remote machine so I can verify that we don't have a newer version of the plugin available.
I have tried to test this but seem to get the expected results on my machine...
Re: monitor and alert using NRP agent on a RedHat client
Posted: Thu Jul 05, 2012 11:57 am
by spcmidrange
Scott.
All i did was run the linux-nrpe-agent.tar.gz to install the agent and ran the Linux/RHEL add new host wizard. Bare with me as im used to using flat files than this whole new interface.
Everything is brand new. NagiosXI, the client install, hell the server. Running the commands on the server in question gives same result
[root@ami-reg-ftws-02 ~]# /etc/init.d/flexnet-epm status
flexnet-epm is stopped.
[root@ami-reg-ftws-02 ~]# /usr/local/nagios/libexec/check_init_service flexnet-epm
flexnet-epm is stopped.
But why is NagiosXI reporting that its "OK" It clearly says its stopped and i know the service is stopped
Re: monitor and alert using NRP agent on a RedHat client
Posted: Thu Jul 05, 2012 12:29 pm
by scottwilkerson
On that machine can you run the following commands and report the output
Code: Select all
/sbin/service flexnet-epm status
echo $?
Thanks
Re: monitor and alert using NRP agent on a RedHat client
Posted: Thu Jul 05, 2012 12:38 pm
by spcmidrange
[root@ami-reg-ftws-02 ~]# /sbin/service flexnet-epm status
flexnet-epm is stopped.
[root@ami-reg-ftws-02 ~]# echo $?
0
Cheers!
Re: monitor and alert using NRP agent on a RedHat client
Posted: Thu Jul 05, 2012 1:51 pm
by scottwilkerson
Well we found the problem, but now we need to see if we can find a work-around for you.
The plugin uses the return code of that command as the status. For whatever reason yours is returning 0 even if the service is stopped.
Does this service have a propper status setup in it's init.d file?
Re: monitor and alert using NRP agent on a RedHat client
Posted: Thu Jul 05, 2012 4:09 pm
by spcmidrange
Looks like your right. After googling what you were askin, and looking at other init.d scripts, this doesnt update anything related to status, nor $?
Question solved! I will ask the app guys to fix their scripts to be proper compliance
Thanks Scott!
Cheers!
Re: monitor and alert using NRP agent on a RedHat client
Posted: Thu Jul 05, 2012 4:12 pm
by scottwilkerson
Excellent!