Prometheus + (Fluentd / Logstash) + (SNMP + Traps)

20 views
Skip to first unread message

Hugo Serna

unread,
Jun 18, 2020, 5:08:28 AM6/18/20
to Prometheus Users
Hi

I were working for several weeks to have the subject architecture

I've got  Prometheus to manage all things and store the information with TSDB.

Using Fluentd I receive SNMP Pooling and Traps from all hardware. The problem is that I can not forward the events received by fluentd to Prometheus, only the SNMP information can be store at local file, or displayed at stdout.

When I use  "type @prometheus" at fluentd to send information, the information that I receive at prometheus are counters (number of events received), not content of events.

I would be pleased if somebody can assist me to receive the event data from fluentd to prometheus?

Best regards

Stuart Clark

unread,
Jun 18, 2020, 5:39:37 AM6/18/20
to Hugo Serna, Prometheus Users
Prometheus is a metrics system and so has no ability to handle events.

You can either convert events into metrics (for example by counting them
and then exposing the counter for scraping) or use an event system such
as Elasticsearch.

--
Stuart Clark

Hugo Serna

unread,
Jun 18, 2020, 5:49:19 AM6/18/20
to Prometheus Users
Thanks for your answer

Using snmp_exporter instead of fluentd, I get all OIDs like selectable elements at Prometheus. The reason to change snmp_exporter for another, is snmp_exporter not manage traps

Anyway, thank you for your assistant

Ben Kochie

unread,
Jun 18, 2020, 6:28:09 AM6/18/20
to Hugo Serna, Prometheus Users
Typically you need to have both an SNMP metrics poller and a trap handler. They're kinda separate things and need to be handled in their own way. Old-school network tools try and do both, and end up doing both badly. :-)

The snmp_exporter is one of the better OID polling handlers out there at the moment. IMO, not handling traps is a good thing, as it keeps it specialized for what it's good at. Right tool for the right job.

--
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 prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/b133f7d7-593f-45a6-9be2-cc8dcb77b244o%40googlegroups.com.

Brian Candler

unread,
Jun 18, 2020, 7:31:59 AM6/18/20
to Prometheus Users
Traps are events, and therefore not something you can record in Prometheus, except in the form of metrics derived from them (e.g. a counter of trap messages, or time last trap message received).

For handling logs / traps and other events: I suggest you also have a look at Loki from Grafana.  It is more lightweight than Elasticsearch and more Prometheus-inspired in its design.
Reply all
Reply to author
Forward
0 new messages