Traps are logs (events), not metrics (counters/gauges). snmp_exporter don't handle SNMP traps: https://github.com/prometheus/snmp_exporter/issues/69
You could write a custom exporter which counts SNMP traps, or you could use a trap receiver which writes logs, and a tool like mtail or grok_exporter to count particular patterns. However, I strongly recommend you don't bother. SNMP traps have very little useful information. Most people configure their networks to allow SNMP polling from their monitoring station to their devices. If you use SNMPv3 this can be done securely (with strong authentication and encryption). If the problem is that your prometheus server is outside your firewall, and you won't configure your firewall to allow SNMP queries inbound, then the easy solution is to run another prometheus server inside your firewall. -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/24cc43bd-036c-42ab-804e-b941aef7d99f%40googlegroups.com.

