Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Thu Apr 18, 2019 12:00 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: hddtemp template (update)
PostPosted: Sun Aug 27, 2006 9:16 am 
Offline

Joined: Sat Aug 26, 2006 11:32 am
Posts: 5
Location: France
Hello,

I've made a template to query hddtemp deamon and graph disks temperature.
Tested with cacti 0.8.6h on fc5, debian and gentoo. It uses only php core functions, no extra librairies are needed.

INSTALLATION :
1 - Install and configure hddtemp daemon
Test it with "telnet <host> 7634" from your cacti box
Output should be similar to :
"|/dev/hda|IBM-DJNA-371350|47|C||/dev/hdc|Maxtor 6Y080L0|44|C|"
2 - Copy hddtemp.xml to resources/script_queries directory
3 - Copy hddtemp.php to scripts directory
4 - Import template file cacti_template_linux_hddtemp_disk_temperature.xml
5 - Add "Linux - hddtemp - disk temperature" data query to your host
6 - Create new graph for this host and select disks

GROUPING GRAPHS :
If you want to group several disks on the same graph :
1 - Import cacti_graph_template_linux_hddtemp_disk_temperature_2x.xml or cacti_graph_template_linux_hddtemp_disk_temperature_
9.xml templates
2 - Create a graph for each disk as described above
3 - Create a graph for your host using 2x or 9x template, let fields empty
4 - Edit the graph and select data sources previously created
5 - You can delete single-disk graphs but not data sources
NOTE : You need exactly 2 or 9 disks, or you'll have to modify the template.

There are some caveats :
- No error handling in script
- With 2x or 9x templates, rrdtool graph command is invalid if graph items don't have associated data source. Request : Could cacti simply ignore these data items ?
- When adding 2x or 9x graph, cacti creates a data source named "- Disk temperature |query_device|", I didn't manage to avoid this. Update: SOLVED in 0.8.1

Regards.

Cyril


Attachments:
cacti-linux-hddtemp-0.8.1.tar.gz [6.04 KiB]
Downloaded 5879 times
File comment: Example with 9x template
graph_image.php.png
graph_image.php.png [ 39.52 KiB | Viewed 50146 times ]
Top
 Profile  
 
 Post subject: hddtemp template v0.8.2
PostPosted: Sat Sep 16, 2006 11:02 am 
Offline

Joined: Sat Aug 26, 2006 11:32 am
Posts: 5
Location: France
Here is v0.8.2

There was a litte bug with 9x template, it is now fixed.

Cyril

PS : I didn't get any feeback until now, please let me know if you use it.


Attachments:
File comment: 9x template, monhtly view
graph_image.php.png
graph_image.php.png [ 43.63 KiB | Viewed 49912 times ]
cacti-linux-hddtemp-0.8.2.tar.gz [6.27 KiB]
Downloaded 2997 times
Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 22, 2006 5:34 pm 
Offline

Joined: Fri Sep 22, 2006 5:33 pm
Posts: 1
Thanks for the template, it was very easy to install given the excellent description :)
It was just what i was after!


Top
 Profile  
 
 Post subject: Hllo
PostPosted: Sun Sep 24, 2006 2:59 pm 
Offline

Joined: Sun Sep 24, 2006 2:48 pm
Posts: 0
Very nice work !

But ... (there is always one ;))

I have a probleme with the disk selection ... i dont know how the devices are find by the script, but i got this when the graph debug mode is turned on :

RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="BigOne - Disks temperature" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
--slope-mode \
LINE1:#FF0000:"|query_device| (|query_model|)" \
GPRINT::LAST:"Cur\:%8.2lf%s" \
GPRINT::AVERAGE:"Avg\:%8.2lf%s" \
GPRINT::MAX:"Max\:%8.2lf%s\n" \
LINE1:#ED5394:"|query_device| (|query_model|)" \
GPRINT::LAST:"Cur\:%8.2lf%s" \
GPRINT::AVERAGE:"Avg\:%8.2lf%s" \
GPRINT::MAX:"Max\:%8.2lf%s\n" \
LINE1:#35962B:"|query_device| (|query_model|)" \
GPRINT::LAST:"Cur\:%8.2lf%s" \
GPRINT::AVERAGE:"Avg\:%8.2lf%s" \
GPRINT::MAX:"Max\:%8.2lf%s\n" \
LINE1:#F5F800:"|query_device| (|query_model|)" \
GPRINT::LAST:"Cur\:%8.2lf%s" \
GPRINT::AVERAGE:"Avg\:%8.2lf%s" \
GPRINT::MAX:"Max\:%8.2lf%s\n" \
LINE1:#4123A1:"|query_device| (|query_model|)" \
GPRINT::LAST:"Cur\:%8.2lf%s" \
GPRINT::AVERAGE:"Avg\:%8.2lf%s" \
GPRINT::MAX:"Max\:%8.2lf%s\n" \
LINE1:#562B29:"|query_device| (|query_model|)" \
GPRINT::LAST:"Cur\:%8.2lf%s" \
GPRINT::AVERAGE:"Avg\:%8.2lf%s" \
GPRINT::MAX:"Max\:%8.2lf%s\n" \
LINE1:#EE5019:"|query_device| (|query_model|)" \
GPRINT::LAST:"Cur\:%8.2lf%s" \
GPRINT::AVERAGE:"Avg\:%8.2lf%s" \
GPRINT::MAX:"Max\:%8.2lf%s\n" \
LINE1:#C4FD3D:"|query_device| (|query_model|)" \
GPRINT::LAST:"Cur\:%8.2lf%s" \
GPRINT::AVERAGE:"Avg\:%8.2lf%s" \
GPRINT::MAX:"Max\:%8.2lf%s\n" \
LINE1:#000000:"|query_device| (|query_model|)" \
GPRINT::LAST:"Cur\:%8.2lf%s" \
GPRINT::AVERAGE:"Avg\:%8.2lf%s" \
GPRINT::MAX:"Max\:%8.2lf%s"

RRDTool Says:

ERROR: Not a valid vname: #FF0000 in line LINE1:#FF0000:|query_device| (|query_model|)

Maybe it's because my partitions are on raid devices and not real hard disk partitions ? ( "/" mounted on "/dev/md0" (/dev/sda1 & /dev/sdb1) ... )

If you have an idea ... ;)

Thx in advance

C


Top
 Profile  
 
 Post subject: Hllo
PostPosted: Sun Sep 24, 2006 3:00 pm 
Offline

Joined: Sun Sep 24, 2006 2:48 pm
Posts: 0
Very nice work !

But ... (there is always one ;))

I have a probleme with the disk selection ... i dont know how the devices are find by the script, but i got this when the graph debug_mode is turned on :

RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="BigOne - Disks temperature" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
--slope-mode \
LINE1:#FF0000:"|query_device| (|query_model|)" \
GPRINT::LAST:"Cur\:%8.2lf%s" \
GPRINT::AVERAGE:"Avg\:%8.2lf%s" \
GPRINT::MAX:"Max\:%8.2lf%s\n" \
LINE1:#ED5394:"|query_device| (|query_model|)" \
GPRINT::LAST:"Cur\:%8.2lf%s" \
GPRINT::AVERAGE:"Avg\:%8.2lf%s" \
GPRINT::MAX:"Max\:%8.2lf%s\n" \
LINE1:#35962B:"|query_device| (|query_model|)" \
GPRINT::LAST:"Cur\:%8.2lf%s" \
GPRINT::AVERAGE:"Avg\:%8.2lf%s" \
GPRINT::MAX:"Max\:%8.2lf%s\n" \
LINE1:#F5F800:"|query_device| (|query_model|)" \
GPRINT::LAST:"Cur\:%8.2lf%s" \
GPRINT::AVERAGE:"Avg\:%8.2lf%s" \
GPRINT::MAX:"Max\:%8.2lf%s\n" \
LINE1:#4123A1:"|query_device| (|query_model|)" \
GPRINT::LAST:"Cur\:%8.2lf%s" \
GPRINT::AVERAGE:"Avg\:%8.2lf%s" \
GPRINT::MAX:"Max\:%8.2lf%s\n" \
LINE1:#562B29:"|query_device| (|query_model|)" \
GPRINT::LAST:"Cur\:%8.2lf%s" \
GPRINT::AVERAGE:"Avg\:%8.2lf%s" \
GPRINT::MAX:"Max\:%8.2lf%s\n" \
LINE1:#EE5019:"|query_device| (|query_model|)" \
GPRINT::LAST:"Cur\:%8.2lf%s" \
GPRINT::AVERAGE:"Avg\:%8.2lf%s" \
GPRINT::MAX:"Max\:%8.2lf%s\n" \
LINE1:#C4FD3D:"|query_device| (|query_model|)" \
GPRINT::LAST:"Cur\:%8.2lf%s" \
GPRINT::AVERAGE:"Avg\:%8.2lf%s" \
GPRINT::MAX:"Max\:%8.2lf%s\n" \
LINE1:#000000:"|query_device| (|query_model|)" \
GPRINT::LAST:"Cur\:%8.2lf%s" \
GPRINT::AVERAGE:"Avg\:%8.2lf%s" \
GPRINT::MAX:"Max\:%8.2lf%s"

RRDTool Says:

ERROR: Not a valid vname: #FF0000 in line LINE1:#FF0000:|query_device| (|query_model|)

Maybe it's because my partitions are on raid devices and not real hard disk partitions ? ( "/" mounted on "/dev/md0" (/dev/sda1 & /dev/sdb1) ... )

If you have an idea ... ;)

Thx in advance

C


Top
 Profile  
 
 Post subject: Hllo
PostPosted: Sun Sep 24, 2006 3:00 pm 
Offline

Joined: Sun Sep 24, 2006 2:48 pm
Posts: 0
Very nice work !

But ... (there is always one ;))

I have a probleme with the disk selection ... i dont know how the devices are find by the script, but i got this when the graph debug_mode is turned on :

RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="BigOne - Disks temperature" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
--slope-mode \
LINE1:#FF0000:"|query_device| (|query_model|)" \
GPRINT::LAST:"Cur\:%8.2lf%s" \
GPRINT::AVERAGE:"Avg\:%8.2lf%s" \
GPRINT::MAX:"Max\:%8.2lf%s\n" \
LINE1:#ED5394:"|query_device| (|query_model|)" \
GPRINT::LAST:"Cur\:%8.2lf%s" \
GPRINT::AVERAGE:"Avg\:%8.2lf%s" \
GPRINT::MAX:"Max\:%8.2lf%s\n" \
LINE1:#35962B:"|query_device| (|query_model|)" \
GPRINT::LAST:"Cur\:%8.2lf%s" \
GPRINT::AVERAGE:"Avg\:%8.2lf%s" \
GPRINT::MAX:"Max\:%8.2lf%s\n" \
LINE1:#F5F800:"|query_device| (|query_model|)" \
GPRINT::LAST:"Cur\:%8.2lf%s" \
GPRINT::AVERAGE:"Avg\:%8.2lf%s" \
GPRINT::MAX:"Max\:%8.2lf%s\n" \
LINE1:#4123A1:"|query_device| (|query_model|)" \
GPRINT::LAST:"Cur\:%8.2lf%s" \
GPRINT::AVERAGE:"Avg\:%8.2lf%s" \
GPRINT::MAX:"Max\:%8.2lf%s\n" \
LINE1:#562B29:"|query_device| (|query_model|)" \
GPRINT::LAST:"Cur\:%8.2lf%s" \
GPRINT::AVERAGE:"Avg\:%8.2lf%s" \
GPRINT::MAX:"Max\:%8.2lf%s\n" \
LINE1:#EE5019:"|query_device| (|query_model|)" \
GPRINT::LAST:"Cur\:%8.2lf%s" \
GPRINT::AVERAGE:"Avg\:%8.2lf%s" \
GPRINT::MAX:"Max\:%8.2lf%s\n" \
LINE1:#C4FD3D:"|query_device| (|query_model|)" \
GPRINT::LAST:"Cur\:%8.2lf%s" \
GPRINT::AVERAGE:"Avg\:%8.2lf%s" \
GPRINT::MAX:"Max\:%8.2lf%s\n" \
LINE1:#000000:"|query_device| (|query_model|)" \
GPRINT::LAST:"Cur\:%8.2lf%s" \
GPRINT::AVERAGE:"Avg\:%8.2lf%s" \
GPRINT::MAX:"Max\:%8.2lf%s"

RRDTool Says:

ERROR: Not a valid vname: #FF0000 in line LINE1:#FF0000:|query_device| (|query_model|)

Maybe it's because my partitions are on raid devices and not real hard disk partitions ? ( "/" mounted on "/dev/md0" (/dev/sda1 & /dev/sdb1) ... )

If you have an idea ... ;)

Thx in advance

C


Top
 Profile  
 
 Post subject: Hllo
PostPosted: Sun Sep 24, 2006 3:01 pm 
Offline

Joined: Sun Sep 24, 2006 2:48 pm
Posts: 0
Very nice work !

But ... (there is always one ;))

I have a probleme with the disk selection ... i dont know how the devices are find by the script, but i got this :

RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="BigOne - Disks temperature" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
--slope-mode \
LINE1:#FF0000:"|query_device| (|query_model|)" \
GPRINT::LAST:"Cur\:%8.2lf%s" \
GPRINT::AVERAGE:"Avg\:%8.2lf%s" \
GPRINT::MAX:"Max\:%8.2lf%s\n" \
LINE1:#ED5394:"|query_device| (|query_model|)" \
GPRINT::LAST:"Cur\:%8.2lf%s" \
GPRINT::AVERAGE:"Avg\:%8.2lf%s" \
GPRINT::MAX:"Max\:%8.2lf%s\n" \
LINE1:#35962B:"|query_device| (|query_model|)" \
GPRINT::LAST:"Cur\:%8.2lf%s" \
GPRINT::AVERAGE:"Avg\:%8.2lf%s" \
GPRINT::MAX:"Max\:%8.2lf%s\n" \
LINE1:#F5F800:"|query_device| (|query_model|)" \
GPRINT::LAST:"Cur\:%8.2lf%s" \
GPRINT::AVERAGE:"Avg\:%8.2lf%s" \
GPRINT::MAX:"Max\:%8.2lf%s\n" \
LINE1:#4123A1:"|query_device| (|query_model|)" \
GPRINT::LAST:"Cur\:%8.2lf%s" \
GPRINT::AVERAGE:"Avg\:%8.2lf%s" \
GPRINT::MAX:"Max\:%8.2lf%s\n" \
LINE1:#562B29:"|query_device| (|query_model|)" \
GPRINT::LAST:"Cur\:%8.2lf%s" \
GPRINT::AVERAGE:"Avg\:%8.2lf%s" \
GPRINT::MAX:"Max\:%8.2lf%s\n" \
LINE1:#EE5019:"|query_device| (|query_model|)" \
GPRINT::LAST:"Cur\:%8.2lf%s" \
GPRINT::AVERAGE:"Avg\:%8.2lf%s" \
GPRINT::MAX:"Max\:%8.2lf%s\n" \
LINE1:#C4FD3D:"|query_device| (|query_model|)" \
GPRINT::LAST:"Cur\:%8.2lf%s" \
GPRINT::AVERAGE:"Avg\:%8.2lf%s" \
GPRINT::MAX:"Max\:%8.2lf%s\n" \
LINE1:#000000:"|query_device| (|query_model|)" \
GPRINT::LAST:"Cur\:%8.2lf%s" \
GPRINT::AVERAGE:"Avg\:%8.2lf%s" \
GPRINT::MAX:"Max\:%8.2lf%s"

RRDTool Says:

ERROR: Not a valid vname: #FF0000 in line LINE1:#FF0000:|query_device| (|query_model|)

Maybe it's because my partitions are on raid devices and not real hard disk partitions ? ( "/" mounted on "/dev/md0" (/dev/sda1 & /dev/sdb1) ... )

If you have an idea ... ;)

Thx in advance

C


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 30, 2006 4:16 pm 
Offline

Joined: Sat Aug 26, 2006 11:32 am
Posts: 5
Location: France
Hello,

The script does not query devices, it queries hddtemp deamon. And hddtemp can query disk even if it isn't mounted since it's a REAL disk, not virtual raid disks.
Please post the results of "telnet host 7634" and/or hddtemp output on /dev/sda and sdb
It also seems you're creating a 9x template without creating single data sources.
Did you try creating single-disk graph ?
Follow carefully the first steps and tell me if it works.

Regards.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 20, 2007 6:50 pm 
Offline

Joined: Sat Aug 26, 2006 11:32 am
Posts: 5
Location: France
This template can now be downloaded from http://www.pawelko.net/Cacti/3-Hddtemp-Template-For-Cacti

It has been downloaded more than 200 times, and no bug was reported, I suppose it works correctly.

Cyril.

_________________
http://www.pawelko.net/


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 20, 2007 3:19 pm 
Offline

Joined: Mon Jan 19, 2004 6:24 pm
Posts: 3
cyril wrote:
This template can now be downloaded from http://www.pawelko.net/Cacti/3-Hddtemp-Template-For-Cacti

It has been downloaded more than 200 times, and no bug was reported, I suppose it works correctly.

Cyril.

Works great! Thanks for setting up the 9x so it's easy for everybody who has fewer drives!


Top
 Profile  
 
 Post subject: Trouble creating a 6 disk setup
PostPosted: Tue Feb 27, 2007 2:44 pm 
Offline
Cacti User
User avatar

Joined: Tue Aug 22, 2006 3:07 am
Posts: 64
Location: Rotterdam, The Netherlands
I am having trouble creating a 6 disk setup..

I tried editing the 9 disk version back to 6 in the XML file itself and import it and i tried importing the 9 disk version and stripping 3 drives off but to no avail..

The logfile shows strange errors and 6 graphs get created without any name or anything !?!?

This is what showed up in the log after stripping 3 drives from the 9 drive import :


Any chance on somebody helping me out here ??
Quote:
02/27/2007 09:50:44 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "select data_input_fields.type_code, data_input_data.value from (data_input_fields,data_input_data) where data_input_fields.id=data_input_data.data_input_field_id and data_input_data.data_template_data_id= and (data_input_fields.type_code='index_type' or data_input_fields.type_code='index_value' or data_input_fields.type_code='output_type')"
02/27/2007 09:50:44 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "select data_input_fields.type_code, data_input_data.value from (data_input_fields,data_input_data) where data_input_fields.id=data_input_data.data_input_field_id and data_input_data.data_template_data_id= and (data_input_fields.type_code='index_type' or data_input_fields.type_code='index_value' or data_input_fields.type_code='output_type')"
02/27/2007 09:50:44 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "select data_input_fields.type_code, data_input_data.value from (data_input_fields,data_input_data) where data_input_fields.id=data_input_data.data_input_field_id and data_input_data.data_template_data_id= and (data_input_fields.type_code='index_type' or data_input_fields.type_code='index_value' or data_input_fields.type_code='output_type')"
02/27/2007 09:50:44 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "select data_input_fields.type_code, data_input_data.value from (data_input_fields,data_input_data) where data_input_fields.id=data_input_data.data_input_field_id and data_input_data.data_template_data_id= and (data_input_fields.type_code='index_type' or data_input_fields.type_code='index_value' or data_input_fields.type_code='output_type')"
02/27/2007 09:50:44 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "select data_input_fields.type_code, data_input_data.value from (data_input_fields,data_input_data) where data_input_fields.id=data_input_data.data_input_field_id and data_input_data.data_template_data_id= and (data_input_fields.type_code='index_type' or data_input_fields.type_code='index_value' or data_input_fields.type_code='output_type')"
02/27/2007 09:50:43 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "select data_input_fields.type_code, data_input_data.value from (data_input_fields,data_input_data) where data_input_fields.id=data_input_data.data_input_field_id and data_input_data.data_template_data_id= and (data_input_fields.type_code='index_type' or data_input_fields.type_code='index_value' or data_input_fields.type_code='output_type')"

_________________
Server #1 : Cacti 0.8.7b | cmd.php | HP Proliant DL380 G5 (Dual Core Xeon 3.2 GHz, 14 Gb, 2x73 Gb RAID1 - System + 3x73 Gb RAID5 - SQL/RRA) | Gentoo Linux
_________SYSTEM STATS: Time:114.6022 Method:cmd.php Processes:8 Threads:N/A Hosts:408 HostsPerProcess:51 DataSources:32276 RRDsProcessed:16148


Top
 Profile  
 
 Post subject: Template for 4 disks
PostPosted: Wed Jun 20, 2007 8:42 am 
Offline

Joined: Fri Mar 30, 2007 12:55 pm
Posts: 2
I've made a template for four disks. Please include it into the package.


Attachments:
cacti_graph_template_linux_hddtemp_disk_temperature_4x.xml [10.52 KiB]
Downloaded 1409 times
Top
 Profile  
 
 Post subject: Re: Template for 4 disks
PostPosted: Thu Jun 28, 2007 3:21 pm 
Offline

Joined: Sat Aug 26, 2006 11:32 am
Posts: 5
Location: France
sire wrote:
I've made a template for four disks. Please include it into the package.


I've released the version 1.0, the 4x template is included.
http://www.pawelko.net/Cacti/3-Hddtemp-Template-For-Cacti

_________________
http://www.pawelko.net/


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 12, 2008 5:39 am 
Offline

Joined: Tue Dec 19, 2006 8:15 am
Posts: 14
I've followed the instructions.
When I go adding the graph to the host (Create Graph from 'Linux - hddtemp - Disk temperature') I get the following form:

Index Type :
Index Value :
Output Type ID:


What shall I put in there?

Regards
rs232


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 16, 2008 6:07 pm 
Offline

Joined: Sat Mar 15, 2008 10:09 pm
Posts: 4
Cacti[30855]: CMDPHP: ERROR: SQL Assoc Failed!, Error:'1064', SQL:"select data_input_fields.type_code, data_input_data.value from (data_input_fields,data_input_data) where data_input_fields.id=data_input_data.data_input_field_id and data_input_data.data_template_data_id= and (data_input_fields.type_code='index_type' or data_input_fields.type_code='index_value' or data_input_fields.type_code='output_type')"

I am using 0.8.7b ! The graph is being plotted, but still I dont like the message !

Regards,
E:S


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group