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.
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 !
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
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 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
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!
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
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!
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 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.
@@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.
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!
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
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!
@@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.
@@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"
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
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.
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!
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
I'm glad it's working, thank you for watching!
Ok nevermind, it works. Thanks for this Video i watched it maybe 100 times this week but now it works. :D
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!
Hey man you did great things keep it up and please do firewall monitoring use SNMP prometheus grafana
we are waiting
I'll do an update on firewalls spesifically, thank you for watching!
@@distrodomain thanks
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.
I'm glad it was helpful! thank you for watching!
Thank you so much! really great video, keep it up!!
I'm glad it was helpful, thank you for watching!
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.
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 !
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
I'm working on this to have a better formated code blocks, thank you for the suggestion and for watching!
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
What error are you getting, is it when you try to compile the config with the generator?, thank you for watching!
@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
This is a wonderful video. How can we add the CPU and Memory to this of the switch?
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!
Great guide, how to enable Prometheus to walk the entire device so I can also get metrics for CPU, memory, icmpOutErrors and temperature
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
Hi sir, can u test on fortigate? i need a direction properly for monitoring fortigate. thx Sir
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!
Thank you for this. Would this process work with Cisco devices.
yes this works with any device that supports snmp, Thank you for watching!
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 ?
check both configurations I think there is a typo on the name on yml file they need to match, thank you for watching!
@@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.
please guild us how to do it in windows
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!
Hi that is only possible with snmp v3? its not allow to v1 or v2?
I make it work with v2, since I could not made it work with v3
Yes it works with v1 and v2, I do recommend using v3 tho, thank you for watching!
@@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.
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!
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
@@distrodomain awesome I’ll give that a shot on Monday, thank you!
@@distrodomain thank you so much! I missed that step completely and it’s working now.
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
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!
@@distrodomain Having issues with generating the config to use the bgp mib files, primary use of this to to monitor the peering
what error are you getting?
@@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.
@@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"
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
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!
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.
hmm never seen that error before are you using ssl on the promethus endpoint for connections?
Hi Bro, I wan to add module fortigate to snmp_exporter, i have MIB file Fortigate but run the generate not detected
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!
lol, not so straight forward huh :D generator ruins it
Yea this could be simplified, unfrotunatly they made it this complicated to add mibs, thank you for watching!