Translations of this page:

check_snmp_cpfw.pl

Link zum Download: http://www.manubulon.com/nagios/ or http://patrick.proy.free.fr/nagios/index_commands.html

Das Plugin verwendet SNMP (V1 und V3) um Checkpoint FW-1 firewalls zu prüfen.

Es werden folgende Status checks unterstützt:

  • Firewall Status
  • High Availability Status (active/standby)
  • SVN Status
  • Anzahl an Verbindungen (warn/crit)
  • Policy checks
  • Management Stations status

Im Vergleich zur aktuellen Version 1.2.1 wurde die Zeile 550 für Performace Daten Ausgabe etwas abgeändert:

        $f_print .= " | fw_connexions=".$perf_conn.";".$o_warn.";".$o_crit.";0;0";

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
  • swa = Benennung der durchzuführenden checks (siehe –help)
  • -c = Anzahl der Verbindungen (warn,crit)
  • -f = Ausgabe von Performancedaten
# Defintition of Checkpoint FW-1 Status check
# parameters: 1=port
#	        2=community
#	        3=options swa or wa or .. (see help)
#	        4=#conn thresholds warn,crit e.g. 100,120
define command{
      command_name    check_firewall_status
      command_line    $USER1$/check_snmp_cpfw.pl -H $HOSTADDRESS$ -P $ARG1$ -C $ARG2$ -$ARG3$ -c $ARG4$ -f
      }

services.cfg

Als Beispiel sei hier eine Firewall geprüft, deren Checkpoint SNMP agent auf port 260 läuft und bei mehr als 200 Verbindungen alarmieren soll. (Bitte die stanrad parameter wie etwa check_perion oder notifcation_options nach eigenen bedürfnissen anpassen):

define service{
      host_name                       xxxxxxxxxx
      service_description             Firewall_status
      is_volatile                     0
      check_period                    24x7
      max_check_attempts              3
      normal_check_interval           5
      retry_check_interval            2
      contact_groups                  fw-admins
      notification_interval           180
      notification_period             24x7
      notification_options            c,r,w
      check_command                   check_firewall_status!260!community!swa!200,240
} 

Ausgabe

Beispielhafte Ausgabe des Plugins:

FW: OK / SVN: OK / High Availability: OK / CPFW Status: OK, 80 connections

Beispielhafte Performance Daten:

fw_connexions=80;200;240;0;0

Einbindung NagiosGrapher

Obwohl die Performance Daten nicht berauschend sind, so kann man doch eine History über die Anzahl an aktiven Verbindungen mittels NagiosGrapher erstellen lassen.

Mein Vorschlag zur NagiosGrapher Konfiguration:

# Firewall_connections #############################################
# take from e.g. "FW: OK / SVN: OK / High Availability: OK / CPFW Status: OK, 1432 connections | fw_connexions=1432;2000;2500;0;0"
define ngraph{
      service_name            Firewall_status
      graph_perf_regex        fw_connexions=(\d+)
      graph_value             connections
      graph_units
      graph_legend            ' FW connections'
      rrd_plottype            LINE2
      rrd_color               103080
      }
define ngraph{
      service_name            Firewall_status
      type                    GPRINT
      print_source            connections
      print_description       Current:
      print_function          LAST
      print_format            %4.0lf
      }
define ngraph{
      service_name            Firewall_status
      type                    GPRINT
      print_source            connections
      print_description       Maximum:
      print_function          MAX
      print_format            %4.0lf connections
      }

Beispiel:

NagiosGrapher Beispiel für Firewall Connections

Sonstiges

Exakte Hilfe gibt es hier: ./check_snmp_cpfw.pl –help

oder unter: http://nagios.manubulon.com/snmp_cpfw.html

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

by StaGue 20.10.2007

nagios/plugins/check_snmp_cpfw.pl.txt · Zuletzt geändert: 2009/07/19 23:15 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