Suggestion for change to DSSTATS functions.php code

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
peecee
Cacti User
Posts: 146
Joined: Tue Feb 26, 2008 7:26 am

Suggestion for change to DSSTATS functions.php code

Post by peecee »

I wrote a graphing Data Input Method and the associated php script server collector for DSSTATS for hourly, daily and major, as well as the number of each RRD acted upon by each run of dsstats (if that makes sense).

In order to get things working right, I made two changes, both of which didn't seem to be that big of a deal. I just don't know what else ties into this code, so I'm coming here to see if there is a problem.

1st change:

In functions.php, change line 396 from

Code: Select all

$cacti_stats = sprintf("Time:%01.4f ", round($end-$start,4));
to

Code: Select all

$cacti_stats = sprintf("%01.4f ", round($end-$start,4));
and line 408 from:

Code: Select all

cacti_log("DSSTATS STATS: Type:" . $type . ", " . $cacti_stats , TRUE, "SYSTEM");
to

Code: Select all

cacti_log("DSSTATS STATS: Type:" . $type . ", Time:" . $cacti_stats , TRUE, "SYSTEM");
This way the only thing really changed is that the word "Time:" isn't stored in the database. I looked through the other information in the settings table, and most don't have words associated with entries unless there is more than one. This seems to go with the way Cacti Data Input Methods work where a single piece of data only involves the data, whereas if a DIM has multiple inputs, it requires a field identifier for each item.

If this is implemented in the supported code, I have a working graph solution for DSSTATS that I can post up.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests