Need help with logging periodic rolling data

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
User avatar
Cylindric
Cacti User
Posts: 54
Joined: Mon Jul 16, 2007 9:32 am

Need help with logging periodic rolling data

Post by Cylindric »

Greetings again.

I'd like to track some stats on our MailMarshal server, but as it doesn't have SNMP, or any other sort of counters that I can find, I am limited to using the information available in the Message table.

The problem is, I'm not sure conceptually what would be the correct thing to count.

The Message table stores all the messages processed, but only for the last 3 months (rolling). The table contains fields such as TimeLogged, MessageSize, Classification, etc.

What are my options for pulling this sort of data into Cacti? I can create a query that will return something like "messages per day"

2009-05-15 43,213
2009-05-16 42,257
2009-05-17 44,456
2009-05-18 32,533
2009-05-19 43,764

Or maybe just "messages in the last X time-frame"
InLastHour:1533 InLastDay:44456

Obviously if I create a counter like the second example, graphs can't just add them all up, as a five-minute polling wouldn't make sense.

Also, just doing a count(*) wouldn't work as a "GUAGE", as it doesn't ever-increase, but nor does it increase-then-reset. It'll probably just hover around a similar number.

I apologise for the confusing question, but I can't quite get my head around it :D
Server: Windows Server 2008 R2 x64 (running on a VM, 4Gb RAM)
Cacti: 0.8.8a (using cmd, 270 datasources in 145s)
MySQL: 5.5.16, Apache: 2.2.21, PHP: 5.3.16
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: Need help with logging periodic rolling data

Post by BSOD2600 »

Cylindric wrote:Or maybe just "messages in the last X time-frame"
InLastHour:1533 InLastDay:44456
Since cacti polls every 5 min (be default), a query that would return the number of messages in the last 5 minutes could be useful. It should increase/decrease throughout the day, I'd imagine.

Cylindric wrote:Also, just doing a count(*) wouldn't work as a "GUAGE", as it doesn't ever-increase, but nor does it increase-then-reset. It'll probably just hover around a similar number.
I think this would also be ok. You could establish a baseline and then be able to easily see deviations over time. Additionally, once again since cacti polls every 5 min and at least with default rrd settings, you have this granular history for a few days. Then you could possibly use some CDEF magic to find the difference between the current value and the previous (sort of like your first suggestion of 'last 5 minutes').
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests