#!/bin/sh if [ "$1" = "autoconf" ]; then echo no exit 1 fi if [ "$1" = "config" ]; then echo 'graph_title Snort Avg packets/s' echo 'graph_args --base 1000 -l 0' echo 'graph_vlabel Packets / sec' echo 'graph_scale no' echo 'pktsec.label Packets/second' #echo 'pktsec.warning 80' #echo 'pktsec.critical 92' echo 'graph_category Snort' exit 0 fi echo -n "pktsec.value " echo $( tail -n1 /your/path/to/snort.stats| awk -F, '{ print $5 }') \* 1000|bc -l