Scroll to navigation

COLLECTD-SNMP-PROBE-HOST(1) Collectd SNMP Host Probe COLLECTD-SNMP-PROBE-HOST(1)

NAME

snmp-probe-host.px - Find out what information an SNMP device provides.

SYNOPSIS

  collectd-snmp-probe-host --host switch01.mycompany.com --community ei2Acoum

DESCRIPTION

The "snmp-probe-host.px" script can be used to automatically generate SNMP configuration snippets for collectd's snmp plugin (see collectd-snmp(5)).

This script parses the collectd configuration and detects all "data" blocks that are defined for the SNMP plugin. It then queries the device specified on the command line for all OIDs and registers which OIDs could be answered correctly and which resulted in an error. With that information the script figures out which "data" blocks can be used with this hosts and prints an appropriate "host" block to standard output.

The script first tries to contact the device via SNMPv2. If after ten seconds no working "data" block has been found, it will try to downgrade to SNMPv1. This is a bit a hack, but works for now.

OPTIONS

The following command line options are accepted:

Hostname of the device. This should be a fully qualified domain name (FQDN), but anything the system can resolve to an IP address will word. Required argument.
Sets the name of the collectd config file which defined the SNMP "data" blocks. Due to limitations of the config parser used in this script ("Config::General"), "Include" statements cannot be parsed correctly. Defaults to /etc/collectd/collectd.conf.
SNMP community to use. Should be pretty straight forward.
This option can be used to exclude specific data from being enabled in the generated config. Currently the following MIBs are understood:
Exclude interface information, such as ifOctets and ifPackets.

BUGS

  • "Include" statements in the config file are not handled correctly.
  • SNMPv2 / SNMPv1 detection is a hack.

AUTHOR

Copyright (c) 2008 by Florian octo Forster <octo at noris.net>. Licensed under the terms of the GPLv2. Written for the noris network AG <http://noris.net/>.

2023-03-11 perl v5.38.2