The sysutils/snmp_exporter port
snmp_exporter-0.26.0 – Prometheus exporter for SNMP metrics (cvsweb github mirror)
Description
Prometheus exporter for metrics gathered from SNMP. This package contains both the exporter that does the actual scraping, and a generator (which depends on Net-SNMP) that creates the configuration for use by the exporter.WWW: https://prometheus.io/
Readme
+------------------------------------------------------------------------------- | Running ${PKGSTEM} on OpenBSD +------------------------------------------------------------------------------- snmp_exporter runs as a daemon and performs SNMP queries in response to incoming requests on its HTTP port. It would normally be queried by Prometheus which passes parameters specifying which host it should poll and which mib to use. snmp_exporter's own configuration provides definitions for mibs with OID-to-name mappings, and can include SNMP authentication information. The "runtime" configuration in ${SYSCONFDIR}/snmp_exporter/snmp.yml is intended to be generated by a tool (name "snmp_generator" in this package) from a higher-level configuration file ${SYSCONFDIR}/snmp_exporter/generator.yml. The generator uses this in conjunction with MIB files (read in via Net-SNMP) to produce snmp.yml. The default configuration can be used directly for some simple uses (for example, polling interface stats with default authentication values). For more complex cases and less-common MIBs you will need to adapt or write your own generator.yml and generate a new snmp.yml from it. The MIB files required for snmp_exporter's sample configuration are included in this package (in ${TRUEPREFIX}/share/examples/snmp_exporter/mibs). Additional MIBs may be needed if you're adding less common devices; the LibreNMS package provides a collection of thousands of these covering many network devices in /var/www/librenms/mibs. Some OpenBSD-specific MIBs for use with snmpd(8) are provided in /usr/share/snmp/mibs. You will need to provide a suitable MIB search path allowing the generator to find any MIB files referenced in your configuration; this can be set in the environment variable MIBDIRS. An example of adapting and building config: # cd ${SYSCONFDIR}/snmp_exporter # cp ${TRUEPREFIX}/share/examples/snmp_exporter/generator-pf.yml generator.yml # vi ${SYSCONFDIR}/snmp_exporter/generator.yml [...] # export MIBDIRS=/usr/share/snmp/mibs:${LOCALBASE}/share/snmp/mibs:${TRUEPREFIX}/share/examples/snmp_exporter/mibs # snmp_generator generate Upgrading from before v0.23.0 ----------------------------- You will need to update configuration. New versions will not run with old configuration. In older versions, configuration used a single list of modules, which incorporated authorisation settings (SNMP version, community/username, SNMPv3 auth options) alongside the metric walking/mapping settings. These have now been split. Authorisation settings ("version" and any "auth" sections) should be removed from the various module sections in generator.yml and added to a new "auths" section (see the example in ${LOCALBASE}/share/examples/snmp_exporter/generator.yml). You will then need to regenerate snmp.yml with "snmp_generator" as shown above. Rather than referencing authorisation settings in module config, you now specify the auth section name as a URL query parameter when fetching results,, alongside the module and target, e.g.: http://localhost:9116/snmp?auth=public_v2&module=if_mib&target=192.0.2.8 See ${TRUEPREFIX}/share/doc/snmp_exporter/auth-split-migration.md for upstream documentation about this.
Maintainer
Stuart Henderson
Only for arches
aarch64 amd64 arm i386 riscv64
Categories
Library dependencies
Build dependencies
Test dependencies
Reverse dependencies
Files
- /etc/rc.d/snmp_exporter
- /etc/snmp_exporter/
- /etc/snmp_exporter/generator.yml
- /etc/snmp_exporter/snmp.yml
- /usr/local/bin/snmp_exporter
- /usr/local/bin/snmp_generator
- /usr/local/share/doc/pkg-readmes/snmp_exporter
- /usr/local/share/doc/snmp_exporter/
- /usr/local/share/doc/snmp_exporter/LICENSE
- /usr/local/share/doc/snmp_exporter/README.md
- /usr/local/share/doc/snmp_exporter/auth-split-migration.md
- /usr/local/share/examples/snmp_exporter/
- /usr/local/share/examples/snmp_exporter/generator-pf.yml
- /usr/local/share/examples/snmp_exporter/generator.yml
- /usr/local/share/examples/snmp_exporter/mibs/
- /usr/local/share/examples/snmp_exporter/mibs/7.2.50.0.18765.RELEASE-B100-MIB.txt
- /usr/local/share/examples/snmp_exporter/mibs/7.2.50.0.18765.RELEASE-CERTS-MIB.txt
- /usr/local/share/examples/snmp_exporter/mibs/7.2.50.0.18765.RELEASE-IPVS-MIB.txt
- /usr/local/share/examples/snmp_exporter/mibs/7.2.50.0.18765.RELEASE-ONE4NET-MIB.txt
- /usr/local/share/examples/snmp_exporter/mibs/AIRESPACE-REF-MIB
- /usr/local/share/examples/snmp_exporter/mibs/AIRESPACE-WIRELESS-MIB
- /usr/local/share/examples/snmp_exporter/mibs/ARISTA-ENTITY-SENSOR-MIB
- /usr/local/share/examples/snmp_exporter/mibs/ARISTA-SMI-MIB
- /usr/local/share/examples/snmp_exporter/mibs/ARISTA-SW-IP-FORWARDING-MIB
- /usr/local/share/examples/snmp_exporter/mibs/CyberPower.MIB
- /usr/local/share/examples/snmp_exporter/mibs/EAP-Client.MIB
- /usr/local/share/examples/snmp_exporter/mibs/EAP.MIB
- /usr/local/share/examples/snmp_exporter/mibs/ENTITY-MIB
- /usr/local/share/examples/snmp_exporter/mibs/ENTITY-SENSOR-MIB
- /usr/local/share/examples/snmp_exporter/mibs/ENTITY-STATE-MIB
- /usr/local/share/examples/snmp_exporter/mibs/ENTITY-STATE-TC-MIB
- /usr/local/share/examples/snmp_exporter/mibs/HCNUM-TC
- /usr/local/share/examples/snmp_exporter/mibs/HOST-RESOURCES-MIB
- /usr/local/share/examples/snmp_exporter/mibs/IANA-CHARSET-MIB.txt
- /usr/local/share/examples/snmp_exporter/mibs/IANA-IFTYPE-MIB.txt
- /usr/local/share/examples/snmp_exporter/mibs/IANA-PRINTER-MIB.txt
- /usr/local/share/examples/snmp_exporter/mibs/IF-MIB
- /usr/local/share/examples/snmp_exporter/mibs/INET-ADDRESS-MIB
- /usr/local/share/examples/snmp_exporter/mibs/IP-MIB
- /usr/local/share/examples/snmp_exporter/mibs/IPV6-TC
- /usr/local/share/examples/snmp_exporter/mibs/ISDN-MIB
- /usr/local/share/examples/snmp_exporter/mibs/Infrapower-MIB.mib
- /usr/local/share/examples/snmp_exporter/mibs/KEEPALIVED-MIB
- /usr/local/share/examples/snmp_exporter/mibs/LIEBERT_GP_PDU.MIB
- /usr/local/share/examples/snmp_exporter/mibs/LIEBERT_GP_REG.MIB
- /usr/local/share/examples/snmp_exporter/mibs/MIKROTIK-MIB
- /usr/local/share/examples/snmp_exporter/mibs/NET-SNMP-MIB
- /usr/local/share/examples/snmp_exporter/mibs/NET-SNMP-TC
- /usr/local/share/examples/snmp_exporter/mibs/PAN-COMMON-MIB.my
- /usr/local/share/examples/snmp_exporter/mibs/PAN-ENTITY-EXT-MIB.my
- /usr/local/share/examples/snmp_exporter/mibs/PAN-GLOBAL-REG-MIB.my
- /usr/local/share/examples/snmp_exporter/mibs/PAN-GLOBAL-TC-MIB.my
- /usr/local/share/examples/snmp_exporter/mibs/PAN-LC-MIB.my
- /usr/local/share/examples/snmp_exporter/mibs/PAN-PRODUCT-MIB.my
- /usr/local/share/examples/snmp_exporter/mibs/PAN-TRAPS.my
- /usr/local/share/examples/snmp_exporter/mibs/PDU-MIB.txt
- /usr/local/share/examples/snmp_exporter/mibs/PDU2-MIB.txt
- /usr/local/share/examples/snmp_exporter/mibs/PICO-IPSEC-FLOW-MONITOR-MIB.txt
- /usr/local/share/examples/snmp_exporter/mibs/PICO-SMI-ID-MIB.txt
- /usr/local/share/examples/snmp_exporter/mibs/PICO-SMI-MIB.txt
- /usr/local/share/examples/snmp_exporter/mibs/PRINTER-MIB-V2.txt
- /usr/local/share/examples/snmp_exporter/mibs/SNMP-FRAMEWORK-MIB
- /usr/local/share/examples/snmp_exporter/mibs/SNMPv2-MIB
- /usr/local/share/examples/snmp_exporter/mibs/SNMPv2-SMI
- /usr/local/share/examples/snmp_exporter/mibs/SNMPv2-TC
- /usr/local/share/examples/snmp_exporter/mibs/SYNOLOGY-DISK-MIB.txt
- /usr/local/share/examples/snmp_exporter/mibs/SYNOLOGY-EBOX-MIB.txt
- /usr/local/share/examples/snmp_exporter/mibs/SYNOLOGY-FLASHCACHE-MIB.txt
- /usr/local/share/examples/snmp_exporter/mibs/SYNOLOGY-GPUINFO-MIB.txt
- /usr/local/share/examples/snmp_exporter/mibs/SYNOLOGY-ISCSILUN-MIB.txt
- /usr/local/share/examples/snmp_exporter/mibs/SYNOLOGY-ISCSITarget-MIB.txt
- /usr/local/share/examples/snmp_exporter/mibs/SYNOLOGY-NFS-MIB.txt
- /usr/local/share/examples/snmp_exporter/mibs/SYNOLOGY-PORT-MIB.txt
- /usr/local/share/examples/snmp_exporter/mibs/SYNOLOGY-RAID-MIB.txt
- /usr/local/share/examples/snmp_exporter/mibs/SYNOLOGY-SERVICES-MIB.txt
- /usr/local/share/examples/snmp_exporter/mibs/SYNOLOGY-SHA-MIB.txt
- /usr/local/share/examples/snmp_exporter/mibs/SYNOLOGY-SMART-MIB.txt
- /usr/local/share/examples/snmp_exporter/mibs/SYNOLOGY-SPACEIO-MIB.txt
- /usr/local/share/examples/snmp_exporter/mibs/SYNOLOGY-STORAGEIO-MIB.txt
- /usr/local/share/examples/snmp_exporter/mibs/SYNOLOGY-SYSTEM-MIB.txt
- /usr/local/share/examples/snmp_exporter/mibs/SYNOLOGY-UPS-MIB.txt
- /usr/local/share/examples/snmp_exporter/mibs/UBNT-AirFiber-MIB
- /usr/local/share/examples/snmp_exporter/mibs/UBNT-AirMAX-MIB.txt
- /usr/local/share/examples/snmp_exporter/mibs/UBNT-UniFi-MIB
- /usr/local/share/examples/snmp_exporter/mibs/UCD-SNMP-MIB
- /usr/local/share/examples/snmp_exporter/mibs/VRRP-MIB
- /usr/local/share/examples/snmp_exporter/mibs/VRRPv3-MIB
- /usr/local/share/examples/snmp_exporter/mibs/apc-powernet-mib
- /usr/local/share/examples/snmp_exporter/mibs/iDRAC-SMIv2.mib
- /usr/local/share/examples/snmp_exporter/mibs/readydataos
- /usr/local/share/examples/snmp_exporter/mibs/readynas
- /usr/local/share/examples/snmp_exporter/mibs/servertech-sentry3-mib
- /usr/local/share/examples/snmp_exporter/mibs/servertech-sentry4-mib
- /usr/local/share/examples/snmp_exporter/snmp.yml
- @newgroup _snmpexporter:845
- @newuser _snmpexporter:845:_snmpexporter::prometheus snmp_exporter:/nonexistent:/sbin/nologin