Loading ...
Sorry, an error occurred while loading the content.

Re: Nagios and SMS

Expand Messages
  • Charles Richmond
    My apologies for beeing so far behind in reading ce-gnu-lug. I am running one Nagios node (2 sensor systems and a master) as part of a worldwide redundant
    Message 1 of 4 , Jan 1, 2009
    • 0 Attachment
      My apologies for beeing so far behind in reading ce-gnu-lug. I am
      running one Nagios node (2 sensor systems and a master) as part of a
      worldwide redundant system. Here locally we have 217 systems with 1281
      services being checked by the load split sensors and the master which
      is redundant geographically is monitoring 1353 systems and 9811
      services. We use different plugins for SMS service depending on
      geographic location. Here in RP we have an email to SMS gateway and
      use the following (edited for confidentiality):

      misccommands.cfg (note the qpage entries are not used)
      ...
      define command{
      command_name host-notify-by-sms-ceb
      command_line /usr/bin/printf " $SERVICENOTES$ $SERVICEOUTPUT$\n"
      | /bin/mai
      lx -s "$HOSTNAME$ $SERVICEDESC$ $SERVICESTATE$" $CONTACTEMAIL$

      }
      define command{
      command_name notify-by-sms-ceb
      command_line /usr/bin/printf " $SERVICENOTES$ $SERVICEOUTPUT$\n"
      | /bin/mai
      lx -s "$HOSTNAME$ $SERVICEDESC$ $SERVICESTATE$" $CONTACTEMAIL$

      }
      define command{
      command_name host-notify-by-qpage-ceb
      command_line /opt/LXKqpage/bin/qpage -f "nagios" -s snpp -p
      $CONTACTPAGER$
      ' T: $NOTIFICATIONTYPE$ H: $HOSTNAME$ $HOSTSTATE$ $HOSTNOTES$
      $HOSTOUTPUT$'

      }
      define command{
      command_name notify-by-qpage-ceb
      command_line /opt/LXKqpage/bin/qpage -f "nagios" -s snpp -p
      $CONTACTPAGER$
      ' T: $NOTIFICATIONTYPE$ H: $HOSTNAME$ S: $SERVICEDESC$ $SERVICESTATE$
      $SERVICENO
      TES$ $SERVICEOUTPUT$'

      }
      ....

      *********************************
      contacts.cfg
      *********************************

      define contact{
      contact_name xxxx-sms
      alias xxxx-sms
      host_notification_period 24x7
      host_notification_options d,r,u,f
      host_notification_commands host-notify-by-sms-ceb
      service_notification_period 24x7
      service_notification_options c,r,u,f
      service_notification_commands notify-by-sms-ceb
      email 0917xxxxx@...
      }

      *********************************
      escalations.cfg
      *********************************
      ...
      define hostescalation{
      hostgroup_name cebu-tier1
      first_notification 1
      last_notification 0
      contact_groups cebu-admins-tier1
      notification_interval 60
      }
      define hostescalation{
      hostgroup_name cebu-tier1
      first_notification 8
      last_notification 8
      contact_groups cebu-8hour-escal
      notification_interval 60
      escalation_options d,u
      }
      define hostescalation{
      hostgroup_name cebu-tier1
      first_notification 24
      last_notification 24
      contact_groups cebu-24hour-escal
      notification_interval 60
      escalation_options d,u
      }

      ********************************
      contactgroups.cfg
      ********************************

      ...
      define contactgroup{
      contactgroup_name cebu-8hour-escal
      alias cebu-8hour-escal
      members xxx-sms,xxxx-sms,xxxx-sms,rt-mail
      }
      define contactgroup{
      contactgroup_name cebu-24hour-escal
      alias cebu-24hour-escal
      members xxx-sms,xxxx-sms,xxxx-sms,xxxx-sms
      }
    Your message has been successfully submitted and would be delivered to recipients shortly.