snmpacc: SNMP accounting data collection package

<< Previous Contents Next >>

5. Merge Overview

The merge program, snmpmerge, allows redundant collectors to operate in parallel, so that data records from multiple collectors to be merged and compared. If there is missing data from one collector, data from another source can be used.

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.

5.1. Merge Example Configuration

The following is an example configuration file for snmpmerge:

5.2. Running snmpmerge

snmpmerge should be normally be run from cron at intervals larger than the largest aggregation interval specified in its configuration. Typically, cron will run a shell script that retrieves files, and then invokes snmpmerge, e.g.:

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.
<< Previous Contents Next >>