Monitor window machine with nrpe using nrpe 5666

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Naveed
Posts: 285
Joined: Mon May 30, 2016 10:10 am

Monitor window machine with nrpe using nrpe 5666

Post 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!
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Monitor window machine with nrpe using nrpe 5666

Post 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.
Former Nagios Employee
Naveed
Posts: 285
Joined: Mon May 30, 2016 10:10 am

Re: Monitor window machine with nrpe using nrpe 5666

Post 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!
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Monitor window machine with nrpe using nrpe 5666

Post by hsmith »

Former Nagios Employee.
me.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Monitor window machine with nrpe using nrpe 5666

Post 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/
Former Nagios Employee
Naveed
Posts: 285
Joined: Mon May 30, 2016 10:10 am

Re: Monitor window machine with nrpe using nrpe 5666

Post 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!
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Monitor window machine with nrpe using nrpe 5666

Post by rkennedy »

Try following what @hsmith mentioned to see if his method will work for you. Let us know how it goes.
Former Nagios Employee
Naveed
Posts: 285
Joined: Mon May 30, 2016 10:10 am

Re: Monitor window machine with nrpe using nrpe 5666

Post by Naveed »

Dear rkennedy


I Could not understand what you have suggested?

Kindly explain please.

Thank you!
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Monitor window machine with nrpe using nrpe 5666

Post 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 "$$"
Former Nagios Employee
Naveed
Posts: 285
Joined: Mon May 30, 2016 10:10 am

Re: Monitor window machine with nrpe using nrpe 5666

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