COUNTER datasource type monitoring rotated files

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

Moderators: Developers, Moderators

Post Reply
paulperkins
Posts: 3
Joined: Thu Sep 11, 2003 3:28 am

COUNTER datasource type monitoring rotated files

Post by paulperkins »

Hi All,

Many apologies if this has been answered elsewhere...

I've just installed version 0.8.3a on a new box (Solaris 8, PHP 4.3.3, Apache 1.3.28), and I'm extremely happy with the new version.

However, I'm having some strange behaviour when applying a COUNTER data source type to a file that is rotated (Apache access_log file).

On a RedHat machine with version 0.6.8 (same PHP and Apache versions) it works fine - i.e. Cacti correctly ignores the 'last' value when the log file is rotated and does 'the right thing'.

Under 0.8.3a all goes well (with a new RRA) until the file is rotated. Cacti then thinks that the website took a billion hits at the time of rotation and further webhits seem to disappear; presumably as the 'new' delta is so small.

Any thoughts?

Many thanks,

Paul.
User avatar
bulek
Cacti Pro User
Posts: 854
Joined: Mon May 20, 2002 2:07 am
Location: Poland
Contact:

Post by bulek »

You can set some reasonable Maximum Value in your data source which will avoid putting so high values into rrd file. The value should be around max hits per second you are expocting from your server.

- bulek
paulperkins
Posts: 3
Joined: Thu Sep 11, 2003 3:28 am

Post by paulperkins »

Thanks, Bulek.

I tried your suggestion, but the problem still shows itself. I've also tried running the 'tune' option of rrdtool against the RRA, but that, too, has no effect.

The only way I can think to solve it would be to re-build the RRA file.

Is there a way to massage data once inside the RRA, or do I have to start the file from scratch?

Thanks,

Paul.
paulperkins
Posts: 3
Joined: Thu Sep 11, 2003 3:28 am

Post by paulperkins »

Oops! :oops: Just answered my own question!

The solution was:

Set the maximum value of the RRA with:
/usr/local/rrdtool/bin/rrdtool tune localhost_webhits.rra -a web_hits:10000

Export the data to XML:
/usr/local/rrdtool/bin/rrdtool dump localhost_webhits.rra > localhost_webhits.xml

Edit the xml file, replacing the unfeasably large values with 'NaN' and then

Import the data:
/usr/local/rrdtool/bin/rrdtool restore localhost_webhits.xml localhost_webhits.rra

We now have data again! :D
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests