|
Primary and secondary collector data is compared as a confidence check to ensure that both collectors are operating correctly. As the collectors may be operating at different sample times, individual records will not match, however long term counts should retain the same level of absolute error.
# Configuration file for snmpmerge # # Set up logging log syslog daemon warning log file snmpacc.log info# # Merge data from akl1 and akl2, output as akl # Output 5 minute intervals to akl-YYMMDD-5m.dat # Output hourly intervals to akl-YYMMDD-1h.dat # merge akl source akl1 akl2 aggregate 5m akl-%Y%m%d-5m.dat aggregate 1h akl-%Y%m%d-1h.dat end merge
# # Ditto for Wellington # merge wlg source wlg1 wlg2 aggregate 5m wlg-%Y%m%d-5m.dat aggregate 1h wlg-%Y%m%d-1h.dat end merge
/usr/local/sbin/snmpmerge -d /home/snmpacc -e 1h 'data/*.dat'
In this example, the -e option ensures that data only up to the beginning of the hour is processed. Without this option, unless the run is done close to the hour and the data for the past hour is present on the system on time, there may be more than one set of records written for a given hour. Using -e, the run can be done some time after the data is recorded, output and retrieved from the remote systems, e.g. if data to the hour is processed, the processing can be scheduled at 15 minutes past the hour.
snmpmerge maintains a status file that tracks the most recent data for each merge block, and the source it was obtained from. Thus data records will not be processed twice.
The parameters to the source statements match the system names in the header lines of the data files. The output records carry the name specified in the merge statement as their system name.
Also note that snmpmerge does its own file globbing, hence the single quotes around data/*.dat in the example. The order of files is unimportant, as snmpmerge will order files internally based on the first header line.
Note that the merge process does not copy output files from remote systems. This must be done before invoking snmpmerge.
|