Hi,
I'm working to graph values from a csv file to output statistics from traffic shapper.
This csv value have this fields: Pipe Name, TotalBandwith, Bandwith in, Bandwith out, Connections.....
Manufacturer sends me a script that shows these fields by a PipeName. This script is called by sintax script.pl <pipename>
and shows this output tbw:xx bwin:xx bwout:xx ....
I put this script in Data Input Method, I create a graph & data template associated to it and it works fine.
Manually, I can create Data Sources & Graphs, and it works.
My problem is that this csv have 200 rows, and I must create 200 graphs, whis this associated Data Source. I'm trying to automate it.
I've developed a script that shows Pipe Names to select it by means of Data Query when you add a device. I have an xml file associated to it, and seems that it works fine. When I create a device and associated it this Data Query, it shows all PipeNames to contains the csv file.
How must I configure cacti to pass the |query_fieldnameX| in the input field in the Data Input Method? I try to put into input custom value in Data Template, but it does'nt work
Thanks!
2 differents script in Data Query & Data Input Method?
Moderators: Developers, Moderators
Re: 2 differents script in Data Query & Data Input Method?
Viewing the Poll Cache, it seems that |query_fieldname| is not translated to real name. My field is named nompipe in data query xml file and i call this field by means of |query_nompipe|.
If I go to Poller Cache, i can view:
Script: perl /var/www/cacti/scripts/nx2cacti.pl |query_nompipe|
RRD: /var/www/cacti/rra/allot_netxplorer_outbw_1562.rrd
Thanks,
If I go to Poller Cache, i can view:
Script: perl /var/www/cacti/scripts/nx2cacti.pl |query_nompipe|
RRD: /var/www/cacti/rra/allot_netxplorer_outbw_1562.rrd
Thanks,
Re: 2 differents script in Data Query & Data Input Method?
Hi. I remember when adding index support to my script it was necessary to check "Use Per-Graph Value (Ignore this Value)" under the graph template definition for "Title (--title)." Then under "Data Queries" for the associated graph template one would add a field for "Suggested Values -> Graph Template - ...." Here is a sample from my query definition:
Graph Template - UBNT - Station List - Client Connection Quality (CCQ):
title |host_description| - Station CCQ (|query_staMAC| - |query_staLastIP| - |query_staName|)
where "title" is the field name.
staMAC, staLastIP, and staName from XML file:
Then to see the change you would go to "Graph Management" and for the action choose to "Reapply Suggested Names" for the selected graphs.
Graph Template - UBNT - Station List - Client Connection Quality (CCQ):
title |host_description| - Station CCQ (|query_staMAC| - |query_staLastIP| - |query_staName|)
where "title" is the field name.
staMAC, staLastIP, and staName from XML file:
Code: Select all
<staMAC>
<name>WLAN MAC</name>
<direction>input</direction>
<query_name>mac</query_name>
</staMAC>
<staName>
<name>Unit Name</name>
<direction>input</direction>
<query_name>name</query_name>
</staName>
<staLastIP>
<name>Last IP</name>
<direction>input</direction>
<query_name>lastip</query_name>
</staLastIP>
Re: 2 differents script in Data Query & Data Input Method?
Hi ricardcc,
Does your script working properly?
Would you please suggest me how can i generate utilization graph for all the Line, Pipe and VC form NetXplorer Server.
Does your script working properly?
Would you please suggest me how can i generate utilization graph for all the Line, Pipe and VC form NetXplorer Server.
Who is online
Users browsing this forum: No registered users and 1 guest