This is being written for a client who has an OpenBSD router using 2 Internet connections, both of which have monthly usage limits.
I expect when done it will do the following:
1) count the total usage of Internet on an interface since it was last reset
2) do a simple math calculation to see if the interface is currently over or under its usage alloted for the month. If over as a function of time, warn, if over absolutely - critical
3) reset the counter as needed
The underlying command used to get the data is `pfctl -vvsI -i <interface>`
There will no doubt need to be a sudoers rule so that the nagios user can run the check
There will have to be a /tmp file where the data is stored
Arguments:
time interval to reset the counter... daily and monthly are the only options I need however it could maybe be done in cron format? or maybe something simplyer like m010000 for the first of the month at midnight and/or d1300 for daily at 1:00PM?
interface
number of bytes alloted per usage period (from above)