Which process generates the rrd-files?
Moderators: Developers, Moderators
Which process generates the rrd-files?
Hi there,
I got cacti 0.8.7 running on a Debian 5.02, Apache2, MySQL5, PHP 5.2.6.
I have this Problem:
###############################################
adding new graphs from within the webinterface I keep getting the errors:
Error: opening '/var/www/cacti-0.8.7e/rra/test-router_de_tmptotal_19824.rrd': No such file or directory
This "mostly" applies to rrd created via the WebGUI. RRDs greated from the commandline of (user cacti) using add_device and add_graphs works "mostly" fine. (See last post,,,)
So I thought it is a problem of the Web-Servers User-permissions.
I thought about adding the webserver user an additional group, the group auf the user cacti "cacti gid 1001".
I have no idea how to figure out the effective gid of the www-data apache2 processes... but don´t think that this is the problem because 777 the dirs and files don´t help.
Although I was not able to purge the log-files from the webgui, but changing /logs/cacti.log to cacti cacti to rw-r--rw- helps here...
##############################################
The user cacti is the poller-user.
cacti@cacti:/tmp$ crontab -l
# m h dom mon dow command
*/5 * * * * /usr/bin/php /var/www/cacti-0.8.7e/poller.php >/dev/null 2>&1
##############################################
cacti also owns the database "cacti7".
##############################################
Debian uses a script to start the apache2-child-threads as user www-data.
root 2460 1 0 Aug14 ? 00:00:04 /usr/sbin/apache2 -k start
www-data 13047 2460 0 07:37 ? 00:00:42 /usr/sbin/apache2 -k start
www-data 13072 2460 0 07:38 ? 00:00:46 /usr/sbin/apache2 -k start
www-data 19456 2460 0 12:36 ? 00:00:09 /usr/sbin/apache2 -k start
I got cacti 0.8.7 running on a Debian 5.02, Apache2, MySQL5, PHP 5.2.6.
I have this Problem:
###############################################
adding new graphs from within the webinterface I keep getting the errors:
Error: opening '/var/www/cacti-0.8.7e/rra/test-router_de_tmptotal_19824.rrd': No such file or directory
This "mostly" applies to rrd created via the WebGUI. RRDs greated from the commandline of (user cacti) using add_device and add_graphs works "mostly" fine. (See last post,,,)
So I thought it is a problem of the Web-Servers User-permissions.
I thought about adding the webserver user an additional group, the group auf the user cacti "cacti gid 1001".
I have no idea how to figure out the effective gid of the www-data apache2 processes... but don´t think that this is the problem because 777 the dirs and files don´t help.
Although I was not able to purge the log-files from the webgui, but changing /logs/cacti.log to cacti cacti to rw-r--rw- helps here...
##############################################
The user cacti is the poller-user.
cacti@cacti:/tmp$ crontab -l
# m h dom mon dow command
*/5 * * * * /usr/bin/php /var/www/cacti-0.8.7e/poller.php >/dev/null 2>&1
##############################################
cacti also owns the database "cacti7".
##############################################
Debian uses a script to start the apache2-child-threads as user www-data.
root 2460 1 0 Aug14 ? 00:00:04 /usr/sbin/apache2 -k start
www-data 13047 2460 0 07:37 ? 00:00:42 /usr/sbin/apache2 -k start
www-data 13072 2460 0 07:38 ? 00:00:46 /usr/sbin/apache2 -k start
www-data 19456 2460 0 12:36 ? 00:00:09 /usr/sbin/apache2 -k start
Last edited by Deviloper on Mon Aug 17, 2009 1:36 pm, edited 1 time in total.
I use "new graphs" selecting the host test
+ Created graph: test - Temp. - VTT 1 outlet te
+ Created graph: test - Temp. - VTT 2 outlet te
+ Created graph: test - Temp. - VTT 3 outlet te
+ Created graph: test - Temp. - module 1 outlet
+ Created graph: test - Temp. - module 1 inlet
+ Created graph: test - Temp. - module 4 outlet
the graphs are not displayed all I see is a blank site with the graph titles.
The properties looks like that:
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=1250429760 \
--end=1250516160 \
--title="test - Temp. - module 1 EARL i " \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
COMMENT:"From 2009/08/16 15\:36\:00 To 2009/08/17 15\:36\:00\c" \
COMMENT:" \n" \
--vertical-label="C°" \
--slope-mode \
--font TITLE:10: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/var/www/cacti-0.8.7e/rra/teste_tmptotal_22997.rrd":tmptotal:AVERAGE \
CDEF:cdefa=a,300,* \
LINE1:cdefa#FF4105FF:"" \
GPRINTLAST:"Current\:%8.2lf%s" \
GPRINTAVERAGE:"Average\:%8.2lf%s" \
GPRINTMAX:"Maximum\:%8.2lf%s\n"
##########################################
The devices "Associated Graph Template" tells me
Cisco - Temperature Is Being Graphed (Edit)
##########################################
The devices "Associated Data Queries" looks good to
Cisco - Temperature (Verbose Query) Uptime Goes Backwards Success [69 Items, 23 Rows]
##########################################
Data Query Debug Information looks fine, too:
+ Ru4nning data query [14].
+ Found type = '6 '[script query].
+ Found data query XML file at '/var/www/cacti-0.8.7e/resource/script_server/cisco_tmpsensor.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/usr/bin/php -q /var/www/cacti-0.8.7e/scripts/ss_cisco_temperature.php test :2:test:::::::161:500 index'
+ Executing script query '/usr/bin/php -q /var/www/cacti-0.8.7e/scripts/ss_cisco_temperature.php test:2:test:::::::161:500 query tmpsensor'
+ Found item [tmpsensor='40010'] index: 40010
+ Found item [tmpsensor='40020'] index: 40020
+ Found item [tmpsensor='40030'] index: 40030
+ Found item [tmpsensor='60010'] index: 60010
+ Found item [tmpsensor='60011'] index: 60011
+ Found item [tmpsensor='60040'] index: 60040
+ Found item [tmpsensor='60041'] index: 60041
+ Found item [tmpsensor='60050'] index: 60050
+ Found item [tmpsensor='60051'] index: 60051
+ Found item [tmpsensor='60052'] index: 60052
+ Found item [tmpsensor='60053'] index: 60053
+ Found item [tmpsensor='60054'] index: 60054
+ Found item [tmpsensor='60055'] index: 60055
+ Found item [tmpsensor='60056'] index: 60056
+ Found item [tmpsensor='60057'] index: 60057
+ Found item [tmpsensor='60058'] index: 60058
+ Found item [tmpsensor='60059'] index: 60059
+ Found item [tmpsensor='90010'] index: 90010
+ Found item [tmpsensor='90011'] index: 90011
+ Found item [tmpsensor='90050'] index: 90050
+ Found item [tmpsensor='90051'] index: 90051
+ Found item [tmpsensor='100050'] index: 100050
+ Found item [tmpsensor='100051'] index: 100051
+ Executing script query '/usr/bin/php -q /var/www/cacti-0.8.7e/scripts/ss_cisco_temperature.php test:2:test:::::::161:500 query tmpname'
+ Found item [tmpname='Sensor40010'] index: 40010
+ Found item [tmpname='Sensor40020'] index: 40020
+ Found item [tmpname='Sensor40030'] index: 40030
+ Found item [tmpname='Sensor60010'] index: 60010
+ Found item [tmpname='Sensor60011'] index: 60011
+ Found item [tmpname='Sensor60040'] index: 60040
+ Found item [tmpname='Sensor60041'] index: 60041
+ Found item [tmpname='Sensor60050'] index: 60050
+ Found item [tmpname='Sensor60051'] index: 60051
+ Found item [tmpname='Sensor60052'] index: 60052
+ Found item [tmpname='Sensor60053'] index: 60053
+ Found item [tmpname='Sensor60054'] index: 60054
+ Found item [tmpname='Sensor60055'] index: 60055
+ Found item [tmpname='Sensor60056'] index: 60056
+ Found item [tmpname='Sensor60057'] index: 60057
+ Found item [tmpname='Sensor60058'] index: 60058
+ Found item [tmpname='Sensor60059'] index: 60059
+ Found item [tmpname='Sensor90010'] index: 90010
+ Found item [tmpname='Sensor90011'] index: 90011
+ Found item [tmpname='Sensor90050'] index: 90050
+ Found item [tmpname='Sensor90051'] index: 90051
+ Found item [tmpname='Sensor100050'] index: 100050
+ Found item [tmpname='Sensor100051'] index: 100051
+ Executing script query '/usr/bin/php -q /var/www/cacti-0.8.7e/scripts/ss_cisco_temperature.php test:2:test:::::::161:500 query tmpdesc'
+ Found item [tmpdesc='VTT 1 outlet temperature'] index: 40010
+ Found item [tmpdesc='VTT 2 outlet temperature'] index: 40020
+ Found item [tmpdesc='VTT 3 outlet temperature'] index: 40030
+ Found item [tmpdesc='module 1 outlet temperature'] index: 60010
+ Found item [tmpdesc='module 1 inlet temperature'] index: 60011
+ Found item [tmpdesc='module 4 outlet temperature'] index: 60040
+ Found item [tmpdesc='module 4 inlet temperature'] index: 60041
+ Found item [tmpdesc='module 5 outlet temperature'] index: 60050
+ Found item [tmpdesc='module 5 inlet temperature'] index: 60051
+ Found item [tmpdesc='module 5 device-1 temperature'] index: 60052
+ Found item [tmpdesc='module 5 device-2 temperature'] index: 60053
+ Found item [tmpdesc='module 5 asic-1 temperature'] index: 60054
+ Found item [tmpdesc='module 5 asic-2 temperature'] index: 60055
+ Found item [tmpdesc='module 5 asic-3 temperature'] index: 60056
+ Found item [tmpdesc='module 5 asic-4 temperature'] index: 60057
+ Found item [tmpdesc='module 5 asic-5 temperature'] index: 60058
+ Found item [tmpdesc='module 5 asic-6 temperature'] index: 60059
+ Found item [tmpdesc='module 1 EARL outlet temperature'] index: 90010
+ Found item [tmpdesc='module 1 EARL inlet temperature'] index: 90011
+ Found item [tmpdesc='module 5 EARL outlet temperature'] index: 90050
+ Found item [tmpdesc='module 5 EARL inlet temperature'] index: 90051
+ Found item [tmpdesc='module 5 RP outlet temperature'] index: 100050
+ Found item [tmpdesc='module 5 RP inlet temperature'] index: 100051
+ Found data query XML file at '/var/www/cacti-0.8.7e/resource/script_server/cisco_tmpsensor.xml'
+ Found data query XML file at '/var/www/cacti-0.8.7e/resource/script_server/cisco_tmpsensor.xml'
+ Found data query XML file at '/var/www/cacti-0.8.7e/resource/script_server/cisco_tmpsensor.xml'
############################################
After deleting the Graph Templates from the list of "Associated Graph Templates" for this host I am not able to add it again. It does not show up in the select box....
the same with "create graphs for this host".... the graph template is not listed, althought it is in the host-template of the device and data query looks good.
+ Created graph: test - Temp. - VTT 1 outlet te
+ Created graph: test - Temp. - VTT 2 outlet te
+ Created graph: test - Temp. - VTT 3 outlet te
+ Created graph: test - Temp. - module 1 outlet
+ Created graph: test - Temp. - module 1 inlet
+ Created graph: test - Temp. - module 4 outlet
the graphs are not displayed all I see is a blank site with the graph titles.
The properties looks like that:
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=1250429760 \
--end=1250516160 \
--title="test - Temp. - module 1 EARL i " \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
COMMENT:"From 2009/08/16 15\:36\:00 To 2009/08/17 15\:36\:00\c" \
COMMENT:" \n" \
--vertical-label="C°" \
--slope-mode \
--font TITLE:10: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/var/www/cacti-0.8.7e/rra/teste_tmptotal_22997.rrd":tmptotal:AVERAGE \
CDEF:cdefa=a,300,* \
LINE1:cdefa#FF4105FF:"" \
GPRINTLAST:"Current\:%8.2lf%s" \
GPRINTAVERAGE:"Average\:%8.2lf%s" \
GPRINTMAX:"Maximum\:%8.2lf%s\n"
##########################################
The devices "Associated Graph Template" tells me
Cisco - Temperature Is Being Graphed (Edit)
##########################################
The devices "Associated Data Queries" looks good to
Cisco - Temperature (Verbose Query) Uptime Goes Backwards Success [69 Items, 23 Rows]
##########################################
Data Query Debug Information looks fine, too:
+ Ru4nning data query [14].
+ Found type = '6 '[script query].
+ Found data query XML file at '/var/www/cacti-0.8.7e/resource/script_server/cisco_tmpsensor.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/usr/bin/php -q /var/www/cacti-0.8.7e/scripts/ss_cisco_temperature.php test :2:test:::::::161:500 index'
+ Executing script query '/usr/bin/php -q /var/www/cacti-0.8.7e/scripts/ss_cisco_temperature.php test:2:test:::::::161:500 query tmpsensor'
+ Found item [tmpsensor='40010'] index: 40010
+ Found item [tmpsensor='40020'] index: 40020
+ Found item [tmpsensor='40030'] index: 40030
+ Found item [tmpsensor='60010'] index: 60010
+ Found item [tmpsensor='60011'] index: 60011
+ Found item [tmpsensor='60040'] index: 60040
+ Found item [tmpsensor='60041'] index: 60041
+ Found item [tmpsensor='60050'] index: 60050
+ Found item [tmpsensor='60051'] index: 60051
+ Found item [tmpsensor='60052'] index: 60052
+ Found item [tmpsensor='60053'] index: 60053
+ Found item [tmpsensor='60054'] index: 60054
+ Found item [tmpsensor='60055'] index: 60055
+ Found item [tmpsensor='60056'] index: 60056
+ Found item [tmpsensor='60057'] index: 60057
+ Found item [tmpsensor='60058'] index: 60058
+ Found item [tmpsensor='60059'] index: 60059
+ Found item [tmpsensor='90010'] index: 90010
+ Found item [tmpsensor='90011'] index: 90011
+ Found item [tmpsensor='90050'] index: 90050
+ Found item [tmpsensor='90051'] index: 90051
+ Found item [tmpsensor='100050'] index: 100050
+ Found item [tmpsensor='100051'] index: 100051
+ Executing script query '/usr/bin/php -q /var/www/cacti-0.8.7e/scripts/ss_cisco_temperature.php test:2:test:::::::161:500 query tmpname'
+ Found item [tmpname='Sensor40010'] index: 40010
+ Found item [tmpname='Sensor40020'] index: 40020
+ Found item [tmpname='Sensor40030'] index: 40030
+ Found item [tmpname='Sensor60010'] index: 60010
+ Found item [tmpname='Sensor60011'] index: 60011
+ Found item [tmpname='Sensor60040'] index: 60040
+ Found item [tmpname='Sensor60041'] index: 60041
+ Found item [tmpname='Sensor60050'] index: 60050
+ Found item [tmpname='Sensor60051'] index: 60051
+ Found item [tmpname='Sensor60052'] index: 60052
+ Found item [tmpname='Sensor60053'] index: 60053
+ Found item [tmpname='Sensor60054'] index: 60054
+ Found item [tmpname='Sensor60055'] index: 60055
+ Found item [tmpname='Sensor60056'] index: 60056
+ Found item [tmpname='Sensor60057'] index: 60057
+ Found item [tmpname='Sensor60058'] index: 60058
+ Found item [tmpname='Sensor60059'] index: 60059
+ Found item [tmpname='Sensor90010'] index: 90010
+ Found item [tmpname='Sensor90011'] index: 90011
+ Found item [tmpname='Sensor90050'] index: 90050
+ Found item [tmpname='Sensor90051'] index: 90051
+ Found item [tmpname='Sensor100050'] index: 100050
+ Found item [tmpname='Sensor100051'] index: 100051
+ Executing script query '/usr/bin/php -q /var/www/cacti-0.8.7e/scripts/ss_cisco_temperature.php test:2:test:::::::161:500 query tmpdesc'
+ Found item [tmpdesc='VTT 1 outlet temperature'] index: 40010
+ Found item [tmpdesc='VTT 2 outlet temperature'] index: 40020
+ Found item [tmpdesc='VTT 3 outlet temperature'] index: 40030
+ Found item [tmpdesc='module 1 outlet temperature'] index: 60010
+ Found item [tmpdesc='module 1 inlet temperature'] index: 60011
+ Found item [tmpdesc='module 4 outlet temperature'] index: 60040
+ Found item [tmpdesc='module 4 inlet temperature'] index: 60041
+ Found item [tmpdesc='module 5 outlet temperature'] index: 60050
+ Found item [tmpdesc='module 5 inlet temperature'] index: 60051
+ Found item [tmpdesc='module 5 device-1 temperature'] index: 60052
+ Found item [tmpdesc='module 5 device-2 temperature'] index: 60053
+ Found item [tmpdesc='module 5 asic-1 temperature'] index: 60054
+ Found item [tmpdesc='module 5 asic-2 temperature'] index: 60055
+ Found item [tmpdesc='module 5 asic-3 temperature'] index: 60056
+ Found item [tmpdesc='module 5 asic-4 temperature'] index: 60057
+ Found item [tmpdesc='module 5 asic-5 temperature'] index: 60058
+ Found item [tmpdesc='module 5 asic-6 temperature'] index: 60059
+ Found item [tmpdesc='module 1 EARL outlet temperature'] index: 90010
+ Found item [tmpdesc='module 1 EARL inlet temperature'] index: 90011
+ Found item [tmpdesc='module 5 EARL outlet temperature'] index: 90050
+ Found item [tmpdesc='module 5 EARL inlet temperature'] index: 90051
+ Found item [tmpdesc='module 5 RP outlet temperature'] index: 100050
+ Found item [tmpdesc='module 5 RP inlet temperature'] index: 100051
+ Found data query XML file at '/var/www/cacti-0.8.7e/resource/script_server/cisco_tmpsensor.xml'
+ Found data query XML file at '/var/www/cacti-0.8.7e/resource/script_server/cisco_tmpsensor.xml'
+ Found data query XML file at '/var/www/cacti-0.8.7e/resource/script_server/cisco_tmpsensor.xml'
############################################
After deleting the Graph Templates from the list of "Associated Graph Templates" for this host I am not able to add it again. It does not show up in the select box....
the same with "create graphs for this host".... the graph template is not listed, althought it is in the host-template of the device and data query looks good.
Data Sources are created...
and yes the datasources are created:
Data Sources [host: test]
test - Temp. - module 1... 23020 Get Script Server Data (Indexed) 5 Minutes Yes Cisco Router - Temperature
test - Temp. - module 1... 23019 Get Script Server Data (Indexed) 5 Minutes Yes Cisco Router - Temperature
test - Temp. - module 1... 23006 Get Script Server Data (Indexed) 5 Minutes Yes Cisco Router - Temperature
test - Temp. - module 1... 23005 Get Script Server Data (Indexed) 5 Minutes Yes Cisco Router - Temperature
test - Temp. - module 4... 23008 Get Script Server Data (Indexed) 5 Minutes Yes Cisco Router - Temperature
test - Temp. - module 4... 23007 Get Script Server Data (Indexed) 5 Minutes Yes Cisco Router - Temperature
test - Temp. - module 5... 23013 Get Script Server Data (Indexed) 5 Minutes Yes Cisco Router - Temperature
Data Source Debug:
/usr/bin/rrdtool create \
/var/www/cacti-0.8.7e/rra/test_23019.rrd \
--step 300 \
DS:tmptotal:GAUGE:600:0:100 \
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 \
Data Sources [host: test]
test - Temp. - module 1... 23020 Get Script Server Data (Indexed) 5 Minutes Yes Cisco Router - Temperature
test - Temp. - module 1... 23019 Get Script Server Data (Indexed) 5 Minutes Yes Cisco Router - Temperature
test - Temp. - module 1... 23006 Get Script Server Data (Indexed) 5 Minutes Yes Cisco Router - Temperature
test - Temp. - module 1... 23005 Get Script Server Data (Indexed) 5 Minutes Yes Cisco Router - Temperature
test - Temp. - module 4... 23008 Get Script Server Data (Indexed) 5 Minutes Yes Cisco Router - Temperature
test - Temp. - module 4... 23007 Get Script Server Data (Indexed) 5 Minutes Yes Cisco Router - Temperature
test - Temp. - module 5... 23013 Get Script Server Data (Indexed) 5 Minutes Yes Cisco Router - Temperature
Data Source Debug:
/usr/bin/rrdtool create \
/var/www/cacti-0.8.7e/rra/test_23019.rrd \
--step 300 \
DS:tmptotal:GAUGE:600:0:100 \
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 \
when I reapllie the host_template by cli with
php -q host_update_template.php --host-id=384 --host-template=10
I get:
NOTE: Updating Host 'test'
NOTE: Updating Data Queries. There were '3' Found
NOTE: Updating Data Query ID '1'
NOTE: Updating Data Query ID '10'
NOTE: Updating Data Query ID '14'
NOTE: Updating Graph Templates. There were '4' Found
and the
Associated Graph Templates
Graph Template Name Status
1) Cisco - Temperature Not Being Graphed
shows up again... but as you can seen as "not beeing graphed."
php -q host_update_template.php --host-id=384 --host-template=10
I get:
NOTE: Updating Host 'test'
NOTE: Updating Data Queries. There were '3' Found
NOTE: Updating Data Query ID '1'
NOTE: Updating Data Query ID '10'
NOTE: Updating Data Query ID '14'
NOTE: Updating Graph Templates. There were '4' Found
and the
Associated Graph Templates
Graph Template Name Status
1) Cisco - Temperature Not Being Graphed
shows up again... but as you can seen as "not beeing graphed."
trying add_graphs on the commandline
cacti@cacti:/var/www/cacti7/cli$ php -q add_graphs.php --list-graph-templates --host-template=10
ERROR: Invalid Argument: (--host-template)
Add Graphs Script 1.2, Copyright 2008 - The Cacti Group
A simple command line utility to add graphs in Cacti
usage: add_graphs.php --graph-type=[cg|ds] --graph-template-id=[ID]
--host-id=[ID] [--graph-title=title] [graph options] [--force] [--quiet]
For cg graphs:
[--input-fields="[data-template-id:]field-name=value ..."] [--force]
--input-fields If your data template allows for custom input data, you may specify that
here. The data template id is optional and applies where two input fields
have the same name.
--force If you set this flag, then new cg graphs will be created, even though they
may already exist
For ds graphs:
--snmp-query-id=[ID] --snmp-query-type-id=[ID] --snmp-field=[SNMP Field] --snmp-value=[SNMP Value]
[--graph-title=] Defaults to what ever is in the graph template/data-source template.
[--reindex-method=] the reindex method to be used for that data query
if data query already exists, the reindex method will not be changed
0|None = no reindexing
1|Uptime = Uptime goes Backwards (Default)
2|Index = Index Count Changed
3|Fields = Verify all Fields
List Options:
--list-hosts
--list-graph-templates [--host_template=[ID]]
--list-input-fields --graph-template-id=[ID]
--list-snmp-queries
--list-query-types --snmp-query-id [ID]
--list-snmp-fields --host-id=[ID] [--snmp-query-id=[ID]]
--list-snmp-values --host-id=[ID] [--snmp-query-id=[ID]] --snmp-field=[Field]
'cg' graphs are for things like CPU temp/fan speed, while
'ds' graphs are for data-source based graphs (interface stats etc.)
cacti@cacti:/var/www/cacti7/cli$ php -q add_graphs.php --list-graph-templates --host-template-id=10
Known Graph Templates:(id, name)
22 Interface - Errors/Discards
32 Interface - Traffic (bits/sec, Total Bandwidth)
35 Host CPU - Cisco Router - CPU Usage
40 Cisco - Temperature
cacti@cacti:/var/www/cacti7/cli$ php -q add_graphs.php --list-snmp-fields --host-id=384
Known SNMP Fields for host-id 384: (name)
cpuDesc
cpuDevice
cpuName
ifAlias
ifDescr
ifHwAddr
ifIndex
ifIP
ifName
ifOperStatus
ifSpeed
ifType
tmpdesc
tmpname
tmpsensor
cacti@cacti:/var/www/cacti7/cli$ php -q add_graphs.php --host-id=384 --graph-type=ds --graph-template-id=40
ERROR: For graph-type of 'ds' you must supply more options
Add Graphs Script 1.2, Copyright 2008 - The Cacti Group
A simple command line utility to add graphs in Cacti
usage: add_graphs.php --graph-type=[cg|ds] --graph-template-id=[ID]
--host-id=[ID] [--graph-title=title] [graph options] [--force] [--quiet]
For cg graphs:
[--input-fields="[data-template-id:]field-name=value ..."] [--force]
--input-fields If your data template allows for custom input data, you may specify that
here. The data template id is optional and applies where two input fields
have the same name.
--force If you set this flag, then new cg graphs will be created, even though they
may already exist
For ds graphs:
--snmp-query-id=[ID] --snmp-query-type-id=[ID] --snmp-field=[SNMP Field] --snmp-value=[SNMP Value]
[--graph-title=] Defaults to what ever is in the graph template/data-source template.
[--reindex-method=] the reindex method to be used for that data query
if data query already exists, the reindex method will not be changed
0|None = no reindexing
1|Uptime = Uptime goes Backwards (Default)
2|Index = Index Count Changed
3|Fields = Verify all Fields
List Options:
--list-hosts
--list-graph-templates [--host_template=[ID]]
--list-input-fields --graph-template-id=[ID]
--list-snmp-queries
--list-query-types --snmp-query-id [ID]
--list-snmp-fields --host-id=[ID] [--snmp-query-id=[ID]]
--list-snmp-values --host-id=[ID] [--snmp-query-id=[ID]] --snmp-field=[Field]
'cg' graphs are for things like CPU temp/fan speed, while
'ds' graphs are for data-source based graphs (interface stats etc.)
cacti@cacti:/var/www/cacti7/cli$ php -q add_graphs.php --host-id=384 --graph-type=ds --graph-template-id=40 --list-snmp-queries
Known SNMP Queries:(id, name)
1 SNMP - Interface Statistics
2 ucd/net - Get Monitored Partitions
3 Karlnet - Wireless Bridge Statistics
4 Netware - Get Available Volumes
6 Unix - Get Mounted Partitions
7 Netware - Get Processor Information
8 SNMP - Get Mounted Partitions
9 SNMP - Get Processor Information
10 Cisco Router - CPU Usage
14 Cisco - Temperature
cacti@cacti:/var/www/cacti7/cli$ php -q add_graphs.php --host-id=384 --graph-type=ds --graph-template-id=40 --list-query-types --snmp-query-id=14
Known SNMP Query Types: (id, name)
31 Cisco - Temperature
cacti@cacti:/var/www/cacti7/cli$ php -q add_graphs.php --host-id=384 --graph-type=ds --graph-template-id=40 --snmp-query-id=14 --snmp-query-type-id=31 --snmp-field=tmpsensor --snmp-value=[[:digit:]]
Graph Added - graph-id: (23024) - data-source-ids: (23025, 23025)
Graph Added - graph-id: (23025) - data-source-ids: (23026, 23026)
Graph Added - graph-id: (23026) - data-source-ids: (23027, 23027)
Graph Added - graph-id: (23027) - data-source-ids: (23028, 23028)
Graph Added - graph-id: (23028) - data-source-ids: (23029, 23029)
Graph Added - graph-id: (23029) - data-source-ids: (23030, 23030)
Graph Added - graph-id: (23030) - data-source-ids: (23031, 23031)
Graph Added - graph-id: (23031) - data-source-ids: (23032, 23032)
Graph Added - graph-id: (23032) - data-source-ids: (23033, 23033)
Graph Added - graph-id: (23033) - data-source-ids: (23034, 23034)
Graph Added - graph-id: (23034) - data-source-ids: (23035, 23035)
Graph Added - graph-id: (23035) - data-source-ids: (23036, 23036)
Graph Added - graph-id: (23036) - data-source-ids: (23037, 23037)
Graph Added - graph-id: (23037) - data-source-ids: (23038, 23038)
Graph Added - graph-id: (23038) - data-source-ids: (23039, 23039)
Graph Added - graph-id: (23039) - data-source-ids: (23040, 23040)
Graph Added - graph-id: (23040) - data-source-ids: (23041, 23041)
Graph Added - graph-id: (23041) - data-source-ids: (23042, 23042)
Graph Added - graph-id: (23042) - data-source-ids: (23043, 23043)
Graph Added - graph-id: (23043) - data-source-ids: (23044, 23044)
Graph Added - graph-id: (23044) - data-source-ids: (23045, 23045)
Graph Added - graph-id: (23045) - data-source-ids: (23046, 23046)
Graph Added - graph-id: (23046) - data-source-ids: (23047, 23047)
cacti@cacti:/var/www/cacti7/cli$ su -
Passwort:
cacti:~# cd /var/www/cacti7/cli
cacti:/var/www/cacti7/cli# php -q add_graphs.php --host-id=384 --graph-type=ds --graph-template-id=40 --snmp-query-id=14 --snmp-query-type-id=31 --snmp-field=tmpsensor --snmp-value=[[:digit:]]
Graph Added - graph-id: (23047) - data-source-ids: (23048, 23048)
Graph Added - graph-id: (23048) - data-source-ids: (23049, 23049)
Graph Added - graph-id: (23049) - data-source-ids: (23050, 23050)
Graph Added - graph-id: (23050) - data-source-ids: (23051, 23051)
Graph Added - graph-id: (23051) - data-source-ids: (23052, 23052)
Graph Added - graph-id: (23052) - data-source-ids: (23053, 23053)
Graph Added - graph-id: (23053) - data-source-ids: (23054, 23054)
Graph Added - graph-id: (23054) - data-source-ids: (23055, 23055)
Graph Added - graph-id: (23055) - data-source-ids: (23056, 23056)
Graph Added - graph-id: (23056) - data-source-ids: (23057, 23057)
Graph Added - graph-id: (23057) - data-source-ids: (23058, 23058)
Graph Added - graph-id: (23058) - data-source-ids: (23059, 23059)
Graph Added - graph-id: (23059) - data-source-ids: (23060, 23060)
Graph Added - graph-id: (23060) - data-source-ids: (23061, 23061)
Graph Added - graph-id: (23061) - data-source-ids: (23062, 23062)
Graph Added - graph-id: (23062) - data-source-ids: (23063, 23063)
Graph Added - graph-id: (23063) - data-source-ids: (23064, 23064)
Graph Added - graph-id: (23064) - data-source-ids: (23065, 23065)
Graph Added - graph-id: (23065) - data-source-ids: (23066, 23066)
Graph Added - graph-id: (23066) - data-source-ids: (23067, 23067)
Graph Added - graph-id: (23067) - data-source-ids: (23068, 23068)
Graph Added - graph-id: (23068) - data-source-ids: (23069, 23069)
Graph Added - graph-id: (23069) - data-source-ids: (23070, 23070)
Cactis shows the data sources are there and the graphes are there.
Associated Graph Templates
Graph Template Name Status
1) Cisco - Temperature Is Being Graphed (Edit) Delete Graph Template Association
2) Host CPU - Cisco Router - CPU Usage Is Being Graphed (Edit) Delete Graph Template Association
3) Interface - Errors/Discards Is Being Graphed (Edit) Delete Graph Template Association
4) Interface - Traffic (bits/sec, Total Bandwidth) Is Being Graphed (Edit) Delete Graph Template Association
Add Graph Template:
Associated Data Queries
Data Query Name Debugging Re-Index Method Status
1) Cisco - Temperature (Verbose Query) Uptime Goes Backwards Success [69 Items, 23 Rows] Reload Data Query Delete Data Query Association
2) Cisco Router - CPU Usage (Verbose Query) Uptime Goes Backwards Success [12 Items, 4 Rows] Reload Data Query Delete Data Query Association
3) SNMP - Interface Statistics (Verbose Query) Uptime Goes Backwards Success [866 Items, 108 Rows] Reload Data Query Delete Data Query Association
Graph Management Shows:
....
test - Temp. - module 5 asic-2 23061 Cisco - Temperature 120x500
test - Temp. - module 5 asic-3 23062 Cisco - Temperature 120x500
test - Temp. - module 5 asic-4 23063 Cisco - Temperature 120x500
test - Temp. - module 5 asic-5 23064 Cisco - Temperature 120x500
test - Temp. - module 5 asic-6 23065 Cisco - Temperature 120x500
test - Temp. - module 1 EARL o 23066 Cisco - Temperature 120x500
test - Temp. - module 1 EARL i 23067 Cisco - Temperature 120x500
test - Temp. - module 5 EARL o 23068 Cisco - Temperature 120x500
test - Temp. - module 5 EARL i 23069 Cisco - Temperature 120x500
....
###########################################
Lets take a deeper look at graph management:
Graph Template Selection [edit: test - Temp. - module 5 asic-4 ]
Selected Graph Template: "Cisco - Temperature"
Host: test
Supplemental Graph Template Data:
Graph Fields: |host_description| - Temp. - module 5 asic-4
Graph Item Fields:
Data Source [tmptotal]: test - Temp. - module 5 asic-4 (tmptotal)
RRDTool Command:
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="test - Temp. - module 5 asic-4 " \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="C°" \
--slope-mode \
--font TITLE:10: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/var/www/cacti-0.8.7e/rra/test_tmptotal_23064.rrd":tmptotal:AVERAGE \
CDEF:cdefe=a,300,* \
LINE1:a#FF4105FF:"" \
GPRINTLAST:"Current\:%8.2lf%s" \
GPRINTAVERAGE:"Average\:%8.2lf%s" \
GPRINTMAX:"Maximum\:%8.2lf%s\n" \
LINE3:cdefe#FF0000FF:""
RRDTool Says:
ERROR: opening '/var/www/cacti-0.8.7e/rra/test_tmptotal_23064.rrd': No such file or directory
##############################################
My XML /var/www/cacti7/resource/script_server/cisco_tmpsensor.xml looks like:
##############################################
<query>
<name>Cisco Router - Get Temperatures</name>
<description>Queries a Cisco router for managed Temperature Sensors</description>
<script_path>|path_cacti|/scripts/ss_cisco_temperature.php</script_path>
<script_function>ss_cisco_temperature.php</script_function>
<script_server>php</script_server>
<arg_prepend>|host_hostname|:|host_snmp_version|:|host_snmp_community|:|host_snmp_username|:|host_snmp_password|:|host_snmp_auth_protocol|:|host_snmp_priv_passphrase|:|host_snmp_priv_protocol|:|host_snmp_context|:|host_snmp_port|:|host_snmp_timeout|</arg_prepend>
<arg_index>index</arg_index>
<arg_query>query</arg_query>
<arg_get>get</arg_get>
<output_delimeter>:</output_delimeter>
<index_order>tmpsensor,tmpdesc</index_order>
<index_order_type>numeric</index_order_type>
<index_title_format>|chosen_order_field|</index_title_format>
<fields>
<tmpsensor>
<name>Sensor ID</name>
<direction>input</direction>
<query_name>tmpsensor</query_name>
</tmpsensor>
<tmpname>
<name>Sensor Name</name>
<direction>input</direction>
<query_name>tmpname</query_name>
</tmpname>
<tmpdesc>
<name>Sensor Description</name>
<direction>input</direction>
<query_name>tmpdesc</query_name>
</tmpdesc>
<tmptotal>
<name>Temperature Total</name>
<direction>output</direction>
<query_name>tmptotal</query_name>
</tmptotal>
</fields>
</query>
##############################################
System Utilities -> SNMP Cache Items
Searching the SNMP - Cache for the Word "temp" gives me
#############################################
Fatal error: Call to undefined function iget_request_var_request() in /var/www/cacti-0.8.7e/utilities.php on line 1229
#############################################
Searching for the "Query name" "Cisco -Temperature" gives me:
Host: test , SNMP Query: Cisco - Temperature
Index: 100051 , Field Name: tmpdesc , Field Value: module 5 RP inlet temperature
OID:
Host: test , SNMP Query: Cisco - Temperature
Index: 100050 , Field Name: tmpdesc , Field Value: module 5 RP outlet temperature
OID:
Host: test , SNMP Query: Cisco - Temperature
Index: 90051 , Field Name: tmpdesc , Field Value: module 5 EARL inlet temperature
OID:
Host: test , SNMP Query: Cisco - Temperature
Index: 90050 , Field Name: tmpdesc , Field Value: module 5 EARL outlet temperature
OID:
Host: test , SNMP Query: Cisco - Temperature
Index: 90011 , Field Name: tmpdesc , Field Value: module 1 EARL inlet temperature
OID:
Host: test , SNMP Query: Cisco - Temperature
Index: 90010 , Field Name: tmpdesc , Field Value: module 1 EARL outlet temperature
OID:
Host: test , SNMP Query: Cisco - Temperature
Index: 60059 , Field Name: tmpdesc , Field Value: module 5 asic-6 temperature
OID:
Host: test , SNMP Query: Cisco - Temperature
Index: 60058 , Field Name: tmpdesc , Field Value: module 5 asic-5 temperature
OID:
Host: test , SNMP Query: Cisco - Temperature
Index: 60057 , Field Name: tmpdesc , Field Value: module 5 asic-4 temperature
OID:
Host: test , SNMP Query: Cisco - Temperature
Index: 60056 , Field Name: tmpdesc , Field Value: module 5 asic-3 temperature
OID:
Host: test , SNMP Query: Cisco - Temperature
Index: 60055 , Field Name: tmpdesc , Field Value: module 5 asic-2 temperature
OID:
Host: test , SNMP Query: Cisco - Temperature
Index: 60054 , Field Name: tmpdesc , Field Value: module 5 asic-1 temperature
OID:
Host: test , SNMP Query: Cisco - Temperature
Index: 60052 , Field Name: tmpdesc , Field Value: module 5 device-1 temperature
OID:
Host: test , SNMP Query: Cisco - Temperature
Index: 60053 , Field Name: tmpdesc , Field Value: module 5 device-2 temperature
OID:
Host: test , SNMP Query: Cisco - Temperature
Index: 60051 , Field Name: tmpdesc , Field Value: module 5 inlet temperature
OID:
Host: test , SNMP Query: Cisco - Temperature
Index: 60050 , Field Name: tmpdesc , Field Value: module 5 outlet temperature
OID:
....
#############################################
Poller Item Cache:
The Script does not show up in the poller item cache.
Neither under host: any action: any nor host: any action:scriptserver ss_cisco_temp....
I guess this is the core of the problem....
Thats it don´t have any more debugging information...
Tell me how to fix this....
ERROR: Invalid Argument: (--host-template)
Add Graphs Script 1.2, Copyright 2008 - The Cacti Group
A simple command line utility to add graphs in Cacti
usage: add_graphs.php --graph-type=[cg|ds] --graph-template-id=[ID]
--host-id=[ID] [--graph-title=title] [graph options] [--force] [--quiet]
For cg graphs:
[--input-fields="[data-template-id:]field-name=value ..."] [--force]
--input-fields If your data template allows for custom input data, you may specify that
here. The data template id is optional and applies where two input fields
have the same name.
--force If you set this flag, then new cg graphs will be created, even though they
may already exist
For ds graphs:
--snmp-query-id=[ID] --snmp-query-type-id=[ID] --snmp-field=[SNMP Field] --snmp-value=[SNMP Value]
[--graph-title=] Defaults to what ever is in the graph template/data-source template.
[--reindex-method=] the reindex method to be used for that data query
if data query already exists, the reindex method will not be changed
0|None = no reindexing
1|Uptime = Uptime goes Backwards (Default)
2|Index = Index Count Changed
3|Fields = Verify all Fields
List Options:
--list-hosts
--list-graph-templates [--host_template=[ID]]
--list-input-fields --graph-template-id=[ID]
--list-snmp-queries
--list-query-types --snmp-query-id [ID]
--list-snmp-fields --host-id=[ID] [--snmp-query-id=[ID]]
--list-snmp-values --host-id=[ID] [--snmp-query-id=[ID]] --snmp-field=[Field]
'cg' graphs are for things like CPU temp/fan speed, while
'ds' graphs are for data-source based graphs (interface stats etc.)
cacti@cacti:/var/www/cacti7/cli$ php -q add_graphs.php --list-graph-templates --host-template-id=10
Known Graph Templates:(id, name)
22 Interface - Errors/Discards
32 Interface - Traffic (bits/sec, Total Bandwidth)
35 Host CPU - Cisco Router - CPU Usage
40 Cisco - Temperature
cacti@cacti:/var/www/cacti7/cli$ php -q add_graphs.php --list-snmp-fields --host-id=384
Known SNMP Fields for host-id 384: (name)
cpuDesc
cpuDevice
cpuName
ifAlias
ifDescr
ifHwAddr
ifIndex
ifIP
ifName
ifOperStatus
ifSpeed
ifType
tmpdesc
tmpname
tmpsensor
cacti@cacti:/var/www/cacti7/cli$ php -q add_graphs.php --host-id=384 --graph-type=ds --graph-template-id=40
ERROR: For graph-type of 'ds' you must supply more options
Add Graphs Script 1.2, Copyright 2008 - The Cacti Group
A simple command line utility to add graphs in Cacti
usage: add_graphs.php --graph-type=[cg|ds] --graph-template-id=[ID]
--host-id=[ID] [--graph-title=title] [graph options] [--force] [--quiet]
For cg graphs:
[--input-fields="[data-template-id:]field-name=value ..."] [--force]
--input-fields If your data template allows for custom input data, you may specify that
here. The data template id is optional and applies where two input fields
have the same name.
--force If you set this flag, then new cg graphs will be created, even though they
may already exist
For ds graphs:
--snmp-query-id=[ID] --snmp-query-type-id=[ID] --snmp-field=[SNMP Field] --snmp-value=[SNMP Value]
[--graph-title=] Defaults to what ever is in the graph template/data-source template.
[--reindex-method=] the reindex method to be used for that data query
if data query already exists, the reindex method will not be changed
0|None = no reindexing
1|Uptime = Uptime goes Backwards (Default)
2|Index = Index Count Changed
3|Fields = Verify all Fields
List Options:
--list-hosts
--list-graph-templates [--host_template=[ID]]
--list-input-fields --graph-template-id=[ID]
--list-snmp-queries
--list-query-types --snmp-query-id [ID]
--list-snmp-fields --host-id=[ID] [--snmp-query-id=[ID]]
--list-snmp-values --host-id=[ID] [--snmp-query-id=[ID]] --snmp-field=[Field]
'cg' graphs are for things like CPU temp/fan speed, while
'ds' graphs are for data-source based graphs (interface stats etc.)
cacti@cacti:/var/www/cacti7/cli$ php -q add_graphs.php --host-id=384 --graph-type=ds --graph-template-id=40 --list-snmp-queries
Known SNMP Queries:(id, name)
1 SNMP - Interface Statistics
2 ucd/net - Get Monitored Partitions
3 Karlnet - Wireless Bridge Statistics
4 Netware - Get Available Volumes
6 Unix - Get Mounted Partitions
7 Netware - Get Processor Information
8 SNMP - Get Mounted Partitions
9 SNMP - Get Processor Information
10 Cisco Router - CPU Usage
14 Cisco - Temperature
cacti@cacti:/var/www/cacti7/cli$ php -q add_graphs.php --host-id=384 --graph-type=ds --graph-template-id=40 --list-query-types --snmp-query-id=14
Known SNMP Query Types: (id, name)
31 Cisco - Temperature
cacti@cacti:/var/www/cacti7/cli$ php -q add_graphs.php --host-id=384 --graph-type=ds --graph-template-id=40 --snmp-query-id=14 --snmp-query-type-id=31 --snmp-field=tmpsensor --snmp-value=[[:digit:]]
Graph Added - graph-id: (23024) - data-source-ids: (23025, 23025)
Graph Added - graph-id: (23025) - data-source-ids: (23026, 23026)
Graph Added - graph-id: (23026) - data-source-ids: (23027, 23027)
Graph Added - graph-id: (23027) - data-source-ids: (23028, 23028)
Graph Added - graph-id: (23028) - data-source-ids: (23029, 23029)
Graph Added - graph-id: (23029) - data-source-ids: (23030, 23030)
Graph Added - graph-id: (23030) - data-source-ids: (23031, 23031)
Graph Added - graph-id: (23031) - data-source-ids: (23032, 23032)
Graph Added - graph-id: (23032) - data-source-ids: (23033, 23033)
Graph Added - graph-id: (23033) - data-source-ids: (23034, 23034)
Graph Added - graph-id: (23034) - data-source-ids: (23035, 23035)
Graph Added - graph-id: (23035) - data-source-ids: (23036, 23036)
Graph Added - graph-id: (23036) - data-source-ids: (23037, 23037)
Graph Added - graph-id: (23037) - data-source-ids: (23038, 23038)
Graph Added - graph-id: (23038) - data-source-ids: (23039, 23039)
Graph Added - graph-id: (23039) - data-source-ids: (23040, 23040)
Graph Added - graph-id: (23040) - data-source-ids: (23041, 23041)
Graph Added - graph-id: (23041) - data-source-ids: (23042, 23042)
Graph Added - graph-id: (23042) - data-source-ids: (23043, 23043)
Graph Added - graph-id: (23043) - data-source-ids: (23044, 23044)
Graph Added - graph-id: (23044) - data-source-ids: (23045, 23045)
Graph Added - graph-id: (23045) - data-source-ids: (23046, 23046)
Graph Added - graph-id: (23046) - data-source-ids: (23047, 23047)
cacti@cacti:/var/www/cacti7/cli$ su -
Passwort:
cacti:~# cd /var/www/cacti7/cli
cacti:/var/www/cacti7/cli# php -q add_graphs.php --host-id=384 --graph-type=ds --graph-template-id=40 --snmp-query-id=14 --snmp-query-type-id=31 --snmp-field=tmpsensor --snmp-value=[[:digit:]]
Graph Added - graph-id: (23047) - data-source-ids: (23048, 23048)
Graph Added - graph-id: (23048) - data-source-ids: (23049, 23049)
Graph Added - graph-id: (23049) - data-source-ids: (23050, 23050)
Graph Added - graph-id: (23050) - data-source-ids: (23051, 23051)
Graph Added - graph-id: (23051) - data-source-ids: (23052, 23052)
Graph Added - graph-id: (23052) - data-source-ids: (23053, 23053)
Graph Added - graph-id: (23053) - data-source-ids: (23054, 23054)
Graph Added - graph-id: (23054) - data-source-ids: (23055, 23055)
Graph Added - graph-id: (23055) - data-source-ids: (23056, 23056)
Graph Added - graph-id: (23056) - data-source-ids: (23057, 23057)
Graph Added - graph-id: (23057) - data-source-ids: (23058, 23058)
Graph Added - graph-id: (23058) - data-source-ids: (23059, 23059)
Graph Added - graph-id: (23059) - data-source-ids: (23060, 23060)
Graph Added - graph-id: (23060) - data-source-ids: (23061, 23061)
Graph Added - graph-id: (23061) - data-source-ids: (23062, 23062)
Graph Added - graph-id: (23062) - data-source-ids: (23063, 23063)
Graph Added - graph-id: (23063) - data-source-ids: (23064, 23064)
Graph Added - graph-id: (23064) - data-source-ids: (23065, 23065)
Graph Added - graph-id: (23065) - data-source-ids: (23066, 23066)
Graph Added - graph-id: (23066) - data-source-ids: (23067, 23067)
Graph Added - graph-id: (23067) - data-source-ids: (23068, 23068)
Graph Added - graph-id: (23068) - data-source-ids: (23069, 23069)
Graph Added - graph-id: (23069) - data-source-ids: (23070, 23070)
Cactis shows the data sources are there and the graphes are there.
Associated Graph Templates
Graph Template Name Status
1) Cisco - Temperature Is Being Graphed (Edit) Delete Graph Template Association
2) Host CPU - Cisco Router - CPU Usage Is Being Graphed (Edit) Delete Graph Template Association
3) Interface - Errors/Discards Is Being Graphed (Edit) Delete Graph Template Association
4) Interface - Traffic (bits/sec, Total Bandwidth) Is Being Graphed (Edit) Delete Graph Template Association
Add Graph Template:
Associated Data Queries
Data Query Name Debugging Re-Index Method Status
1) Cisco - Temperature (Verbose Query) Uptime Goes Backwards Success [69 Items, 23 Rows] Reload Data Query Delete Data Query Association
2) Cisco Router - CPU Usage (Verbose Query) Uptime Goes Backwards Success [12 Items, 4 Rows] Reload Data Query Delete Data Query Association
3) SNMP - Interface Statistics (Verbose Query) Uptime Goes Backwards Success [866 Items, 108 Rows] Reload Data Query Delete Data Query Association
Graph Management Shows:
....
test - Temp. - module 5 asic-2 23061 Cisco - Temperature 120x500
test - Temp. - module 5 asic-3 23062 Cisco - Temperature 120x500
test - Temp. - module 5 asic-4 23063 Cisco - Temperature 120x500
test - Temp. - module 5 asic-5 23064 Cisco - Temperature 120x500
test - Temp. - module 5 asic-6 23065 Cisco - Temperature 120x500
test - Temp. - module 1 EARL o 23066 Cisco - Temperature 120x500
test - Temp. - module 1 EARL i 23067 Cisco - Temperature 120x500
test - Temp. - module 5 EARL o 23068 Cisco - Temperature 120x500
test - Temp. - module 5 EARL i 23069 Cisco - Temperature 120x500
....
###########################################
Lets take a deeper look at graph management:
Graph Template Selection [edit: test - Temp. - module 5 asic-4 ]
Selected Graph Template: "Cisco - Temperature"
Host: test
Supplemental Graph Template Data:
Graph Fields: |host_description| - Temp. - module 5 asic-4
Graph Item Fields:
Data Source [tmptotal]: test - Temp. - module 5 asic-4 (tmptotal)
RRDTool Command:
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="test - Temp. - module 5 asic-4 " \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="C°" \
--slope-mode \
--font TITLE:10: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/var/www/cacti-0.8.7e/rra/test_tmptotal_23064.rrd":tmptotal:AVERAGE \
CDEF:cdefe=a,300,* \
LINE1:a#FF4105FF:"" \
GPRINTLAST:"Current\:%8.2lf%s" \
GPRINTAVERAGE:"Average\:%8.2lf%s" \
GPRINTMAX:"Maximum\:%8.2lf%s\n" \
LINE3:cdefe#FF0000FF:""
RRDTool Says:
ERROR: opening '/var/www/cacti-0.8.7e/rra/test_tmptotal_23064.rrd': No such file or directory
##############################################
My XML /var/www/cacti7/resource/script_server/cisco_tmpsensor.xml looks like:
##############################################
<query>
<name>Cisco Router - Get Temperatures</name>
<description>Queries a Cisco router for managed Temperature Sensors</description>
<script_path>|path_cacti|/scripts/ss_cisco_temperature.php</script_path>
<script_function>ss_cisco_temperature.php</script_function>
<script_server>php</script_server>
<arg_prepend>|host_hostname|:|host_snmp_version|:|host_snmp_community|:|host_snmp_username|:|host_snmp_password|:|host_snmp_auth_protocol|:|host_snmp_priv_passphrase|:|host_snmp_priv_protocol|:|host_snmp_context|:|host_snmp_port|:|host_snmp_timeout|</arg_prepend>
<arg_index>index</arg_index>
<arg_query>query</arg_query>
<arg_get>get</arg_get>
<output_delimeter>:</output_delimeter>
<index_order>tmpsensor,tmpdesc</index_order>
<index_order_type>numeric</index_order_type>
<index_title_format>|chosen_order_field|</index_title_format>
<fields>
<tmpsensor>
<name>Sensor ID</name>
<direction>input</direction>
<query_name>tmpsensor</query_name>
</tmpsensor>
<tmpname>
<name>Sensor Name</name>
<direction>input</direction>
<query_name>tmpname</query_name>
</tmpname>
<tmpdesc>
<name>Sensor Description</name>
<direction>input</direction>
<query_name>tmpdesc</query_name>
</tmpdesc>
<tmptotal>
<name>Temperature Total</name>
<direction>output</direction>
<query_name>tmptotal</query_name>
</tmptotal>
</fields>
</query>
##############################################
System Utilities -> SNMP Cache Items
Searching the SNMP - Cache for the Word "temp" gives me
#############################################
Fatal error: Call to undefined function iget_request_var_request() in /var/www/cacti-0.8.7e/utilities.php on line 1229
#############################################
Searching for the "Query name" "Cisco -Temperature" gives me:
Host: test , SNMP Query: Cisco - Temperature
Index: 100051 , Field Name: tmpdesc , Field Value: module 5 RP inlet temperature
OID:
Host: test , SNMP Query: Cisco - Temperature
Index: 100050 , Field Name: tmpdesc , Field Value: module 5 RP outlet temperature
OID:
Host: test , SNMP Query: Cisco - Temperature
Index: 90051 , Field Name: tmpdesc , Field Value: module 5 EARL inlet temperature
OID:
Host: test , SNMP Query: Cisco - Temperature
Index: 90050 , Field Name: tmpdesc , Field Value: module 5 EARL outlet temperature
OID:
Host: test , SNMP Query: Cisco - Temperature
Index: 90011 , Field Name: tmpdesc , Field Value: module 1 EARL inlet temperature
OID:
Host: test , SNMP Query: Cisco - Temperature
Index: 90010 , Field Name: tmpdesc , Field Value: module 1 EARL outlet temperature
OID:
Host: test , SNMP Query: Cisco - Temperature
Index: 60059 , Field Name: tmpdesc , Field Value: module 5 asic-6 temperature
OID:
Host: test , SNMP Query: Cisco - Temperature
Index: 60058 , Field Name: tmpdesc , Field Value: module 5 asic-5 temperature
OID:
Host: test , SNMP Query: Cisco - Temperature
Index: 60057 , Field Name: tmpdesc , Field Value: module 5 asic-4 temperature
OID:
Host: test , SNMP Query: Cisco - Temperature
Index: 60056 , Field Name: tmpdesc , Field Value: module 5 asic-3 temperature
OID:
Host: test , SNMP Query: Cisco - Temperature
Index: 60055 , Field Name: tmpdesc , Field Value: module 5 asic-2 temperature
OID:
Host: test , SNMP Query: Cisco - Temperature
Index: 60054 , Field Name: tmpdesc , Field Value: module 5 asic-1 temperature
OID:
Host: test , SNMP Query: Cisco - Temperature
Index: 60052 , Field Name: tmpdesc , Field Value: module 5 device-1 temperature
OID:
Host: test , SNMP Query: Cisco - Temperature
Index: 60053 , Field Name: tmpdesc , Field Value: module 5 device-2 temperature
OID:
Host: test , SNMP Query: Cisco - Temperature
Index: 60051 , Field Name: tmpdesc , Field Value: module 5 inlet temperature
OID:
Host: test , SNMP Query: Cisco - Temperature
Index: 60050 , Field Name: tmpdesc , Field Value: module 5 outlet temperature
OID:
....
#############################################
Poller Item Cache:
The Script does not show up in the poller item cache.
Neither under host: any action: any nor host: any action:scriptserver ss_cisco_temp....
I guess this is the core of the problem....
Thats it don´t have any more debugging information...
Tell me how to fix this....
The RRD files should be created by the poller.
So the first poller run after you create a graph/datasource creates the rrd file.
So the first poller run after you create a graph/datasource creates the rrd file.
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan
Thanks so far.
But in this case the rrd-files are not created.
What does the poller check to notice that a rrd-files does not exit?
How can I use the poller on the cli to check manuelly for cinfiguration errors or errormessages that show up when it tries to set up an rrd file?
This also means it could take up to "n"-minutes until the rrd is created?
But in this case the rrd-files are not created.
What does the poller check to notice that a rrd-files does not exit?
How can I use the poller on the cli to check manuelly for cinfiguration errors or errormessages that show up when it tries to set up an rrd file?
This also means it could take up to "n"-minutes until the rrd is created?
you can run the poller in debug mode:
I gues the poller checks if the file exists, if it doesn't it will be created. Also make sure the user who runs the poller has permissions to write to your rrd directory.
Code: Select all
php /path/to/cacti/poller.php --debug
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan
Thanks!
Joop I check that. permissions should be no-problem here.
I figured out that normaly the rrd-files will be generated asychron, not directly. I thought that cmd.php will be triggered at the same moment I hit the button...
ok but still the files in my case are not created. So I wll turn on the --debug hope that this will give me a deeper look.
PS: Great fooder you have there.
Joop I check that. permissions should be no-problem here.
I figured out that normaly the rrd-files will be generated asychron, not directly. I thought that cmd.php will be triggered at the same moment I hit the button...
ok but still the files in my case are not created. So I wll turn on the --debug hope that this will give me a deeper look.
PS: Great fooder you have there.
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Way too much information, but whatever.
1) The poller cache dictates what is polled
2) The poller.php launches cmd.php or spine to ask questions of devices
3) The cmd.php or spine write to poller_output table
4) poller.php empties poller_output, by first creating the rrdfile, if it does not exist, and then adding the values from the poller_output table to that rrdfile
There are a few things that can go wrong:
1) There is no entry in the poller cache for the item in question - Template Issue
2) There are entries but no RRDfiles - Either permissions, or problem with poller, or RRDtool crashing, or less likely Template issue
Diagnosis:
1) Run "php -q poller.php --force" as root. If you don't get Ok's, then RRDtool crash likely
2) If files suddenly appear in rra folder. Permissions.
Hope this helps, "a little".
TheWitness
1) The poller cache dictates what is polled
2) The poller.php launches cmd.php or spine to ask questions of devices
3) The cmd.php or spine write to poller_output table
4) poller.php empties poller_output, by first creating the rrdfile, if it does not exist, and then adding the values from the poller_output table to that rrdfile
There are a few things that can go wrong:
1) There is no entry in the poller cache for the item in question - Template Issue
2) There are entries but no RRDfiles - Either permissions, or problem with poller, or RRDtool crashing, or less likely Template issue
Diagnosis:
1) Run "php -q poller.php --force" as root. If you don't get Ok's, then RRDtool crash likely
2) If files suddenly appear in rra folder. Permissions.
Hope this helps, "a little".
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
-
- Posts: 3
- Joined: Tue Feb 24, 2009 1:16 pm
Hi all,
I have the same problem like the other ones before me, but still see no RRDfiles. I am using cmd.php and e.g. as the command to add the graphs.
Debugging through the poller.php only shows... nothing... the graphs are not in the poller.php (except the graphs, I creating directly within cacti). Although, the graphs, which were created by cli, I find in the poller cache.
As Witness said, there must be an error in one of those:
problem with poller --> might there be a (general) problem, if the graphs created in cacti itself were polled correctly?
RRDTool crashing --> How may I check this? Same as with problem with poller: A problem, although the graphs in cacti are ok?
template issue --> I use the same templates for my cacti created graphs
crontab etc. is working fine, too.
Hope someone could help me
Greetz Tom
I have the same problem like the other ones before me, but still see no RRDfiles. I am using cmd.php and e.g.
Code: Select all
php add_graphs.php --graph-type="cg" --graph-template-id=57 --host-id=105 --graph-title="abcdef"
Debugging through the poller.php only shows... nothing... the graphs are not in the poller.php (except the graphs, I creating directly within cacti). Although, the graphs, which were created by cli, I find in the poller cache.
As Witness said, there must be an error in one of those:
So I checked permissions --> permissions are ok (777)2) There are entries but no RRDfiles - Either permissions, or problem with poller, or RRDtool crashing, or less likely Template issue
problem with poller --> might there be a (general) problem, if the graphs created in cacti itself were polled correctly?
RRDTool crashing --> How may I check this? Same as with problem with poller: A problem, although the graphs in cacti are ok?
template issue --> I use the same templates for my cacti created graphs
crontab etc. is working fine, too.
Hope someone could help me
Greetz Tom
Who is online
Users browsing this forum: No registered users and 2 guests