Re: One script for many data items
"Frank Bulk" <[email protected]>
| Newsgroups | gmane.network.cacti.user |
|---|---|
| Message-ID | <[email protected]> |
I use the same approach for getting data from our CMTS. I was storing the raw CLI output and having Perl scripts calculate it, but I improved performance greatly once I processed it all then had Cacti retrieve just the results from a text file rather than run the Perl script 500+ times. Frank -----Original Message----- From: Gandalf [mailto:[email protected]] Sent: Friday, September 28, 2012 11:08 AM To: [email protected] Subject: Re: [cacti-user] One script for many data items In this case, I'd like to advise a two step approach. Step 1: Poll the data and put them into some intermediate store (e.g. a file, a database table) Step 2: Poll the data from that store. This latter one is the "usual" Data Input Method associated with a graph etc. pp. The first step can be put as an initial script being run directly from crontab or by some single Cacti data source which needs not to be associated with any graph. I once implemented a similar approach to fetch data from a XEN virtualization host. But there's only pure code, no docs ATM Reinhard On 28.09.2012 08:52, Kenneth Porter wrote: > I'm polling iptables every 5 minutes to collect usage data for many rules. > (For example, one input and one output rule in the FORWARD table for each > DHCP client to get that client's traffic.) I'd prefer to not run a separate > iptables query for each rule, as that's at least 4 processes per client > (one for iptables binary and one for the wrapper parsing script, times 2 > for each direction). I'd prefer to run iptables-save once to collect the > kernel data for all the counters at once. What's the correct way to > organize that? How would I have the poller make one script call and then > point many data sources at the result? > > Here's the setup I'm using now, with one script execution per iptables > counter. > > <http://sewingwitch.com/ken/Stuff/cacti-iptables/> > > ---------------------------------------------------------------------------- -- > Got visibility? > Most devs has no idea what their production app looks like. > Find out how fast your code is with AppDynamics Lite. > http://ad.doubleclick.net/clk;262219671;13503038;y? > http://info.appdynamics.com/FreeJavaPerformanceDownload.html > _______________________________________________ > cacti-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/cacti-user > ---------------------------------------------------------------------------- -- Got visibility? Most devs has no idea what their production app looks like. Find out how fast your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219671;13503038;y? http://info.appdynamics.com/FreeJavaPerformanceDownload.html _______________________________________________ cacti-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cacti-user ------------------------------------------------------------------------------ How fast is your code? 3 out of 4 devs don\\\'t know how their code performs in production. Find out how slow your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219672;13503038;z? http://info.appdynamics.com/FreeJavaPerformanceDownload.html