new service

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Mani.Murugesan
Posts: 67
Joined: Fri May 12, 2017 1:37 am

new service

Post by Mani.Murugesan »

Hello Team,

recently I got a requirement that is for abc.exe
abc.exe is a service
but I tried to configure this service in my nagios I am getting Failed to open service abc : 1060: The specified service does not exist as an installed service

In windows abc service is server is already running

Could you please help me to resolve this issue ?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: new service

Post by scottwilkerson »

what is the service called if you run the following command from the windows command line?

Code: Select all

net start
This is what you would use as the service, not abc.exe
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Mani.Murugesan
Posts: 67
Joined: Fri May 12, 2017 1:37 am

Re: new service

Post by Mani.Murugesan »

you are saying the below command will display the service name we need to use that service name in nagios configuration I mean

In -l option I need to mention right ?

/usr/local/nagios/libexec/check_nt -H <ip> -s "****" -p 12489 -v SERVICESTATE -l <service name> -d SHOWALL
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: new service

Post by lmiltchev »

Yes, use the name that you see in the CMD in your command:

Code: Select all

/usr/local/nagios/libexec/check_nt -H <ip> -s "****" -p 12489 -v SERVICESTATE -l <service name> -d SHOWALL
Keep in mind that if you have spaces and/or special characters in the name, you may need to wrap the name in single quotes.

Examples:

Not working:

Code: Select all

./check_nt -H x.x.x.x -s password -p 12489 -v SERVICESTATE -l Windows Audio -d SHOWALL
 Failed to open service Windows: 424: The specified service does not exist as an installed service.
Working:

Code: Select all

./check_nt -H  x.x.x.x -s password -p 12489 -v SERVICESTATE -l 'Windows Audio' -d SHOWALL
 Windows Audio: Started
Be sure to check out our Knowledgebase for helpful articles and solutions!
Mani.Murugesan
Posts: 67
Joined: Fri May 12, 2017 1:37 am

Re: new service

Post by Mani.Murugesan »

Thanks for your quick response .

I will get back to you soon
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: new service

Post by lmiltchev »

Noted.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Mani.Murugesan
Posts: 67
Joined: Fri May 12, 2017 1:37 am

Re: new service

Post by Mani.Murugesan »

Hello Team,

one more information the below service I have mentioned abc.exe(not original name) that is application they said like a this is not a service but in type it's showing .exe but In nagios how we can achieved this ?

Could you please help me ?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: new service

Post by lmiltchev »

With NSClient++ you can monitor services and processes. You could use a command as such:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H x.x.x.x -p 5666 -c check_process -a "process=abc.exe"
Example:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H x.x.x.x -p 5666 -c check_process -a "process=cmd.exe" "warn=count>2" "crit=count>3"
OK: all processes are ok.|'count'=1;2;3
Be sure to check out our Knowledgebase for helpful articles and solutions!
Mani.Murugesan
Posts: 67
Joined: Fri May 12, 2017 1:37 am

Re: new service

Post by Mani.Murugesan »

Hello ,

I will check and confirm the same .
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: new service

Post by scottwilkerson »

Mani.Murugesan wrote:Hello ,

I will check and confirm the same .
Sounds good.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked