Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_conntrack.sh
Meet The New Nagios Core Services Platform
Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.
Monitoring Made Magically Better
- Nagios Core on Overdrive
- Powerful Monitoring Dashboards
- Time-Saving Configuration Wizards
- Open Source Powered Monitoring On Steroids
- And So Much More!
This plugins checks /proc/sys/net/ipv4/netfilter/ip_conntrack_count and warns you if count is higher than the established threshold.
The warn and critical thresholds are arguments to the script.
It also provides performance data.
# Version history
#
# 0.1: First release
# 0.2: The path /proc/sys/net/ipv4/netfilter/ip_conntrack_count may be
# differtent in each distribution, so now the script searchs for it.
#
The warn and critical thresholds are arguments to the script.
It also provides performance data.
# Version history
#
# 0.1: First release
# 0.2: The path /proc/sys/net/ipv4/netfilter/ip_conntrack_count may be
# differtent in each distribution, so now the script searchs for it.
#
Reviews (2)
byGldRush98, September 26, 2017
Worked out of the box and did exactly what I needed. I just did a quick Spanish to English translation on some of the outputs and was good to go.
byowenmarinas, December 20, 2012
Hi,
this bug https://bugzilla.redhat.com/show_bug.cgi?id=552522 force me to graph not only the usage but also the MAX.
this is the diff with the original
diff check_conn2 check_conntrack.sh
42c42
echo "OK - $COUNT |con=$COUNT"
48c48
echo "WARNING - $COUNT |con=$COUNT"
53c53
echo "CRITICAL - $COUNT |con=$COUNT"
and this is the template for nagios
cat /usr/share/nagios/html/pnp4nagios/templates/check_conntrack.php
DS;
$opt[$i] = "--vertical-label \"ip-conntrack \" -l 0 -r --title \"ip-conntrack metrics for $hostname / $servicedesc\" ";
$def[$i] = '';
$color1 = '#028482';
$color3 = '#B5FF6C';
$def[$i] .= rrd::def ("ipconn-now", $DS[0]['RRDFILE'], $DS[0]['DS'], "AVERAGE") ;
$def[$i] .= rrd::def ("ipconn-max", $DS[1]['RRDFILE'], $DS[1]['DS'], "AVERAGE") ;
$def[$i] .= rrd::area ("ipconn-max", $color3, 'Total' );
$def[$i] .= rrd::gprint ("ipconn-max", array("LAST","MAX","AVERAGE"), "%4.3lf %S".$DS[0]['UNIT']);
$def[$i] .= rrd::line1 ("ipconn-now", $color1, "LastMin " );
$def[$i] .= rrd::gprint ("ipconn-now", array("LAST","MAX","AVERAGE"), "%4.3lf %S".$DS[1]['UNIT']);
?>
regards
Owenmarinas [at] gmail com
this bug https://bugzilla.redhat.com/show_bug.cgi?id=552522 force me to graph not only the usage but also the MAX.
this is the diff with the original
diff check_conn2 check_conntrack.sh
42c42
echo "OK - $COUNT |con=$COUNT"
48c48
echo "WARNING - $COUNT |con=$COUNT"
53c53
echo "CRITICAL - $COUNT |con=$COUNT"
and this is the template for nagios
cat /usr/share/nagios/html/pnp4nagios/templates/check_conntrack.php
DS;
$opt[$i] = "--vertical-label \"ip-conntrack \" -l 0 -r --title \"ip-conntrack metrics for $hostname / $servicedesc\" ";
$def[$i] = '';
$color1 = '#028482';
$color3 = '#B5FF6C';
$def[$i] .= rrd::def ("ipconn-now", $DS[0]['RRDFILE'], $DS[0]['DS'], "AVERAGE") ;
$def[$i] .= rrd::def ("ipconn-max", $DS[1]['RRDFILE'], $DS[1]['DS'], "AVERAGE") ;
$def[$i] .= rrd::area ("ipconn-max", $color3, 'Total' );
$def[$i] .= rrd::gprint ("ipconn-max", array("LAST","MAX","AVERAGE"), "%4.3lf %S".$DS[0]['UNIT']);
$def[$i] .= rrd::line1 ("ipconn-now", $color1, "LastMin " );
$def[$i] .= rrd::gprint ("ipconn-now", array("LAST","MAX","AVERAGE"), "%4.3lf %S".$DS[1]['UNIT']);
?>
regards
Owenmarinas [at] gmail com