SNMP

84 views
Skip to first unread message

Colton Conor

unread,
May 3, 2020, 10:40:47 AM5/3/20
to Prometheus Users
What is the easiest was to use Prometheus with SNMP devices? We use over 20 different network vendors like Juniper, Cisco, Nokia, etc, and multiple models/devices under each brand. Each one of these has custom MIBs, and we are not SNMP experts. So we need a easy way to add multiple SNMP devices. 

Brian Candler

unread,
May 3, 2020, 2:04:25 PM5/3/20
to Prometheus Users
You can use file_sd_config:

- labels:
    module: mib_foo
  targets:
    - 1.2.3.4
    - 1.2.3.5
- labels:
    module: mib_bar
  targets:
    - 1.2.3.6
    - 1.2.3.7

Then use a relabelling config to copy label "module" to "__param_module"

  - job_name: 'snmp'
    scrape_interval: 15s
    file_sd_configs:
      - files:
        - /etc/prometheus/targets.d/snmp_targets.yml
    metrics_path: /snmp
    relabel_configs:
      - source_labels: [__address__]
        target_label: instance
      - source_labels: [__address__]
        target_label: __param_target
      - source_labels: [module]
        target_label: __param_module
      - target_label: __address__
        replacement: 127.0.0.1:9116  # SNMP exporter

This will let you define a single prometheus job which can query many different types of device.

It's still going to be your job to use the generator tool to convert MIBs into snmp.yml form suitable for use with snmp_exporter.  Sorry, there's no avoiding that.

Ben Kochie

unread,
May 3, 2020, 2:25:27 PM5/3/20
to Colton Conor, Prometheus Users
90% of what you need from all the vendors is `if_mib`. The basic network traffic stats.

Once you have that, you can start to learn more about the vendor-specific MIBs.

On Sun, May 3, 2020 at 4:40 PM Colton Conor <colton...@gmail.com> wrote:
What is the easiest was to use Prometheus with SNMP devices? We use over 20 different network vendors like Juniper, Cisco, Nokia, etc, and multiple models/devices under each brand. Each one of these has custom MIBs, and we are not SNMP experts. So we need a easy way to add multiple SNMP devices. 

--
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/d40e0fa4-d44f-4bda-a753-5bea821b05f6%40googlegroups.com.

Colton Conor

unread,
May 3, 2020, 5:10:55 PM5/3/20
to Ben Kochie, Prometheus Users
I am just wondering how hard to would be to replace something like LibreNMS or PRTG with Prometheus? With Libre, we just install, set the SNMP community sting, scan our network, and all devices get mapped, linked, and monitored. I imagine Prometheus would be much more involved? Sounds like we would have to edit .yml files for each device / vendor just to get the SNMP metrics into the database. Then, we must create custom Grafana dashboards for each device type right?


Ben Kochie

unread,
May 3, 2020, 5:43:56 PM5/3/20
to Colton Conor, Prometheus Users
Yes, you'll have to create the customizations yourself. There's currently no scanning/auto-configure for Prometheus SNMP users out there. It's a missing market opportunity.

I even suggested this to the LibreNMS people, as they have that part down solid, but their metrics collection and backend is at least a decade out of style (PHP polling + RRA).

The up-side is that Prometheus is easily more scaleable than LibreNMS. When I talked to them originally, I think we were still in the Prometheus 1.x days and estimated we were doing 5x better back then. Now it's probably 50x better.

Colton Conor

unread,
May 4, 2020, 2:27:57 PM5/4/20
to Ben Kochie, Prometheus Users
Ben,

Thanks for the information. I was really hoping you were going to say check out project x that has this all done for you :(. 

It sounds like today Promethus would just be too much work for our use case. With that being said, I see some NMS platforms like LibreNMS has a promethus exporter, which they claim is alpha at best. What are the thoughts about using something like this as a stepping stone to eventually getting to Promethus? 

Which monitoring platforms, other than LibreNMS, do you like or recommend? Do any of them have advanced functionality related to Promethus or time series databases? 

Ben Kochie

unread,
May 4, 2020, 2:37:47 PM5/4/20
to Colton Conor, Prometheus Users
I don't actually recommend LIbreNMS. It's too slow and is too outdated in terms of monitoring capability to be worth implementing. Yes, it's easier to setup for _just_ SNMP monitoring. But it fails at everything else. Scalability, flexibility, performance, etc.

Prometheus is a universal platform for monitoring everything from network to server to application. Yes, it's more up-front work. But it's flexible enough to provide monitoring for everything in your organization.

Colton Conor

unread,
May 4, 2020, 3:25:14 PM5/4/20
to Ben Kochie, Prometheus Users
Ben,

I agree with you on  LIbreNMS being too slow and is too outdated. Do you have any recommendations other than that, or do you feel that all systems are too slow and is too outdated compared to Prometheus? In other words, who do you think are Prometheus's primary competitors? 

Bruce

unread,
May 11, 2020, 10:19:43 PM5/11/20
to Prometheus Users
you can try influxdb 


Le lundi 4 mai 2020 20:25:14 UTC+1, Colton Conor a écrit :
Ben,

I agree with you on  LIbreNMS being too slow and is too outdated. Do you have any recommendations other than that, or do you feel that all systems are too slow and is too outdated compared to Prometheus? In other words, who do you think are Prometheus's primary competitors? 

On Mon, May 4, 2020 at 1:37 PM Ben Kochie <sup...@gmail.com> wrote:
I don't actually recommend LIbreNMS. It's too slow and is too outdated in terms of monitoring capability to be worth implementing. Yes, it's easier to setup for _just_ SNMP monitoring. But it fails at everything else. Scalability, flexibility, performance, etc.

Prometheus is a universal platform for monitoring everything from network to server to application. Yes, it's more up-front work. But it's flexible enough to provide monitoring for everything in your organization.

On Mon, May 4, 2020 at 8:27 PM Colton Conor <colto...@gmail.com> wrote:
Ben,

Thanks for the information. I was really hoping you were going to say check out project x that has this all done for you :(. 

It sounds like today Promethus would just be too much work for our use case. With that being said, I see some NMS platforms like LibreNMS has a promethus exporter, which they claim is alpha at best. What are the thoughts about using something like this as a stepping stone to eventually getting to Promethus? 

Which monitoring platforms, other than LibreNMS, do you like or recommend? Do any of them have advanced functionality related to Promethus or time series databases? 

On Sun, May 3, 2020 at 4:43 PM Ben Kochie <sup...@gmail.com> wrote:
Yes, you'll have to create the customizations yourself. There's currently no scanning/auto-configure for Prometheus SNMP users out there. It's a missing market opportunity.

I even suggested this to the LibreNMS people, as they have that part down solid, but their metrics collection and backend is at least a decade out of style (PHP polling + RRA).

The up-side is that Prometheus is easily more scaleable than LibreNMS. When I talked to them originally, I think we were still in the Prometheus 1.x days and estimated we were doing 5x better back then. Now it's probably 50x better.

On Sun, May 3, 2020 at 11:10 PM Colton Conor <colto...@gmail.com> wrote:
I am just wondering how hard to would be to replace something like LibreNMS or PRTG with Prometheus? With Libre, we just install, set the SNMP community sting, scan our network, and all devices get mapped, linked, and monitored. I imagine Prometheus would be much more involved? Sounds like we would have to edit .yml files for each device / vendor just to get the SNMP metrics into the database. Then, we must create custom Grafana dashboards for each device type right?



On Sun, May 3, 2020 at 1:25 PM Ben Kochie <sup...@gmail.com> wrote:
90% of what you need from all the vendors is `if_mib`. The basic network traffic stats.

Once you have that, you can start to learn more about the vendor-specific MIBs.

On Sun, May 3, 2020 at 4:40 PM Colton Conor <colto...@gmail.com> wrote:
What is the easiest was to use Prometheus with SNMP devices? We use over 20 different network vendors like Juniper, Cisco, Nokia, etc, and multiple models/devices under each brand. Each one of these has custom MIBs, and we are not SNMP experts. So we need a easy way to add multiple SNMP devices. 

--
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 promethe...@googlegroups.com.

--
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 promethe...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages