Translations of this page:

check_tunnel.pl

Link zum Download: http://members.chello.at/gstangl/nagios/

Das Plugin verwendet SNMP (V1 und V3) um den VPN Tunnel status eines Checkpoint Firewall Clusters zu prüfen.

Leider erweist sich der Checkpoint agent als sehr fehleranfällig, wodurch es nötig war, einige workarounds in das plugin einzubauen, so z.b. kommt es manchmal zu SNMP loops in der Tunnel Status table (enterprises.2620.500.9002).

Tunnels können verschiedenen Status haben:

  • active
  • destroy
  • idle
  • phase1
  • down
  • init

Davon werden „active“ und „phase1“ als OK Zustand, der Rest als CRITICAL zustand alarmiert.

Einbindung des Plugins

Voraussetzung:

  • $USER1$ zeigt auf /usr/local/nagios/libexec
  • Perl in /usr/bin/perl
  • Net::SNMP

checkcommands.cfg

Erklärung: Die wichtigsten parameter des Plugins sind:

  • -C = Community
  • -P = port

# 'check_tunnel' command definition

# args: 1=port, 2=community
define command{
      command_name    check_tunnel
      command_line    $USER1$/check_tunnel.pl -H $HOSTADDRESS$ -p $ARG1$ -C $ARG2$
      }  

services.cfg

Als Beispiel sei hier eine Firewall geprüft, deren Checkpoint SNMP agent auf port 260 läuft. (Bitte die standard parameter wie etwa check_period oder notification_options nach eigenen Bedürfnissen anpassen):

define service{
      host_name                       my_FW_cluster
      service_description             tunnel_status
      is_volatile                     0
      check_period                    24x7
      max_check_attempts              2
      normal_check_interval           9
      retry_check_interval            2
      contact_groups                  FW-admin
      notification_interval           180
      notification_period             24x7
      notification_options            c,r,w
      check_command                   check_tunnel!260!c0mmun1ty!
}

Ausgabe

Beispielhafte Ausgabe des Plugins:

5/5 tunnels active: CNR_OMS, CNR_prov, CNR_WAN, HFW, Office,|Tunnels=5; Termination=normal 

Sonstiges

Exakte Hilfe gibt es hier:

./check_tunnel.pl -h

Siehe dazu auch das Nagios-Wiki HowTo für Checkpoint Firewall Monitoring

by StaGue 19. 07. 2009

nagios/plugins/check_tunnel.pl.txt · Zuletzt geändert: 2009/07/19 23:47 von stague
CC Attribution-Noncommercial-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0