#!/bin/sh

# Proof of concept snort plugin written by Edward Bjarte Fjellskål.

if [ "$1" = "config" ]; then
        echo 'graph_title Snort Alerts'
        echo 'graph_args --base 1000 -l 0'
        echo 'graph_vlabel Alerts / second'
        echo 'graph_scale no'
        echo 'alerts.label Alerts /second'
        #echo 'alerts.warning 10'
        #echo 'alerts.critical 50'
        echo 'graph_category Snort'

        exit 0
fi

echo -n "alerts.value "
echo $( tail -n1 /your/path/to/snort.stats| awk -F, '{ print $4 }')
