Hello,
I'm on the process of making a couple of plugins, and I haven't made a plugin to Cacti before.
On one of those plugins, I intend to make an easy-to-achieve percentage availability report for your devices, based on a certain time range selected by the user. However, I've come across a few design choices.
The basic idea is to have data collected periodically and when the user chooses to see the report, data will simply be calculated into a percentage availability for some given time period.
First I tried inserting data, at each poller run, into a MySQL table. That worked for a time, but started requiring a lot of resources (disk space), even at a small test scenario, and even after I started consolidating older data (e.g. 5-minute polling data from 6 months ago would be consolidated into 1-hour data, and so on).
That's when I started to think that a MySQL-based approach would be sort of a waste, especially when we already have RRDTOOL at our disposal.
Then, I thought "why not simply check the .rrd files for the EXISTENCE of data? If the data exists, the device was probably online".
However, by doing this I must either force the user to implement a certain Data Source AND an associated graph into his devices so that I can read the associated .rrd file OR give the user the option to select whatever Data Sources he wants to be the actual sources for the report generation.
PROBLEM: The second option, where the user has the choice, is not consistent at all. If user chooses a Data Source regarding network traffic, and chooses - let's call it 'by accident' - an interface that has sporadic traffic, his reports won't present data regarding the device's actual availability.
However, if the user chooses a Data Source regarding things like disk usage on the " / " partition, device Uptime, or even a network interface that gets traffic absolutely 24/7 with no exceptions (which I assume is somewhat rare, unless you're a huge company), then the final percentage reports would end up being a lot more trustworthy.
Do you see where I'm getting at? I hope I've made it clear enough.
For you experienced devs out there, what do you think should be the best option for this? I'd like to make as much of a concise, useful and reliable tool as possible. Any advice would be greatly appreciated.
|