[Nagios-users] RE : Sybase check on windows servers
Hi, >You are right. Any command I try to run through command prompt is giving >me the same error. Although its showing ok in the web interface. > >I do not understand why this is happening. > >Some examples of commands I tried to run through command prompt- > >./check_nt -H machine1 -v UPTIME > >./check_nt -H machine1 -v SERVICESTATE -l MSSQLSERVER > >Although the same command is defined in services.cfg and it is giving >the right output in web interface. Can you send me exactly what is defined in your configuration files (host, service and command) and the tests you did in command line with the result ? Normally the result should be the same in command line than what Nagios do. Regards, Florent - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] RE : Sybase check on windows servers
Hi, You are right. Any command I try to run through command prompt is giving me the same error. Although its showing ok in the web interface. I do not understand why this is happening. Some examples of commands I tried to run through command prompt- ./check_nt -H machine1 -v UPTIME ./check_nt -H machine1 -v SERVICESTATE -l MSSQLSERVER Although the same command is defined in services.cfg and it is giving the right output in web interface. Please help. Lalita From: Florent HOUBART [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 26, 2007 1:11 PM To: Lalita Drolia Cc: nagios-users@lists.sourceforge.net Subject: RE : [Nagios-users] Sybase check on windows servers Hi, >I installed nsclient++. The port is open because it is performing other >checks. > >And I had tried with -p. but still the same error. Did you try the other check though NSClient in command line to be sure there is nothing we miss ? Can you send me the command you run, and some definition of other commands which are working ? Florent Notice: This email message, together with any attachments, may contain information of BEA Systems, Inc., its subsidiaries and affiliated entities, that may be confidential, proprietary, copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it.- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
[Nagios-users] RE : Sybase check on windows servers
Hi, >I installed nsclient++. The port is open because it is performing other >checks. > >And I had tried with -p. but still the same error. Did you try the other check though NSClient in command line to be sure there is nothing we miss ? Can you send me the command you run, and some definition of other commands which are working ? Florent - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] RE : Sybase check on windows servers
I installed nsclient++. The port is open because it is performing other checks. And I had tried with -p. but still the same error. From: Florent HOUBART [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 26, 2007 12:45 PM To: Lalita Drolia Cc: nagios-users@lists.sourceforge.net Subject: RE : [Nagios-users] Sybase check on windows servers Hi, >Your last mail helped me to clear my concepts. Thank you :-) Happy it can help you ! > >I am trying check_nt from the command line now, with the instructions >you gave. > >But I am getting the error "Connection refused. Could not fetch >information from server." > >Unable to fix that. It means that the port on your Windows server is closed. Did you installed NSClient, NC_NET or something like that on it ? Or maybe the port you specified on your Windows server is not the default 1248. In this case, you should use the -p flag in check_nt. Regards, Florent Notice: This email message, together with any attachments, may contain information of BEA Systems, Inc., its subsidiaries and affiliated entities, that may be confidential, proprietary, copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it.- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
[Nagios-users] RE : Sybase check on windows servers
Hi, >Your last mail helped me to clear my concepts. Thank you :-) Happy it can help you ! > >I am trying check_nt from the command line now, with the instructions >you gave. > >But I am getting the error "Connection refused. Could not fetch >information from server." > >Unable to fix that. It means that the port on your Windows server is closed. Did you installed NSClient, NC_NET or something like that on it ? Or maybe the port you specified on your Windows server is not the default 1248. In this case, you should use the -p flag in check_nt. Regards, Florent - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] RE : Sybase check on windows servers
Florent, Thank you so much for being patient with me. I tried what you said. But unfortunately I am still getting the error "return code of 139 is out of bounds". Here is my configuration- Hostgroups.cfg- define hostgroup{ hostgroup_namesybasetest alias Sybase Servers Test members ganges,nila } Commands.cfg- define command{ command_namecheck_sybase command_line $USER1$/check_nt -v SERVICESTATE -d SHOWALL -l $ARG1$ $ARG2$ } Services.cfg- define service{ use local-service hostgroup_name sybasetest service_description Sybase check_command check_sybase!0!SYBSQL_$HOSTNAME$ } Kindly help. Regards, Lalita From: Florent HOUBART [mailto:[EMAIL PROTECTED] Sent: Monday, June 25, 2007 4:54 PM To: Lalita Drolia Cc: nagios-users@lists.sourceforge.net Subject: RE : [Nagios-users] Sybase check on windows servers Hi, >I am using nagios2.9 and Nagios plugins 1.4.9. > >I have made a hostgroup for Sybase servers of the sort- > >define hostgroup{ >hostgroup_name sybase >alias Sybase Servers >members machine1,machine2,machine3,machine4,machine5 >} > >Now I want to know if its possible to define a single service for all >these machines as the service name differs in each server because it is- >Sybsql-machine1,sybsql_machine2,sybsql_machine3 etc. > >Can you please also provide me help on command definition and service >definition for Sybase check on linux machines. Here is a small test I done to validate that using HOSTNAME in serice definition is OK. You can adapt this exemple with your real commands. I use the dummy check to verify if the hostname is well read by the command. This plugin take in first argument the return value, and in second the status message. I have two hosts, host1 and host2, and a hostgroup containing the two hosts. I then define the service on the hostgroup. I use the $HOSTNAME$ macro in service definition to specify parameters. ## # Command definition # 'check_dummy' command definition define command{ command_namecheck_dummy command_line$USER1$/check_dummy $ARG1$ $ARG2$ } ## # hosts definition definition define host{ use linux-server host_name host1 alias Host1 address 127.0.0.1 } define host{ use linux-server host_name host2 alias Host2 address 127.0.0.1 } ## # Hostgroup definition define hostgroup{ hostgroup_name Sybase ; The name of the hostgroup alias Sybase servers ; Long name of the group members host1,host2 ; Comma separated list of hosts that belong to this group } ## # Service definition define service{ use local-service hostgroup_name Sybase ; I specify here the hostgroup service_description Sybase check_command check_dummy!0!SYBSQL_$HOSTNAME$ ; The $HOSTNAME$ will be replaced by Nagios by the name of the host } In nagios console, I then have : host1Sybase OK: SYBSQL_host1 host2Sybase OK: SYBSQL_host2 Best regards, Florent Notice: This email message, together with any attachments, may contain information of BEA Systems, Inc., its subsidiaries and affiliated entities, that may be confidential, proprietary, copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it.- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
[Nagios-users] RE : Sybase check on windows servers
Hi, >I am using nagios2.9 and Nagios plugins 1.4.9. > >I have made a hostgroup for Sybase servers of the sort- > >define hostgroup{ >hostgroup_name sybase >alias Sybase Servers >members machine1,machine2,machine3,machine4,machine5 >} > >Now I want to know if its possible to define a single service for all >these machines as the service name differs in each server because it is- >Sybsql-machine1,sybsql_machine2,sybsql_machine3 etc. > >Can you please also provide me help on command definition and service >definition for Sybase check on linux machines. Here is a small test I done to validate that using HOSTNAME in serice definition is OK. You can adapt this exemple with your real commands. I use the dummy check to verify if the hostname is well read by the command. This plugin take in first argument the return value, and in second the status message. I have two hosts, host1 and host2, and a hostgroup containing the two hosts. I then define the service on the hostgroup. I use the $HOSTNAME$ macro in service definition to specify parameters. ## # Command definition # 'check_dummy' command definition define command{ command_namecheck_dummy command_line$USER1$/check_dummy $ARG1$ $ARG2$ } ## # hosts definition definition define host{ use linux-server host_name host1 alias Host1 address 127.0.0.1 } define host{ use linux-server host_name host2 alias Host2 address 127.0.0.1 } ## # Hostgroup definition define hostgroup{ hostgroup_name Sybase ; The name of the hostgroup alias Sybase servers ; Long name of the group members host1,host2 ; Comma separated list of hosts that belong to this group } ## # Service definition define service{ use local-service hostgroup_name Sybase ; I specify here the hostgroup service_description Sybase check_command check_dummy!0!SYBSQL_$HOSTNAME$ ; The $HOSTNAME$ will be replaced by Nagios by the name of the host } In nagios console, I then have : host1Sybase OK: SYBSQL_host1 host2Sybase OK: SYBSQL_host2 Best regards, Florent - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] RE : Sybase check on windows servers
Hi Florent, Thank you for your help. I tried what you said. But I am still not sure what I need to put in services.cfg. For the hosts I have made a hostgroup by the name "Sybase" in hostgroups.cfg. I want it to pick names from this group and display result for all. So my services.cfg looks like- Define service{ Use local-service Hostgroup_nameSybase Service_descriptionsybasesql Check_command check_sybase I know this is wrong. And it is giving me the error "return code of 139 is out of bounds." On the web interface. Can u please help with this? Regards, Lalita From: Florent HOUBART [mailto:[EMAIL PROTECTED] Sent: Friday, June 22, 2007 5:15 PM To: Lalita Drolia Cc: nagios-users@lists.sourceforge.net Subject: RE : [Nagios-users] Sybase check on windows servers Hello Lalita, > >This means I will have to pass that particular service name individually >to check_nt. You can use Nagios macros for this. Use $HOSTNAME$ to get the name of the service's associatehost. For this to work, you have of course to name your host with their hostname. >Is there any way to resolve this so that I can just mention the >hostgroup name and need not write separate checks. You may have to define a command to use this macro, like the following : define command { command_name check_sybase command_line /usr/local/nagios/libexec/check_nt -v SERVICESTATE -d SHOWALL -l STBSQL_$HOSTNAME$ } and use this command in your service definition. Hope it will help, Florent Notice: This email message, together with any attachments, may contain information of BEA Systems, Inc., its subsidiaries and affiliated entities, that may be confidential, proprietary, copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it.- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
[Nagios-users] RE : Sybase check on windows servers
Hello Lalita, > >This means I will have to pass that particular service name individually >to check_nt. You can use Nagios macros for this. Use $HOSTNAME$ to get the name of the service's associated host. For this to work, you have of course to name your host with their hostname. >Is there any way to resolve this so that I can just mention the >hostgroup name and need not write separate checks. You may have to define a command to use this macro, like the following : define command { command_name check_sybase command_line /usr/local/nagios/libexec/check_nt -v SERVICESTATE -d SHOWALL -l STBSQL_$HOSTNAME$ } and use this command in your service definition. Hope it will help, Florent - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null