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:
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";
Voraussetzung:
Erklärung: Die wichtigsten parameter des Plugins sind:
# 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
}
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
}
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
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:
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