Creating an average over multiple data sources...

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
chummers
Posts: 23
Joined: Wed Jul 02, 2008 6:44 am

Creating an average over multiple data sources...

Post by chummers »

Hiya,

I am currently using cacti to monitor temperature/humity rise and decrease in our data centre.

I have been asked if i can take the values of all the temperatures and then create an average across the temperature sensors.

I am not entirely sure that cacti can do this, as i means creating a 'average' graph from all the other data sources...

At the time i was thinking it could be done, but now i am not so sure, the temperature values are being obtained from an OID, so there are no scripts running to manipulate..

I have also considered writing a script to get the last values out of each RRA file and get the script to do the calculation, and output the single value average..

Is this possible or am i barking up the wrong tree??

I would appreciate any perls of wisdom

Regards,

Chummers.
Cacti Version 0.8.7c
Plugin Architecture 2.2
Poller Type Cactid v
Server Info Linux 2.6.9-78.0.22.plus.c4smp
Web Server Apache/2.0.63 (CentOS)
PHP Version 5.1.6
MySQL Version 5.0.68
RRDTool Version 1.2.23
SNMP Version 5.1.2
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Are all sensor data provided by the same target device?
R.
chummers
Posts: 23
Joined: Wed Jul 02, 2008 6:44 am

Post by chummers »

Hi Gandalf!

Sadly they are not they are spread of multiple SNMP devices.

I am currently looking at a script that will pull the last bit of data out of the RRA, and then work out the average.

I am not sure if this is the best way or not, or if there is a more elegent way (built in) to do this is cacti itself??
Cacti Version 0.8.7c
Plugin Architecture 2.2
Poller Type Cactid v
Server Info Linux 2.6.9-78.0.22.plus.c4smp
Web Server Apache/2.0.63 (CentOS)
PHP Version 5.1.6
MySQL Version 5.0.68
RRDTool Version 1.2.23
SNMP Version 5.1.2
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

This might be solved by AGGREGATE to get all graphs, summing all data sources. To get the average, you will have to change the CDEF and divide by the number of data sources (there's a new cacti pseudo variable for number of all data sources in a graph)
R.
chummers
Posts: 23
Joined: Wed Jul 02, 2008 6:44 am

Post by chummers »

Thanks Gandalf!

I will have a look in to this

I appreciate the pointer :D
Cacti Version 0.8.7c
Plugin Architecture 2.2
Poller Type Cactid v
Server Info Linux 2.6.9-78.0.22.plus.c4smp
Web Server Apache/2.0.63 (CentOS)
PHP Version 5.1.6
MySQL Version 5.0.68
RRDTool Version 1.2.23
SNMP Version 5.1.2
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests