[mrtg] graph timestamped data
dybulk at tri8.net
Sat Sep 11 22:13:16 MEST 2004
I'll resort to posting to a list (LAST resort), as I have been all over
the FAQ, Google, Google Groups, this list's archive, and the MRTG docs.
That being said, I'd happily take a "read this" link if I've indeed been
I want to graph some data, delivered via SNMP. MRTG is great for that.
I've been using it for years to graph router traffic, and so forth. No
MRTG takes data representing "now" and graphs it (which, I know, can
really be all kinds of different values, not just traffic counters--and
options like "gauge" and "absolute" are good for straight measurements
that aren't cumulative).
This has always been quite sufficient, and I know that the second ("out")
parameter can be suppressed, etc.
I now have an SNMP agent (or custom script) that will deliver data that is
*timestamped* (standard UNIX seconds-since-1970-Epoch style). This can
easily be retrieved via the relevant MIB spec and OID. The agent received
the data and stored it at random times from a source that is NOT always
accessible nor connected to the Internet. The source occasionally "checks
in" via some asynchronous messaging methods and delivers timestamped data.
The agent *itself* is always ready to answer MRTG's call, of course, and
the actual data source asynchronously passes data into the agent. Call the
agent a "middleman" or simple middleware app.
Instead of polling and getting current data for "now" and parameters 1 and
2, I'd poll generally and get, say, two values: timestamp and temperature.
I don't want to graph the timestamp itself (which makes no sense, of
course, but could be done using one of the two configurable parameters
graphed by MRTG). I must find a way to get "1093107052 88" (this is a
SIMPLIFIED example) and be able to graph the fact that at 08/21/2004
16:50:52 (that's Epoch-based time 1093107052) it was 88 degrees (even
though this is occurring now--values will really be within 60 minutes or
so in the real world).
I just want to build a table of timestamp vs. value and graph it, but I
cannot rely on the polling request getting the traditional "current" value
that MRTG expects--it can and will easily retrieve a timestamp as part of
the SNMP response that says what point in time the data values represent.
Basically everything I need to do with this project can be done in MRTG
(as usual). But, I'm ready to conclude that graphing this asynchronous
data with their timestamps simply cannot be done with MRTG (that's a tough
thing for me to admit).
I guess I'm asking if there's any way to mess with MRTG's X axis (to have
the X axis be part of the *data* received via SNMP), to put it simply.
Can anyone help?
Please note that, yes, I have considered inserting lines directly into the
MRTG log file, since the log file is timestamped and could be carefully
built by my application as data comes in with timestamps embedded. But, as
far as I can tell, this hack could cause all kinds of problems when MRTG
itself runs and wants to update the file, and, besides, I must use SNMP as
part of the project specs--I can't just shim something into MRTG as some
kind of workaround, but, rather, I must be able (later) to serve the data
via good old SNMP.
I hope this makes some kind of sense, as I've described it. I'd also
gladly accept a recommendation for some other software if necessary,
though I'd really like to use MRTG.
Thanks very much,
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
FAQ http://faq.mrtg.org Homepage http://www.mrtg.org
More information about the mrtg