[collectd] Patch: SNMP default hostname and address
ssevertson at digitalmeasures.com
Fri Jun 8 16:59:43 CEST 2012
Some metrics are readily accessible via SNMP on our hosts. However, the
requirement to specify a hostname for the SNMP plugin requires us to
maintain separate configuration files per host, in order to have an
appropriate hostname set in the collected metrics.
I'd like to propose that SNMP (and other plugins that connect to a
remote host) default to using the current host, if none is specified.
This would allow much simpler configurations like the following to work:
Collect "metric_1" "metric_2" "metric_3"
I've attached a patch against 5.1.0 for snmp.c that uses "hostname_g" as
the default host name and address when unspecified. The patch also
supports defaults when an empty hostname is provided, such as <Host "">,
and outputs debug information when defaults are used.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1522 bytes
Desc: not available
More information about the collectd