dannysauer,
Thanks for your willingness to help. I'll be trying your suggestions in the next day or so... For TheWitness - All of my data gathering is done via scripts. All of them simply read in data values in which the log file may have multiple data segments. I use the multiple values in the script parameters since I'm consistent in my log naming convention. For example, in my script listed above, my Data Input Method is "Script/Command" with the input string as:
Code: Select all
F:\webdocs\eam\scripts\cacti\logreader-appmonresponse.pl <region> <application> <feature>
Then my input fields simply match to these items.
Then when I want to read a log file, such as "appmon_prod40-1corr_CorrespondentWeb_Login.log", I simply need to provide the Data Source with how the log file is named, in this case 'prod40-1corr' - 'CorrespondentWeb' - 'Login' - and the Perl script is called using:
Code: Select all
F:\webdocs\eam\scripts\cacti\logreader-appmonresponse.pl prod40-1corr CorrespondentWeb Login
Which returns a set of values that Cacti can parse. In my case there are two values, responsetime: and availability:
I have about 20 such scripts, all varying by how to read the log file since the log file locations may vary.
It all seems to make sense in my head
I'm monitoring 100 servers all writing out log files (about 900 of them now) to a NAS device that my Windows server can read. Since I only need Cacti to parse the data rather than going out and fetching it (we don't allow SNMP or remote access besides SSH to our UNIX servers) - this was a pretty good way to manage the gathering of data.
I'll definitely work with both sets of scripts and see if running it through the script server speeds things up. Right now using Perl it takes about 2 minutes to read through 900 log files and update the RRD files (Windows 4-way server, however it's an old old server!)
Thanks for both of your help on this. I'll let you know how I make out.
_DS
Sorry - forgot to list how the data is represented in the log files. This is an example - right out of the scripting "how-to" guide.
log file is named "unixstatistics_relwas3.log" and the input string may only include "<server>" - I pass the server name to the script and it reads the log file - returning STDOUT as:
tx:536409347476 rx:399181261794 5min:0.12 10min:0.18 15min:0.18 user:0 sys:0 idle:99 wait:0 REALMEMORYFREE:2861 REALMEMORYUSED:5331 SWAPMEMORYFREE:884 SWAPMEMORYUSED:139 PERCENTREALMEMORYUSED:65 PERCENTSWAPMEMORYUSED:13 PROCESSES:67 ESTABLISHED:140 FINWAIT2:30 CLOSEWAIT:4