|
From: Wulfran J. <w.j...@ou...> - 2005-11-22 06:20:00
|
Hi to all, How to unsubscribe please? Thank you Wulfran=20 -----Message d'origine----- De=A0: cac...@li... [mailto:cac...@li...] De la part de Nate = Carlson Envoy=E9=A0: mardi 22 novembre 2005 09:13 =C0=A0: cac...@li... Objet=A0: [cacti-user] Trying to graph ipfm data; not able to get = working graphs Hey all, I'm trying to figure out how to graph data from ipfm (it's a handly = little=20 tool you can use to report how much bandwidth is being used per IP=20 address; it's nice in a case where you want to know what machines are=20 using bandwidth, but you can't monitor individual ports); I've gotten=20 graphs working in MRTG quite easily, but would much rather have them in=20 Cacti. I've done the following: - Written a script that parses the ipfm data and answer's Cacti's = queries - Written an XML file to call said script; attached as 'ipfm.xml'. I've set up a wrapper that logs all calls to this script, to try to debug = the problem. - Defined a 'Data Query' for it, with the following parameters: Name: Unix - Get IPFM Statistics Desc: Call a script to get detailed IPFM statistics for monitored = IP's XML Path: <path_cacti>/resource/script_queries/ipfm.xml Input Method: Get Script Data (Indexed) - Added a 'Graph Template' to said 'Data Query', with the following: Name: Interface - 95% Template: Interface - Traffic (bits/sec, 95th Percentile) Data Source: traffic_in ifInOctets (Bytes In) Data Source: traffic_out ifOutOctets (Bytes Out) (under 'Suggested Values - Data Template - Interface - Traffic' Name: |host_description| - Traffic - |query_ifIP|/|query_ifHostname| rrd_maximum: 100000000 (under 'Suggested Values - Graph Template - Interface - Traffic (bits/sec, 95th Percentile)' Title: |host_description| - Traffic - |query_ifIP|/|query_ifHostname| Then, I created a Device for this, and added the 'Unix - Get IPFM=20 Statistics' data template to the device. When I add the template, Cacti=20 runs the following commands (via my wrapper): Running: gather-ipfm-cacti.pl index Returns: 216.250.164.46 216.250.164.47 Running: gather-ipfm-cacti.pl query ipaddress Returns: 216.250.164.46:216.250.164.46 216.250.164.47:216.250.164.47 Running: gather-ipfm-cacti.pl query hostname Returns: 216.250.164.46:tungsten.msp.technicality.org 216.250.164.47:nitrogen.msp.technicality.org Then, when I go to the add graphs page, I see both of the above hosts. = If=20 I create a graph, and then go to the data source that the graph, it's = set=20 up as follows: Selected Data Template: Interface - Traffic Host: IPFM Monitor (localhost) Supplemental Data Template Data - Data Source Fields: Name: |host_description| - Traffic - |query_ifIP|/|query_ifHostname| Data Source Path: <path_rra>/ipfm_ip_monitor_traffic_in_478.rrd traffic_in Maximum Value: 100000000 traffic_out Maximum Value: 100000000 (Custom Data) Index Type: ifHostname Index Value: <blank> Output Type ID: Interface - 95% The Debug Output looks like: /usr/bin/rrdtool create \ /usr/share/cacti/site/rra/ipfm_ip_monitor_traffic_in_478.rrd \ --step 300 \ DS:traffic_in:COUNTER:600:0:100000000 \ DS:traffic_out:COUNTER:600:0:100000000 \ RRA:AVERAGE:0.5:1:600 \ RRA:AVERAGE:0.5:6:700 \ RRA:AVERAGE:0.5:24:775 \ RRA:AVERAGE:0.5:288:797 \ RRA:MIN:0.5:1:600 \ RRA:MIN:0.5:6:700 \ RRA:MIN:0.5:24:775 \ RRA:MIN:0.5:288:797 \ RRA:MAX:0.5:1:600 \ RRA:MAX:0.5:6:700 \ RRA:MAX:0.5:24:775 \ RRA:MAX:0.5:288:797 \ RRA:LAST:0.5:1:600 \ RRA:LAST:0.5:6:700 \ RRA:LAST:0.5:24:775 \ RRA:LAST:0.5:288:797 \ Everything looks right to me; the problem is, the above rrd file is = never=20 created. Watching the logs from my little wrapper script, Cacti is never = even executing the script that I wrote to monitor this on it's 5-minute=20 runs. I defined a few SNMP-based graphs for the host, and they are = created=20 and work just fine. Any ideas? Did I miss an important step or something? Thanks! ------------------------------------------------------------------------ | nate carlson | nat...@na... | http://www.natecarlson.com | | depriving some poor village of its idiot since 1981 | ------------------------------------------------------------------------ |