Cacti on FreeBSD

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
APseudoUtopia
Posts: 3
Joined: Mon Nov 17, 2008 6:29 pm

Cacti on FreeBSD

Post by APseudoUtopia »

Hey,

I recently setup and configured Cacti on FreeBSD. I set it up to graph the load average and number of processes. So far, it's been working perfectly.

However, I'm having some problems graphing other things, such as the memory usage and network interface statistics. It seems the linux scripts for measuring these things do not work on FreeBSD.

Is there somewhere where I can find scripts for FreeBSD? Perl scripts or cacti templates, or anything like that. I've tried searching both this forum and google to no avail. I modified a few perl scripts that came with cacti, but for things like the network interface stats and memory, I'd like to see if anything already exists.

Also, I have several IPs on the 'em0' interface. Is it possible to graph the IPs separately? I'm not sure how cacti normally gets the interface traffic data. I do run the "pf" firewall, so I can somehow use the traffic counters from that, but I'm not sure exactly how to do this.

Thank you very much for any information.

EDIT, version information:
FreeBSD: 7
Cacti: 0.8.7b
Spine: 0.8.7b
RRDtool: 1.3.3
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

Two possibilities - use the procfs_linux and tweak the scripts to look in there for their information instead, or install net-snmp's snmpd and treat the local Cacti server the same as any remote server. I'd do the second one personally...

Third possibility - write your own script to collect the data.

For the interface traffic, it's measuring the *interface* traffic, not the traffic per IP. You are right that you could write a script to read pf/ipfw counters. There's a howto in the manual for writing your own Script Query.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
junkmail
Posts: 7
Joined: Wed Nov 19, 2008 11:26 am

Some script ideas

Post by junkmail »

There is a perl script out there by Ralf S. Engelschall <rse@engelschall.com> called 'free' that will dump memory stats to stdout where you can pattern match mem_free or mem_avail.

Use pstat -s to get your swap space.

You can use a control structure to switch between these two functionalities by matching ARGV0 to MemFree: or SwapFree: so that you output the correct value. Then just link your script to linux_memory.pl and use the rest of the setup as is.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest