Page 1 of 2
Monitor window machine with nrpe using nrpe 5666
Posted: Mon Jun 20, 2016 7:23 am
by Naveed
Hello,
I have installed nagios xi on centos.
I have run a configuration wizard (Monitor and remote server using nrpe 5666) for adding my windows node.
All my services are monitoring perfectly fine, whereas its getting few commands by default and giving the following errors
check cpu load
check Disk usage C:\
check Memory
Error message is:
Connection to my host IP and port 12489 connection refused.
my server is running on nrpe 5666 right now.
These above services do not show on when I run a configuration wizard. Kindly assist
From where its getting these services to add.
I cant even remove these services from CCM ==> services
Thank you!
Re: Monitor window machine with nrpe using nrpe 5666
Posted: Mon Jun 20, 2016 10:20 am
by rkennedy
If you do not see the services in the CCM, then I'd guess they might be running as a ghost. Let's make sure only one process of nagios is running, please post the full output of ps -aef|grep nagios. If you see multiple PPID's running, then you have multiple processes running which will cause issues.
If it's stuck in the CCM, try navigating to the CCM -> Under tools look for 'Write Config Files' -> Click 'Delete All...', then 'Write', then 'Verify'. After all of this, click Apply Configuration. The services should be gone.
Re: Monitor window machine with nrpe using nrpe 5666
Posted: Wed Jun 22, 2016 10:52 am
by Naveed
I am monitoring a windows server with check_nrpe,
Windows service name contains $ sign, e.g AOS60$01
I passed this service as an argument but nagios do not accept it. I am using checkservicestate to monitor all my services..
All other services are monitoring.
Kindly assit.
Thank you!
Re: Monitor window machine with nrpe using nrpe 5666
Posted: Wed Jun 22, 2016 10:55 am
by hsmith
Re: Monitor window machine with nrpe using nrpe 5666
Posted: Wed Jun 22, 2016 10:58 am
by rkennedy
To add to what @bwallace mentioned, you may need to replace a $ with \\$$ to escape it. See this article -
https://www.krenger.ch/blog/nagios-esca ... character/
Re: Monitor window machine with nrpe using nrpe 5666
Posted: Wed Jun 22, 2016 11:39 am
by Naveed
Thank you everyone for your interest.
My service name is a follows
check_nrpe!checkservicestate! -a AOS60\\$$01!!!!!!
I have replaced \ with \\$$
I have also made the following change but nothing is working for me
[/settings/NRPE/server]
allow nasty characters=true
[/settings/external scripts]
allow nasty characters=true
Failed to open service AOS60\/bin/sh1: 123: The filename, directory name, or volume label syntax is incorrect.
Above message is showing.
Kindly assist.
Thank you!
Re: Monitor window machine with nrpe using nrpe 5666
Posted: Wed Jun 22, 2016 11:42 am
by rkennedy
Try following what @hsmith mentioned to see if his method will work for you. Let us know how it goes.
Re: Monitor window machine with nrpe using nrpe 5666
Posted: Wed Jun 22, 2016 11:55 am
by Naveed
Dear rkennedy
I Could not understand what you have suggested?
Kindly explain please.
Thank you!
Re: Monitor window machine with nrpe using nrpe 5666
Posted: Wed Jun 22, 2016 12:16 pm
by rkennedy
Take a look at
http://serverfault.com/questions/198387 ... -parameter
Had I kept searching just that little longer I wouldn't have had to ask. This web page has the answer. MSSQL"$$"TOLLCONNECT works a treat. Not the most intuitive syntax.
Try replacing your $ with "$$"
Re: Monitor window machine with nrpe using nrpe 5666
Posted: Wed Jun 22, 2016 12:32 pm
by Naveed
Thank you rkennedy for quick reply.
Much appreciated.
I had made the said change and got the following error message.
This error message suggest us to allow nasty charachter= true which is already true.
Failed to open service AOS6001: 1060: The specified service does not exist as an installed service.
Thank you!