Page 1 of 2
Add new windows service in nagios
Posted: Mon Dec 16, 2013 8:32 am
by rameshbabu_rj
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
Re: Add new windows service in nagios
Posted: Mon Dec 16, 2013 10:47 am
by slansing
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?
Re: Add new windows service in nagios
Posted: Tue Dec 17, 2013 12:40 am
by rameshbabu_rj
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.
Re: Add new windows service in nagios
Posted: Tue Dec 17, 2013 10:59 am
by sreinhardt
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.
Re: Add new windows service in nagios
Posted: Wed Dec 18, 2013 5:35 am
by rameshbabu_rj
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
Re: Add new windows service in nagios
Posted: Wed Dec 18, 2013 10:57 am
by sreinhardt
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.
Re: Add new windows service in nagios
Posted: Thu Dec 19, 2013 7:01 am
by rameshbabu_rj
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
Re: Add new windows service in nagios
Posted: Thu Dec 19, 2013 11:37 am
by lmiltchev
You need to specify the path to the plugin in your command... Normally it is defined this way:
Code: Select all
# 'check_tcp' command definition
define command{
command_name check_tcp
command_line $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$
}
If you want to use it with hardcoded values, you can try:
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
}
Re: Add new windows service in nagios
Posted: Thu Mar 06, 2014 6:32 pm
by thetechguy
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
Re: Add new windows service in nagios
Posted: Fri Mar 07, 2014 10:46 am
by slansing
and this
# 'check_tcp' command definition
define command{
command_name check_tcp
command_line $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$
}
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.