Most RDD back end polling systems are designed to be run from cron. A good example is cricket. While this works quite well for data that needs to be slowly graphed, it can introduce undue overhead on the system if the polling interval needs to be lower than the usual 5 minute period. The are other daemon based polling routines that update RRD but the ones that I have found are tightly integrated with much larger network management packages. Generally those are not designed to poll faster but rather to spread out the polling load for large systems that must poll thousands of devices. What I needed was a fast polling daemon that can standalone for my simple home network.
The concept is a light weight daemon that will run continuously and provide a scheduling service for one or more data retrieval functions. Initially I would like to provide RRD data for ping response time and power levels in my cable modem. Once the data is in RRD any number of other front end graphing systems can be used. I currently use drraw to graph my IP network statistics that are collected with Cricket. This module will not replace Cricket, but will be run in parallel to Cricket for any fast polling requirements.
The development of this project falls into several separate activities. First the fast polling module must run as a daemon. Therefore I must learn to write my first Perl daemon complete with Linux start scripts, etc. Second the module must update RRD which requires interfacing with the Perl RRD module and logic that initializes the RRD db when needed. Lastly, I will need to determine how to properly configure drraw for polling intervals other than the default 5 minutes.
Phase I: Develop daemon code with control scripts
Phase II: Develop RRD interface and maintenance
Phase III: Develop separate routines for ping and web table scraping
Phase IV: Develop configurations for drraw for the fast polling time intervals
Phase V: Develop a generic software interface for adding other processes
Phase VI: Documentation clean up and publish code
Daemons in Perl
Perlmonks: Writing a Perl Daemon
- Good discussion with a robust example
- Contains syslog logging functions
- Simple enough to just copy the source code. No need to make a module dependency.
- If I decide to add Win32 support
- Good abstraction interface for Tobi Oetiker's RRDs Perl module
- Official RRDTool page
- Do not skip this one if you want to store statistically meaningful data at various step values.
2008/12 - Studied the various daemon examples. Seems easy enough since I've written these things in C before. Started reading up on the Perl RRD modules. I discovered that I really do not know how to use RRD. That was a bit of a shock since I've been using it off and on for over 10 years! I now realize that I don't truly understand the way RRD tool works; I've simply been using application defaults in programs like Cricket and mrtg. OK, time to read Tobi's tutorial (again); without skipping around; and trying all the examples. Hopefully I'll really learn the interaction between CFs, update periods, and step values.