Hi Miguel,
My experience was that using the 'external script' option to mrtg, in
conjunction with some accounting rules in the iptables rulesets was
another way to go.
Instead of calling mrtg directory from cron, I call a wrapper script
(do_mrtg) that:
1. Retrieves any statistics needed using suid wrappers.
- In my case, iptables output, and smartctl information.
2. Calls mrtg.
Food for thought, at least.
http://www.sr.bham.ac.uk/~mpc/p2/monitor/
Mark
On Mon, 2004-05-24 at 12:54, Miguel A Paraz wrote:
> Hi,
> I need to display MRTG graphs for the request traffic of user groups,
> classified by IP subnet. This is to be integrated into an existing MRTG
> setup.
>
> If I read the docs correctly, SNMP only knows about counters for
> the total web traffic, and can't differentiate based on IP subnets or ACLs.
>
> The obvious way to do it would be to go through the logfile every 5 minutes -
> or the MRTG redraw interval - and look for matching IP's.
> However, this is costly if the logfile is large.
>
> Another possibility is to 'tail' the file and scan the new lines, keeping
> the totals in memory and writing them to files. MRTG will then pick up the
> numbers from the files.
>
> Which of these would you recommend? Any experiences?
> Thanks in advance!
>
-- Mark Cooke <mpc@star.sr.bham.ac.uk> University Of Birmingham
This archive was generated by hypermail pre-2.1.9 : Tue Jun 01 2004 - 12:00:02 MDT