Sybase check on windows servers

Florent HOUBART Florent.HOUBART at Ajilon.fr
Mon Jun 25 13:24:22 CEST 2007


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_name    check_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 :
host1    Sybase       OK: SYBSQL_host1
host2    Sybase       OK: SYBSQL_host2



Best regards,

Florent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20070625/290241bf/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
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/
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at 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


More information about the Users mailing list