Page 3 of 3
Re: Check NRPE for Services
Posted: Thu Sep 01, 2016 10:51 am
by lmiltchev
If I run this from the Nagios server command line
root@tgcs017:/usr/local/nagios/etc/objects# /usr/lib/nagios/plugins/check_nrpe -H 10.2.8.12 -t 30 -c check_service -a CheckAll CHECK_NRPE: Invalid packet type received from server.
All gives same error Invalid Packet type received.
The NSClient++ syntax changes from version to version, so you may need to review the NSClient++ documentation to make sure you are using the correct command.
What is the output of the following commands?
Code: Select all
/usr/lib/nagios/plugins/check_nrpe -H 10.2.8.12 -t 30 -c CheckServiceState -a CheckAll
/usr/lib/nagios/plugins/check_nrpe -H 10.2.8.12 -t 30 -c CheckServiceState -a Spooler
Re: Check NRPE for Services
Posted: Thu Sep 01, 2016 10:52 am
by tgriep
Try removing the following option from the nsclient.ini file and see if that fixes it for you.
Re: Check NRPE for Services
Posted: Thu Sep 01, 2016 6:50 pm
by kwhogster
root@tgcs017:/usr/local/nagios/etc/objects# /usr/lib/nagios/plugins/check_nrpe -H 10.2.8.12 -t 30 -c CheckServiceState -a CheckAllCRITICAL: clr_optimization_v4.0.30319_32: stopped, SysmonLog: stopped delayed ()|
root@tgcs017:/usr/local/nagios/etc/objects# /usr/lib/nagios/plugins/check_nrpe -H 10.2.8.12 -t 30 -c CheckServiceState -a Spooler
OK: All 1 service(s) are ok.|'Spooler'=4;0;4
After removing this from nsclient and restarting NSCP service on the server
I made my define service now match the other servers which are working
Code: Select all
define service {
host_name TGCS002
service_description Check All Service
check_command check_nrpe!checkservicestate! -a CheckAll "filter=name not like 'clr_optimization_v4.0.30319'" exclude=SysmonLog
servicegroups AllServices
check_interval 1
use generic-service
}
define service {
host_name TGCS003
service_description Check All Service
check_command check_nrpe!checkservicestate! -a CheckAll exclude=WLMS
servicegroups AllServices
check_interval 1
use generic-service
}
TGCS002 is the problem one
TGCS003 works
On Nagios I now see this
All Service
Notifications for this service have been disabled
UNKNOWN 09-01-2016 19:46:14 5d 10h 58m 51s 3/3 Failed to validate filter see log for details
which log are they talking about?
Is my define service command correct?
Re: Check NRPE for Services
Posted: Thu Sep 01, 2016 6:56 pm
by kwhogster
Update
It is definitely my define service I made this change
Code: Select all
define service {
host_name TGCS002
service_description Check All Service
# check_command check_nrpe!checkservicestate! -a CheckAll "filter=name not like 'clr_optimization_v4.0.30319'" exclude=SysmonLog
check_command check_nrpe!checkservicestate! -a CheckAll exclude=SysmonLog
servicegroups AllServices
check_interval 1
use generic-service
}
Now it is checking but give service error on
Check All Service
Notifications for this service have been disabled
CRITICAL 09-01-2016 19:53:14 0d 0h 1m 37s 3/3 CRITICAL: clr_optimization_v4.0.30319_32: stopped delayed ()
How do I exclude that ? It is from Net Frame and is set an automatic delay service and is never stated all the time
I can change it to manual but after every restart of the server it reverts back to automatic
Need to filter this out
Thanks
Re: Check NRPE for Services
Posted: Thu Sep 01, 2016 8:19 pm
by kwhogster
Update
Code: Select all
define service {
host_name TGCS002
service_description Check All Service
check_command check_nrpe!checkservicestate! -a CheckAll exclude=SysmonLog exclude=clr_optimization_v4.0.30319_32
servicegroups AllServices
check_interval 1
use generic-service
}
Now working forgot the exclude= need that for each service your excluding
This issue and now be closed
Thanks every one for your help
Re: Check NRPE for Services
Posted: Fri Sep 02, 2016 9:30 am
by rkennedy
Awesome, glad to see it resolved!
Going to close this one out.