Concept
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.
Introduction
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
Implementation
References
Daemons in Perl
Perlmonks: Writing a Perl Daemon - Good discussion with a robust exampleProc::DeamonLite - Contains syslog logging functions
Proc::Daemon - Simple enough to just copy the source code. No need to make a module dependency.
Win32::Service - If I decide to add Win32 support
RRD Library
http://search.cpan.org/~mschilli/RRDTool-OO-0.22/lib/RRDTool/OO.pm - Good abstraction interface for Tobi Oetiker's RRDs Perl moduleAbout RRDtool - Official RRDTool page
RRDTool Tutorial - Do not skip this one if you want to store statistically meaningful data at various step values.
Last wiki comments