[Nagiosplug-help] check_mssql.sh - (No output returned from plugin)

Alexander Brian C brianca at covantage.com
Fri Oct 29 08:15:26 CEST 2004


Check_mssql.sh uses tsql to do the actual check and tsql accepts a -p
parameter to specifiy the port, so I just added that to the
check_mssql.sh file as well as the ones below.  I'll pull it all out and
go back to the default and see if it works.  It's a little disappointing
that Nagios has lost Net Saint's ability to accept customizations.  It
was one of the great things about it.

-----Original Message-----
From: Tom DE BLENDE (GCC) [mailto:Tom.DeBlende at dhl.com] 
Sent: Friday, October 29, 2004 2:25 AM
To: Alexander Brian C
Cc: nagiosplug-help at lists.sourceforge.net
Subject: Re: [Nagiosplug-help] check_mssql.sh - (No output returned from
plugin)

I don't get how you go about that. ports have to be described in
freetds.conf, no? Anyway, try what I posted and verify freetds.conf.

Alexander Brian C wrote:

>I forgot to mention that I added at port variable into the mix here.  I

>have a few boxes on non-standard ports that I'm using the port setting 
>to be able to monitor with the same script.
>
>Take a look at the command line version and you'll see that it works 
>correctly.  Will Nagios not accept changes to the script like this?
> 
>
>-----Original Message-----
>From: Tom DE BLENDE (GCC) [mailto:Tom.DeBlende at dhl.com]
>Sent: Thursday, October 28, 2004 1:58 AM
>To: Alexander Brian C
>Cc: nagiosplug-help at lists.sourceforge.net
>Subject: Re: [Nagiosplug-help] check_mssql.sh - (No output returned 
>from
>plugin)
>
>Hi Alexa
>
>Alexander Brian C wrote:
>
>  
>
>>I have check_mssql.sh running fine from the command line, but I get 
>>(No
>>    
>>
>
>  
>
>>output returned from plugin) in the status information on Nagios.  The

>>status is OK, but the details are missing.
>>
>>Here are some details:
>>
>>
>>COMMAND LINE: 
>>
>>[nagios at bugs plugins]$ check_mssql.sh hubble nagios foo 2000 1433 OK -

>>MS SQL Server 2000 has 15 user(s) connected:  12 covivr, 1 nagios,
>>2 maj.
>> 
>>
>>    
>>
>No need to specify the port here. That is done in freetds.conf. So you
>get:
>
>check_mssql.sh hubble nagios foo 2000
>
>COMMAND.CFG
>
>  
>
>># 'check_mssql.sh' command definition
>>define command{
>>       command_name    check_mssql
>>       command_line    /usr/lib/nagios/plugins/check_mssql.sh -S
>>    
>>
>$ARG1$
>  
>
>>-U $ARG2$ -P $ARG3$ $ARG4$ -p $ARG5$
>>       }
>>
>> 
>>
>>    
>>
>Then this should look like this:
>
># 'check_mssql.sh' command definition
>define command{
>        command_name    check_mssql
>        command_line    /usr/lib/nagios/plugins/check_mssql.sh $ARG1$
>$ARG2$ $ARG3$ $ARG4$
>        }
>
>
>  
>
>>SERVICES.CFG
>>
>>
>>
>>define service{
>>       use                             generic-service         ; Name
>>of service template to use
>>
>>       host_name                       hubble
>>       service_description             SQL monitor
>>       is_volatile                     0
>>       check_period                    24x7
>>       max_check_attempts              3
>>       normal_check_interval           3
>>       retry_check_interval            1
>>       contact_groups                  admins
>>       notification_interval           120
>>       notification_period             24x7
>>       notification_options            w,u,c,r
>>       check_command
>>check_mssql!hubble!nagios!foo!2000!1433
>>       register                        1
>>       }
>>
>>    
>>
>
>And finally:
>
>define service{
>        use                             generic-service         ; Name
>of service template to use
>
>        host_name                       hubble
>        service_description             SQL monitor
>        is_volatile                     0
>        check_period                    24x7
>        max_check_attempts              3
>        normal_check_interval           3
>        retry_check_interval            1
>        contact_groups                  admins
>        notification_interval           120
>        notification_period             24x7
>        notification_options            w,u,c,r
>        check_command
>check_mssql!hubble!nagios!foo!2000
>        register                        1
>        }
>
>
>Try this ;-)
>
>Tom
>
>
>
>
>-----This electronic message transmission, including any attachments,
contains information from Covantage which may be confidential or
privileged.. The information is intended to be for the use of the
individual or entity named above. If you are not the intended recipient,
be aware that any disclosure, copying, distribution or use of the
contents of this information is prohibited.
>
>If you have received this electronic transmission in error, please
notify the sender immediately by a "reply to sender only" message and
destroy all electronic and hard copies of the communication, including
attachments.
>
>
>=====
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by:
>Sybase ASE Linux Express Edition - download now for FREE LinuxWorld 
>Reader's Choice Award Winner for best database on Linux.
>http://ads.osdn.com/?ad_idU88&alloc_id065&op=click
>_______________________________________________
>Nagiosplug-help mailing list
>Nagiosplug-help at lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
>::: Please include plugins version (-v) and OS when reporting any
issue. 
>::: Messages without supporting info will risk being sent to /dev/null
>
>
>  
>





-----This electronic message transmission, including any attachments, contains information from Covantage which may be confidential or privileged. The information is intended to be for the use of the individual or entity named above. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited.

If you have received this electronic transmission in error, please notify the sender immediately by a "reply to sender only" message and destroy all electronic and hard copies of the communication, including attachments.


=====




More information about the Help mailing list