Page 1 of 2
monitor and alert using NRP agent on a RedHat client
Posted: Wed Jun 27, 2012 8:24 am
by ynguyen
I am get the basic ping and alert to work. Now, I would like to see if Nagios can monitor a Linux service and trigger an alert through
NRPE agent. I have an NRPE agent installed on a Redhat. I am still figuring how where the package installed and how to get the Nagios to communicate and pull and mornitoring this Redhat agent.
Could you provide an example on how to configure such service:
requirement: if _mprosrv not exit via the ps -ef | grep _mprosrv then send an alert.
service: _mprosrv
user to perform remote login: yngu
user's password: test
what are other information you need from me?
Thanks,
Y
Re: monitor and alert using NRP agent on a RedHat client
Posted: Wed Jun 27, 2012 9:21 am
by scottwilkerson
If you have NRPE installed on the Client I would just use the Linux Server Wizard and put _mprosrv in for the Linux Process in the Processes section
Re: monitor and alert using NRP agent on a RedHat client
Posted: Wed Jun 27, 2012 9:28 am
by ynguyen
1.
How to check if the NRPE agent is running on the client machine?
2. what part should I use Processes under the NRPE wizard:
Specify any process names that should be monitored to ensure they're running.
This is two service that need to be monitor from my server when I do a ps -ef : Can Nagios take and check the whole string? or it only can check what????
1. Database service
_mprosrv /databases/progress/web/web-galco -m1 -N TCP -Nd /dev/tcp -hs 0 -Mm 1024 -yy 1950 -cpinternal ISO8859-1 -cpstream ISO8859-1 -cpterm ISO8859-1 -cpcase Basic -cpcoll Basic -ipver IPV4 -S websvc -H 0.0.0.0 -T /usr/temp/
2. Tomcat service
/usr/java/default/bin/java -Djava.util.logging.config.file=/usr/share/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/usr/share/tomcat/endorsed -classpath /usr/share/tomcat/bin/bootstrap.jar:/usr/share/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/usr/share/tomcat -Dcatalina.home=/usr/share/tomcat -Djava.io.tmpdir=/usr/share/tomcat/temp org.apache.catalina.startup.Bootstrap start
Re: monitor and alert using NRP agent on a RedHat client
Posted: Wed Jun 27, 2012 9:36 am
by scottwilkerson
and it should be listening on 5666
Re: monitor and alert using NRP agent on a RedHat client
Posted: Wed Jun 27, 2012 9:50 am
by ynguyen
It can not find the nrpe. However, it seem to list via the netstat -l command.
Is this mean it is running?
[root@app1 ~]# ps -ef | grep nrpe
root 12430 12155 0 10:48 pts/3 00:00:00 grep nrpe
[root@app1 ~]# netstat -l | grep nrpe
tcp 0 0 *:nrpe *:* LISTEN
Re: monitor and alert using NRP agent on a RedHat client
Posted: Wed Jun 27, 2012 10:05 am
by scottwilkerson
this is normal, nrpe is often run under xinetd on RHEL, it should be running fine.
Re: monitor and alert using NRP agent on a RedHat client
Posted: Wed Jun 27, 2012 10:15 am
by ynguyen
Scott,
Can you provide some direction on how to go about this
1.
How to check if the NRPE agent is running on the client machine?
2. what part should I use Processes under the NRPE wizard:
Specify any process names that should be monitored to ensure they're running.
This is two service that need to be monitor from my server when I do a ps -ef : Can Nagios take and check the whole string? or it only can check what????
1. Database service
_mprosrv /databases/progress/web/web-galco -m1 -N TCP -Nd /dev/tcp -hs 0 -Mm 1024 -yy 1950 -cpinternal ISO8859-1 -cpstream ISO8859-1 -cpterm ISO8859-1 -cpcase Basic -cpcoll Basic -ipver IPV4 -S websvc -H 0.0.0.0 -T /usr/temp/
2. Tomcat service
/usr/java/default/bin/java -Djava.util.logging.config.file=/usr/share/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/usr/share/tomcat/endorsed -classpath /usr/share/tomcat/bin/bootstrap.jar:/usr/share/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/usr/share/tomcat -Dcatalina.home=/usr/share/tomcat -Djava.io.tmpdir=/usr/share/tomcat/temp org.apache.catalina.startup.Bootstrap start
Question are:
Can I use the long string as it find through grep (showed above) or do I have narrow to a key word....out of the long string that showed above.
What are the options and what does it allowed??
Re: monitor and alert using NRP agent on a RedHat client
Posted: Wed Jun 27, 2012 10:40 am
by ynguyen
Need confirmation:
After I went through a Wizard to configure a Linux server (define all the services that I needed it to monitor and alert).
Do I have to going through (Core Config Manager, Monitoring, Services) each services and enable the following:
Notification Period
Notification enable
Check period
Event handler
I am guessing, I need to do that. Because I do not received any alert when I manually take down a service.
Please confirm.
Thank you.
Y
Re: monitor and alert using NRP agent on a RedHat client
Posted: Wed Jun 27, 2012 11:49 am
by lmiltchev
You don't have to set all these manually through the CCM - they are set up in the template that this particular host/service is using. If you modify any of the settings on a host/service level via the CCM, it will override the template.
Re: monitor and alert using NRP agent on a RedHat client
Posted: Thu Jun 28, 2012 4:19 pm
by spcmidrange
I almost have the same issue, was just searching to see if there was an answer first.
Long time core user, new XI user. Been using nrpe to monitor on AIX and Linux servers for 7 years now. So trying out these new NagiosXI wizards. I have an inet.d process that i want to monitor, so i put it in the spot for Inet.d services, and i see it being monitored. But as ynguyen mentioned, it does not notify me when the service is down. Even though it says on the screen "scheduler is stoped" it still gives me an OK/Green and therefore no notifcation.
How do i get this check to notice that it is down, when it clearly says it is down
