Add new windows service in nagios
-
rameshbabu_rj
- Posts: 4
- Joined: Mon Dec 16, 2013 8:09 am
Add new windows service in nagios
Successfully I have configured Nagios between Linux server (nagios server) and remote windows (nagios client) machine.
And able to getting e-mail notification for all template services like Uptime, CPU Load, Memory Usage..etc. Now I wants to add a new window service which is running it on remote window machine (like web sphere service, port service, webURL service ..etc). Please let me know how to add those services?
Thanks,
Ramesh
And able to getting e-mail notification for all template services like Uptime, CPU Load, Memory Usage..etc. Now I wants to add a new window service which is running it on remote window machine (like web sphere service, port service, webURL service ..etc). Please let me know how to add those services?
Thanks,
Ramesh
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Add new windows service in nagios
All you will need to do is add a new command using the check_nt check process command, can you copy one of your current windows service configs and paste it in here so we can see how you formatted your checks?
-
rameshbabu_rj
- Posts: 4
- Joined: Mon Dec 16, 2013 8:09 am
Re: Add new windows service in nagios
Eg:
define service{
use generic-service
host_name winserver, GLV3server, GLV1server
service_description CPU Load
check_command check_nt!CPULOAD!-l 5,80,90
}
For checking the new services like websphere, port and weblink which are running on windows mechine, kindly let me know how to add those services into windows.cfg file.
define service{
use generic-service
host_name winserver, GLV3server, GLV1server
service_description CPU Load
check_command check_nt!CPULOAD!-l 5,80,90
}
For checking the new services like websphere, port and weblink which are running on windows mechine, kindly let me know how to add those services into windows.cfg file.
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Add new windows service in nagios
I would suggest looking at the checksystem\checkservicestate page from nsclient docs. http://www.nsclient.org/nscp/wiki/Check ... rviceState It contains the nagios command definition that you would need to apply, and the nsclient changes that might be needed.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
-
rameshbabu_rj
- Posts: 4
- Joined: Mon Dec 16, 2013 8:09 am
Re: Add new windows service in nagios
Thanks for update.
Now i have installed nagios core server on linux mechine and installed nagios client (NSclient++) on remote windows. In remote windows i using websphere admin console url like" https://localhost:9043/ibm/console/. my question is how to add 9013 port on nagios. if 9013 port is down then i will get notification mail. please tell me know how to add this port service in nagios. And explain me step by step because of im new to nagios.
Thanks,
Ramesh
Now i have installed nagios core server on linux mechine and installed nagios client (NSclient++) on remote windows. In remote windows i using websphere admin console url like" https://localhost:9043/ibm/console/. my question is how to add 9013 port on nagios. if 9013 port is down then i will get notification mail. please tell me know how to add this port service in nagios. And explain me step by step because of im new to nagios.
Thanks,
Ramesh
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Add new windows service in nagios
Well, this would be totally separate from nsclient checks, but you can just use the check_tcp or check_udp and its flags to validate that 9013 is open. Additionally, you could use check_http with that port specified and do something like a string check to validate that you are getting the correct page or correct response.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
-
rameshbabu_rj
- Posts: 4
- Joined: Mon Dec 16, 2013 8:09 am
Re: Add new windows service in nagios
I tried the below code
define command{
command_name check_tcp
command_line check_tcp -H 80.90.00.179 -p 199 -s ALIVE
}
In nagios core webpage im getting error like "(Return code of 127 is out of bounds - plugin may be missing) ". i tried to fix this issue, but couldn't. Kindly let me know how to fix this issue?
Thanks,
Ramesh
define command{
command_name check_tcp
command_line check_tcp -H 80.90.00.179 -p 199 -s ALIVE
}
In nagios core webpage im getting error like "(Return code of 127 is out of bounds - plugin may be missing) ". i tried to fix this issue, but couldn't. Kindly let me know how to fix this issue?
Thanks,
Ramesh
Re: Add new windows service in nagios
You need to specify the path to the plugin in your command... Normally it is defined this way:
If you want to use it with hardcoded values, you can try:
Code: Select all
# 'check_tcp' command definition
define command{
command_name check_tcp
command_line $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$
}Code: Select all
define command{
command_name check_tcp
command_line /path/to/your/plugins/directory/check_tcp -H 80.90.00.179 -p 199 -s ALIVE
}Be sure to check out our Knowledgebase for helpful articles and solutions!
-
thetechguy
- Posts: 25
- Joined: Wed Feb 12, 2014 5:05 pm
Re: Add new windows service in nagios
I am also having a problem with this plugin.. I used my previous definition from my 3.0 Nagois host and copied them to my new 4.0.3 Nagios host and here is my errors.
Current Status: UNKNOWN (for 3d 4h 1m 35s) (Has been acknowledged)
Status Information: Usage:
check_tcp -H host -p port [-w <warning time>] [-c <critical time>] [-s <send string>]
[-e <expect string>] [-q <quit string>][-m <maximum bytes>] [-d <delay>]
[-t <timeout seconds>] [-r <refuse state>] [-M <mismatch state>] [-v] [-4
here are my definition
define service{
use nix_service
host_name server1,server2,server3
service_description Proxy port 8080 check
retry_interval 5
notification_interval 0
check_command check_tcp
}
I also have this as a definition
define command{
command_name check_telnet
command_line /usr/local/nagios/libexec/check_tcp -H $HOSTADDRESS$ -p 23 -w 4 -c 6 -t 10 -4 -r crit
}
and this
# 'check_tcp' command definition
define command{
command_name check_tcp
command_line $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$
}
any help is appreciated.
Thank you
Jon
Current Status: UNKNOWN (for 3d 4h 1m 35s) (Has been acknowledged)
Status Information: Usage:
check_tcp -H host -p port [-w <warning time>] [-c <critical time>] [-s <send string>]
[-e <expect string>] [-q <quit string>][-m <maximum bytes>] [-d <delay>]
[-t <timeout seconds>] [-r <refuse state>] [-M <mismatch state>] [-v] [-4
here are my definition
define service{
use nix_service
host_name server1,server2,server3
service_description Proxy port 8080 check
retry_interval 5
notification_interval 0
check_command check_tcp
}
I also have this as a definition
define command{
command_name check_telnet
command_line /usr/local/nagios/libexec/check_tcp -H $HOSTADDRESS$ -p 23 -w 4 -c 6 -t 10 -4 -r crit
}
and this
# 'check_tcp' command definition
define command{
command_name check_tcp
command_line $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$
}
any help is appreciated.
Thank you
Jon
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Add new windows service in nagios
If you are actually using this command, you need to define the required flags and values via $ARG1$ and $ARG2$, to begin with, test the check_tcp plugin from your nagios server's command line, and sculpt a command there, that will check what you need it to.and this
# 'check_tcp' command definition
define command{
command_name check_tcp
command_line $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$
}