Edit your mrtg.conf file0. In the mrtg "target" field, enter the
full path to "ipaccount", the time interval and the regexp to identify
the name of the rule(s) that mrtg will use to create graph.
For example, "/usr/local/sbin/ipaccount 15m all" - means "get data from
any chain that contains the regexp 'all' for last 15 minutes '15m'"
The 15m time can be whatever time you like, but must be the same
period that MRTG is run - in this example, mrtg is called every
15 minutes from crontab. Note that mrtg stores data in minimum 5 minute blocks,
so there's not much point in logging data at any more than once per 5 minutes.
Here is an example of what you may enter in crontab (crontab -e):
# Save data to ipac log + mrtg log every 15 mins.
*/15 * * * * /usr/local/bin/ipac-2-mrtg
"ipac-2-mrtg" is a simple shell script (see example below).