Inhaltsverzeichnis

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:

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

Einbindung des Plugins

Voraussetzung:

checkcommands.cfg

Erklärung: Die wichtigsten parameter des Plugins sind:

# '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