Make a new datasource by summing the values ​​of other datasources

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
nafets
Posts: 12
Joined: Fri Sep 30, 2022 8:24 am

Make a new datasource by summing the values ​​of other datasources

Post by nafets »

I wonder if it's possible to collect values from multiple datasources in a new datasource. I found a thread on stackexchange "Make a new cacti graph by summing the values ​​of another graph" and the answer there was to use aggregate. I understand that and I do use it. However I now want to aggregate some data from around 400 accesspoints and it takes a while to make that graph since it's created on demand.

Also, I cannot get the resulting value to show on WEATHERMAP. This is due to a WEATHERMAP limitation which reads 4k characters of each line in the config. That is not enough to sum up all my 400 datasource rrd's. My solution would be to have some process collecting those 400 values to a new datasource. I don't mind that there can be a 5 minute lag between the realtime value of each individual datasource and the collected sum in the target datasource.

Any ideas?

Cacti Version 1.2.10
Cacti OS unix (Ubuntu 20.04.5 LTS
NET-SNMP Version NET-SNMP version: 5.8
RRDtool Version Configured 1.7.2+
RRDtool Version Found 1.7.2
Poller Spine 1.2.6
nafets
Posts: 12
Joined: Fri Sep 30, 2022 8:24 am

Re: Make a new datasource by summing the values ​​of other datasources

Post by nafets »

Solved by extending the buffer length from 4096 characters to 16384 characters in Weathermap.class.php and weathermap-cacti-plugin-mgmt.php. The line summing up all the TARGETS can now be as long as I needed for this purpose.
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests