Hi Guys, I love cacti but i have some problems doing my own graphs. Or making it work. I have read the docs but it doesn't help me out , please help me out
Using Debian/Testing, all other default graphs work for me.
-------------------------------
Problem 1
I did a duplicate on the ping thing inside cacti. The one included in the package did plot graphics by my own does not.
I run cron Printout and it reports values.
/usr/bin/rrdtool graph -
--imgformat=PNG
--start="-86400"
--title="WAN Links (Ping Times) Def GW"
--rigid
--base=1000
--height=150
--width=500
--upper-limit=1000
--lower-limit=0
--vertical-label="Milliseconds"
DEF:ceib="/var/www/cacti/rra/ping_default_gatewa.rrd":ping_default_gatewa:AVERAGE
AREA:ceib#00A348:"192.168.4.1"
GPRINT:ceib:LAST:"Current:%8.2lf %s"
GPRINT:ceib:AVERAGE:"Average:%8.2lf %s"
GPRINT:ceib:MAX:"Maximum:%8.2lf %sn"
On the graph i see 192.168.4.1 with a green box to the side of it, and then Current : 2.39 Average : 2.01 Maximum : 2.70
that looks ok, but i do not see anything on the GRAPH at all (it does not plot any graphics).
-------------------
Problem 2
I made a small perl hack, which uses the pgsql functions to extract a value from a database. The value reported back is for example 15552,i would like to make a graph with 4 values on (is that possible ?).
I can run the cron printout and i'll see the value there. So my problem is that i can't configure the data input source.
When i run the script it reports 15552, but i can't really figure out.
Could someone please explain in detail what i should do to fix this. In the log i find this.
02/14/2002 6:36 AM - CMD: /usr/bin/rrdtool update /var/www/cacti/rra/ping_default_gatewa.rrd N:2.4
02/14/2002 6:36 AM - CMD: /usr/bin/rrdtool update /var/www/cacti/rra/blarg.rrd N:U
I would like to have a graph with the name
Amount of Row on the left legend
Any colour Box Amount : Current , Average , Max. And a graph should be produced.
My Data Source Input Source configuration looks like this :
Name :blarg_test
Input String : /var/www/cacti/scripts/test.pl
OutPut String: <value>
Can i put up <value> as output string ? can i choose any name for this return value from the script ?
Current data input Source Configuration
Name : Value from Blarg
data name : value
input/output field : OutPut
Field Used to Update RRA.
rrdtool Data Source Configuration
/usr/bin/rrdtool create
/var/www/cacti/rra/blarg.rrd
--step 300
DS:blarg:COUNTER:600:0:1
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:MAX:0.5:1:600
RRA:MAX:0.5:6:700
RRA:MAX:0.5:24:775
RRA:MAX:0.5:288:797
Name : blarg
(Optioal) Internal Data Source Name : blarg
Optional) Data Source Path: <path_rra>/blarg.rrd
Data Source Type : COUNTER
Data Input Type : blarg_test
Associated RRA's: All Values
Heartbeat : 600
Step : 300
Minimum Value : 0
Maximum Value : 100000
Data Source Currently Active
rrdtool Graph Configuration :
Title : Blarg Test
Image : PNG
Heigh : 120
Width : 500
AutoScale : Auto Scale
Upper Limit : 100000
Lower : 1
Base Value : 1000
Edit Graph Item :
Item #1
Data Source : blarg
Colour : Green
Consolidation Function: Area
CDEF Function :Average
Make Per 5 Minutes
Text Format : SQL AMOUNT
Regards
Jonas
Problem adding new datasources
Moderators: Developers, Moderators
Most likely, the reason you cannot see data on your ping graph is because your scale is too high. Your data is ~2 while the graph is scaled at 1000. You can turn on autoscaling or a set a more appropriate number if this is a problem.
About the data gathering. You can create one script to gather these four pieces of data, but your script must only return one value at a time since cacti currently only supports one data source per .rrd file (this may change later). Then I would create a data source for each piece of data that your script would be returning (4 I'd imagine). Then you can use all four of those data sources on your graph.
Hope this helps.
-Ian
About the data gathering. You can create one script to gather these four pieces of data, but your script must only return one value at a time since cacti currently only supports one data source per .rrd file (this may change later). Then I would create a data source for each piece of data that your script would be returning (4 I'd imagine). Then you can use all four of those data sources on your graph.
Hope this helps.
-Ian
Who is online
Users browsing this forum: No registered users and 2 guests