Prometheus SNMP Exporter: Network Monitoring Tutorial!

Поделиться
HTML-код
  • Опубликовано: 7 фев 2025

Комментарии • 59

  • @KalsangDorjee
    @KalsangDorjee 18 дней назад +1

    Great video. Cheers.
    This worked for me with Unifi network version: 9.0.108
    snmpwalk -c public -v 3 -l authPriv -u -a SHA -A -x AES-128 -X

    • @distrodomain
      @distrodomain  7 дней назад

      I'm glad it's working, thank you for watching!

  • @Sonnenblume114
    @Sonnenblume114 4 месяца назад +2

    Ok nevermind, it works. Thanks for this Video i watched it maybe 100 times this week but now it works. :D

    • @distrodomain
      @distrodomain  4 месяца назад

      I'm glad it works! yes it's a bit tricky the whole setup, once you understand the basic parts of the puzzle it get easier, thank you for watching!

  • @Mr.Abd101
    @Mr.Abd101 28 дней назад +2

    Hey man you did great things keep it up and please do firewall monitoring use SNMP prometheus grafana

    • @Mr.Abd101
      @Mr.Abd101 28 дней назад

      we are waiting

    • @distrodomain
      @distrodomain  22 дня назад

      I'll do an update on firewalls spesifically, thank you for watching!

    • @Mr.Abd101
      @Mr.Abd101 22 дня назад

      @@distrodomain thanks

  • @MmauricioHirsch
    @MmauricioHirsch 4 месяца назад +1

    Thank you very much for sharing your knowledge, it is helping me a lot. The tutorial was really good! I'm looking from here in Brazil.

    • @distrodomain
      @distrodomain  4 месяца назад

      I'm glad it was helpful! thank you for watching!

  • @jostpozman5621
    @jostpozman5621 5 месяцев назад +1

    Thank you so much! really great video, keep it up!!

    • @distrodomain
      @distrodomain  4 месяца назад

      I'm glad it was helpful, thank you for watching!

  • @douglaspayne5029
    @douglaspayne5029 2 месяца назад

    This is an excellent video, well thought out, well presented, perfectly explained. This will help a lot of people!
    How about if you have 250 devices?
    This solution seems like it would take a long time. Perhaps if I were a cat with 7 lives then I could use 3 of them to configure Prometheus and get it to work in a medium sized business with about 65 devices across several locations.

    • @distrodomain
      @distrodomain  2 месяца назад

      In my case I’m generating the Prometheus config dynamically from an ansible inventory where we have all our devices so it speeds up the process for that, and on the grafana side we have a dynamic dashboard, thank you for watching !

  • @RealRokton
    @RealRokton 6 месяцев назад +4

    Thanks for the guide, seems like "- target_label: __ address__ " in the description has been screwed up by the formatting and changed to "- target_label: _ address_ " (_ changes the text formatting to italic). Sorry for the extra spaces, couldn't figure out how to do the proper formatting my self...
    One suggestion would be to create a GitHub gist instead with the code

    • @distrodomain
      @distrodomain  6 месяцев назад +1

      I'm working on this to have a better formated code blocks, thank you for the suggestion and for watching!

  • @defxed
    @defxed Месяц назад +1

    This was an amazing tutorial to get things running, quick question though, i wanted to update the modules with the vendor specfic mibs and thought i did it right, but it broke everything. I followed the basic instructions on how to update mibs

    • @distrodomain
      @distrodomain  Месяц назад +1

      What error are you getting, is it when you try to compile the config with the generator?, thank you for watching!

    • @defxed
      @defxed Месяц назад

      ​@distrodomain I figured it out! I think, I need to modify the generator.yml file to reflect the new MIBs. When I'm done I plan on posting a copy of thag generator file. So many people using it for sonicwalls but noone has posted one like you did for the if-mibs

  • @G0nz0uk
    @G0nz0uk 2 месяца назад +1

    This is a wonderful video. How can we add the CPU and Memory to this of the switch?

    • @distrodomain
      @distrodomain  Месяц назад

      To add cpu and memory you need to look at what MIBs are supported on yout brand of switch and then add those to the configuration so that it starts scraping the data, then add a panel in grafana, thank you for watching!

  • @mancobasanele4520
    @mancobasanele4520 5 месяцев назад +1

    Great guide, how to enable Prometheus to walk the entire device so I can also get metrics for CPU, memory, icmpOutErrors and temperature

    • @distrodomain
      @distrodomain  5 месяцев назад +1

      you can add top level mib to the list to crawl like "icmp" parent that includes:
      icmpInMsgs
      icmpInErrors
      icmpInDestUnreachs
      icmpInTimeExcds
      icmpInParmProbs
      icmpInSrcQuenchs
      icmpInRedirects
      icmpInEchos
      icmpInEchoReps
      icmpInTimestamps
      icmpInTimestampReps
      icmpInAddrMasks
      icmpInAddrMaskReps
      icmpOutMsgs
      icmpOutErrors
      icmpOutDestUnreachs
      icmpOutTimeExcds
      icmpOutParmProbs
      icmpOutSrcQuenchs
      icmpOutRedirects
      icmpOutEchos
      icmpOutEchoReps
      icmpOutTimestamps
      icmpOutTimestampReps
      icmpOutAddrMasks
      icmpOutAddrMaskReps
      icmpStatsTable
      icmpMsgStatsTable
      you can use an OID reference table to check each parent, let me know if it's helpful, thank you for watching

  • @halimarr8692
    @halimarr8692 Месяц назад +1

    Hi sir, can u test on fortigate? i need a direction properly for monitoring fortigate. thx Sir

    • @distrodomain
      @distrodomain  Месяц назад

      For fortigate you need to know what are the mibs and or metrics you want to monitor then add those to the configuration, you can use something like an MIB explorer to find out, thank you for watching!

  • @damolaazeez3518
    @damolaazeez3518 5 месяцев назад +1

    Thank you for this. Would this process work with Cisco devices.

    • @distrodomain
      @distrodomain  5 месяцев назад

      yes this works with any device that supports snmp, Thank you for watching!

  • @johnconnor1535
    @johnconnor1535 Месяц назад +1

    I am running into this error now
    :port/config is showing {} (blank) config page
    public_v3 is throwing this error message, "Unknown auth 'public_v3'".
    I wonder if not using TLS connection is causing this behavior? Any suggestions/solution ?

    • @distrodomain
      @distrodomain  Месяц назад

      check both configurations I think there is a typo on the name on yml file they need to match, thank you for watching!

    • @johnconnor1535
      @johnconnor1535 Месяц назад

      @@distrodomain triple checked everything as well as re-created the file/folders exactly mentioned in the video. i even copied pasted and correctly indented the code from below, yet I am getting the same error. After getting inside the container, I see that the volumes were not correctly mounted. Could you please check if that is the case with your code too.
      ./config:/etc/snmp-exporter is not mounting and copy over the auto-generated snmp.yml file. Without it being mounted over, I cant seem to parse snmp v3 data which otherwise is accessible with snmpwalk. I will eagerly wait for your response.

  • @Gaming_With_Nirmal
    @Gaming_With_Nirmal 2 месяца назад +1

    please guild us how to do it in windows

    • @distrodomain
      @distrodomain  Месяц назад +1

      The best apporach would be to install docker desktop for windows and the run the containers the same way as we do here, thank you for watching!

  • @stefhaniemilagrosjaramillo2299
    @stefhaniemilagrosjaramillo2299 5 месяцев назад +2

    Hi that is only possible with snmp v3? its not allow to v1 or v2?

    • @mizatto
      @mizatto 4 месяца назад

      I make it work with v2, since I could not made it work with v3

    • @distrodomain
      @distrodomain  4 месяца назад

      Yes it works with v1 and v2, I do recommend using v3 tho, thank you for watching!

    • @johnconnor1535
      @johnconnor1535 Месяц назад

      @@mizatto May i know what was the actual issue you faced with v3? I am currently chasing my own tail with V3 as well. Failing to parse data, but snmpwalk is breezing though without any issues.

  • @TheBroadcastEngineer
    @TheBroadcastEngineer 5 месяцев назад +1

    I'm running into this error when I'm trying to run *make generator mibs*
    make: go: No such file or directory
    make: *** [Makefile:87: generator] Error 127
    I've searched high and low on RUclips and Google... nothing... everyone who is doing this tutorial has no problems... Do you have any suggestions? Thanks!

    • @distrodomain
      @distrodomain  5 месяцев назад +2

      You are missing the go programing language, you need to install the devel libraries, if you are on ubuntu try apt install gccgo-go or apt install golang-go thank you for watching

    • @TheBroadcastEngineer
      @TheBroadcastEngineer 5 месяцев назад

      @@distrodomain awesome I’ll give that a shot on Monday, thank you!

    • @TheBroadcastEngineer
      @TheBroadcastEngineer 5 месяцев назад

      @@distrodomain thank you so much! I missed that step completely and it’s working now.

  • @jakebenjamin8895
    @jakebenjamin8895 4 месяца назад +1

    Do you have a discord or anything similar for community help ? Can't seem to get this to work with custom mibs for a arista switch

    • @distrodomain
      @distrodomain  4 месяца назад

      The discord is coming soon, and actually I will be adding some arista switches to my system soon, mibs you are probably good with what comes on the generator, what you need to look for is what OIDs you want to scrape like interfaces, or ifHCInOctets, under ifmib, or are you having issue generating the config, thank you for watching!

    • @jakebenjamin8895
      @jakebenjamin8895 4 месяца назад

      @@distrodomain Having issues with generating the config to use the bgp mib files, primary use of this to to monitor the peering

    • @distrodomain
      @distrodomain  4 месяца назад

      what error are you getting?

    • @jakebenjamin8895
      @jakebenjamin8895 4 месяца назад

      @@distrodomain on a fresh install now and its now saying on startup of snmp-exporter
      ts=2024-09-20T21:35:50.933Z caller=main.go:212 level=info msg="Starting snmp_exporter" version="(version=0.26.0, branch=HEAD, revision=44f8732988e726bad3f13d5779f1da7705178642)" concurrency=1 debug_snmp=false
      ts=2024-09-20T21:35:50.933Z caller=main.go:213 level=info build_context="(go=go1.22.3, platform=linux/amd64, user=root@90ba0aabb239, date=20240511-11:16:35, tags=unknown)"
      ts=2024-09-20T21:35:51.036Z caller=main.go:220 level=error msg="Error parsing config file" err="yaml: unmarshal errors:
      line 29871: field datetime_pattern not found in type config.Metric
      line 30277: field datetime_pattern not found in type config.Metric
      line 30293: field datetime_pattern not found in type config.Metric
      line 30309: field datetime_pattern not found in type config.Metric
      line 30325: field datetime_pattern not found in type config.Metric
      line 30341: field datetime_pattern not found in type config.Metric
      line 30357: field datetime_pattern not found in type config.Metric
      line 30373: field datetime_pattern not found in type config.Metric
      line 30389: field datetime_pattern not found in type config.Metric
      line 30405: field datetime_pattern not found in type config.Metric"
      ts=2024-09-20T21:35:51.036Z caller=main.go:221 level=error msg="Possible old config file, see github.com/prometheus/snmp_exporter/blob/main/auth-split-migration.md"
      This is on a fresh image of ubuntu followed all the steps to a tee.

    • @jakebenjamin8895
      @jakebenjamin8895 4 месяца назад

      @@distrodomain on a fresh install
      ts=2024-09-20T22:39:48.867Z caller=main.go:212 level=info msg="Starting snmp_exporter" version="(version=0.26.0, branch=HEAD, revision=44f8732988e726bad3f13d5779f1da7705178642)" concurrency=1 debug_snmp=false
      ts=2024-09-20T22:39:48.867Z caller=main.go:213 level=info build_context="(go=go1.22.3, platform=linux/amd64, user=root@90ba0aabb239, date=20240511-11:16:35, tags=unknown)"
      ts=2024-09-20T22:39:48.965Z caller=main.go:220 level=error msg="Error parsing config file" err="yaml: unmarshal errors:
      line 29876: field datetime_pattern not found in type config.Metric
      line 30282: field datetime_pattern not found in type config.Metric
      line 30298: field datetime_pattern not found in type config.Metric
      line 30314: field datetime_pattern not found in type config.Metric
      line 30330: field datetime_pattern not found in type config.Metric
      line 30346: field datetime_pattern not found in type config.Metric
      line 30362: field datetime_pattern not found in type config.Metric
      line 30378: field datetime_pattern not found in type config.Metric
      line 30394: field datetime_pattern not found in type config.Metric
      line 30410: field datetime_pattern not found in type config.Metric"
      ts=2024-09-20T22:39:48.965Z caller=main.go:221 level=error msg="Possible old config file, see github.com/prometheus/snmp_exporter/blob/main/auth-split-migration.md"

  • @piotrnasiadka1671
    @piotrnasiadka1671 2 месяца назад

    Hi can someone help me i did a tutorial and it's working but I also need in grafan a information about what is the temperature of my ups.
    I think I need to and a question for snnmp to get that information

    • @distrodomain
      @distrodomain  Месяц назад

      You need to dive into a MIB explorer and figure out what is the metric you need to pull for that, thank you for watching!

  • @KalsangDorjee
    @KalsangDorjee 3 дня назад

    I am not sure if anyone received this error on their Pormetheus Endpoint:
    tls: failed to verify certificate: x509: certificate is valid for 127.0.0.1, fe80::1, not 192.168.20.1 - (This is my unifi gateway)
    Any help would be appreciated. Thanks in advance.

    • @distrodomain
      @distrodomain  День назад

      hmm never seen that error before are you using ssl on the promethus endpoint for connections?

  • @samkancil5333
    @samkancil5333 4 месяца назад +1

    Hi Bro, I wan to add module fortigate to snmp_exporter, i have MIB file Fortigate but run the generate not detected

    • @distrodomain
      @distrodomain  4 месяца назад +1

      put the fortinet mibs in the mibs folder, then on your generator conf, you need to put what oids you want to include in the config to scrape, then generate the config again, let me know if it gives you any errors, thank you for watching!

  • @overbytex2
    @overbytex2 2 месяца назад +1

    lol, not so straight forward huh :D generator ruins it

    • @distrodomain
      @distrodomain  Месяц назад

      Yea this could be simplified, unfrotunatly they made it this complicated to add mibs, thank you for watching!