How to install:
Install ipac-ng (I used gdbm for database storage) and rrdtool as normal
(I prefer /usr/local, YMMV). The rrd-ipac-ng script can go anywhere.
In ipac.conf, I set my rules file to /etc/ipac-ng/rules.conf - you can use
my example rules.conf above and edit for your hosts. The rules.conf file
is quite verbose, if in doubt just stick to my format and remember the
painful secret: the first field cannot be > 19 characters or RRD will barf.
See if your rules.conf works by running: fetchipac -S ...you can
dump the rules to screen with fetchipac -R
Now you can start to customize the rrd-ipac-ng.pl script. There's a few
variables to change right at the top of the file, some are obvious (paths
to the ipacsum and rrdtool binaries, paths to rrd data dir and ipac config
file), some are output directories that must be in the document root of
your webserver for them to show up on the web:
#!/bin/sh # we don't keep the DB around for more than one run because we're keeping # the data in RRD rm /var/lib/ipac/data.db /usr/local/sbin/fetchipac /usr/local/etc/rrd-ipac-ng.pl >/tmp/rrd.log 2>&1Note: These graphs will be generated every N minutes whether someone is watching them or not. You can save resources by using RRD's perl CGI interface to generate the graphs on-demand.
There are some lines in the file that run the commands from perl,
they look like this:
`$cmd 1>/dev/null 2>&1`;
...if you remove the redirection of command output to null, to look
like this instead:
`$cmd`;
...they you will see the full output of the command and you should
be able to tell why it is failing. I think usually it is a path
problem, it is looking for the rrd command in the wrong place, etc.
# ALL traffic to/from spun spun recv|ipac~fo|+|all|0/0|10.10.10.2/32|| spun send|ipac~fo|+|all|10.10.10.2/32|0/0|| # SMTP traffic to/from spun net spun smtp recv|ipac~fo|+|tcp|0/0|10.10.10.2/32 smtp|| spun net smtp recv|ipac~fo|+|tcp|0/0 smtp|10.10.10.2/32|| net spun smtp send|ipac~fo|+|tcp|10.10.10.2/32 smtp|0/0|| spun net smtp send|ipac~fo|+|tcp|10.10.10.2/32|0/0 smtp||This example shows the 2 kinds of allowed rules - the "all traffic to host" rule and the "port traffic to host" rule. Note that all the fields except the last are filled in, not empty.