[mrtg] resetting graphs periodically (i.e. monthly)

Brian J. Murrell brian at interlinx.bc.ca
Wed Mar 31 06:27:11 CEST 2010

I want to "gauge" (pun intended) various usages on a month-to-month

One example would be the amount of traffic a particular machine is
consuming.  I realize that I could get this from an snmp object, but
when all is said and done, I will want to graph traffic in granularities
such as specific TCP/UDP ports.  So I have chosen to graph iptables
counters.  And I have all of the glue to get the values out of iptables
and into mrtg as you an see by this .log file:

# head -5 /var/www/html/mrtg/acc_linux.log 
1270008911 824539544 36442831
1270008911 824539544 36442831 824539544 36442831
1270008608 823814773 36367336 823814773 36367336
1270008600 823796383 36365323 823814773 36367336
1270008300 803993735 35453230 823201777 36300236

I am graphing this with a "gauge" so that I can see it's growth over
time.  But what I want to be able to do however is "reset" graph at
intervals, like say monthly, so that at the start of every month, the
graph starts at 0 and grows until the end of the month.

I would prefer not to sacrifice the historical data however and just
trash the .log every month (which seems to be one way to achieve this,
at the expense of the yearly graph, which is why I don't want to trash
the .log file).

Am I reaching for something here that mrtg just cannot do?


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.oetiker.ch/pipermail/mrtg/attachments/20100331/b714eab9/attachment.pgp 

More information about the mrtg mailing list