[prometheus-users] Re: snmp_exporter service fails
This isn't really a question about prometheus any more, it's a question about system administration in general. You've unfortunately overwritten one file (the snmp_exporter executable) with another file (a text YAML file). There are snmp_exporter binaries for various architectures available from the project releases page: https://github.com/prometheus/snmp_exporter/releases If you need help you with the downloading, unpacking, moving files into the right place and so on, then you should probably talk to a local system administrator who can work with you directly on this. -- 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-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/7a3aa629-db75-48d1-a6d1-eeaef2531a77n%40googlegroups.com.
[prometheus-users] Re: snmp_exporter service fails
Hi Brian, Can you please help me sort this out. How to change the binary file to its original form? On Thursday, October 14, 2021 at 12:41:36 PM UTC+4 Ummekulsum Musekhan wrote: > Hi Brian, > > Following is the output of less /usr/local/bin/snmp_exporter > > # WARNING: This file was auto-generated using snmp_exporter generator, > manual changes will be lost. > apcups: > walk: > - 1.3.6.1.2.1.2 > - 1.3.6.1.4.1.318.1.1.1.12 > - 1.3.6.1.4.1.318.1.1.1.2 > - 1.3.6.1.4.1.318.1.1.1.3 > - 1.3.6.1.4.1.318.1.1.1.4 > - 1.3.6.1.4.1.318.1.1.1.7.2 > - 1.3.6.1.4.1.318.1.1.10.2.3.2 > - 1.3.6.1.4.1.318.1.1.26.10.2.2 > - 1.3.6.1.4.1.318.1.1.26.4.3 > - 1.3.6.1.4.1.318.1.1.26.6.3 > - 1.3.6.1.4.1.318.1.1.26.8.3 > get: > - 1.3.6.1.2.1.1.3.0 > - 1.3.6.1.4.1.318.1.1.1.8.1.0 > metrics: > - name: sysUpTime > oid: 1.3.6.1.2.1.1.3 > type: gauge > help: The time (in hundredths of a second) since the network > management portion > of the system was last re-initialized. - 1.3.6.1.2.1.1.3 > - name: ifNumber > oid: 1.3.6.1.2.1.2.1 > type: gauge > help: The number of network interfaces (regardless of their current > state) present > on this system. - 1.3.6.1.2.1.2.1 > - name: ifIndex > oid: 1.3.6.1.2.1.2.2.1.1 > type: gauge > help: A unique value, greater than zero, for each interface - > 1.3.6.1.2.1.2.2.1.1 > indexes: > - labelname: ifIndex > type: gauge > - name: ifDescr > oid: 1.3.6.1.2.1.2.2.1.2 > type: DisplayString > help: A textual string containing information about the interface - > 1.3.6.1.2.1.2.2.1.2 > indexes: > - labelname: ifIndex > > > On Wednesday, October 13, 2021 at 5:36:16 PM UTC+4 Brian Candler wrote: > >> It looks like you're replaced the snmp_exporter binary with the yaml >> file. Try: >> >> less /usr/local/bin/snmp_exporter >> >> to look at the contents. >> >> Possibly you meant to put the generated file into snmp_exporter.yml, but >> you replaced the snmp_exporter binary by mistake? >> >> On Wednesday, 13 October 2021 at 12:04:00 UTC+1 umus...@gmail.com wrote: >> >>> This is the output >>> >>> grafana:~# /usr/local/bin/snmp_exporter >>> /usr/local/bin/snmp_exporter: line 2: apcups:: command not found >>> /usr/local/bin/snmp_exporter: line 3: walk:: command not found >>> /usr/local/bin/snmp_exporter: line 4: -: command not found >>> /usr/local/bin/snmp_exporter: line 5: -: command not found >>> /usr/local/bin/snmp_exporter: line 6: -: command not found >>> /usr/local/bin/snmp_exporter: line 7: -: command not found >>> /usr/local/bin/snmp_exporter: line 8: -: command not found >>> /usr/local/bin/snmp_exporter: line 9: -: command not found >>> /usr/local/bin/snmp_exporter: line 10: -: command not found >>> /usr/local/bin/snmp_exporter: line 11: -: command not found >>> /usr/local/bin/snmp_exporter: line 12: -: command not found >>> /usr/local/bin/snmp_exporter: line 13: -: command not found >>> /usr/local/bin/snmp_exporter: line 14: -: command not found >>> /usr/local/bin/snmp_exporter: line 15: get:: command not found >>> /usr/local/bin/snmp_exporter: line 16: -: command not found >>> /usr/local/bin/snmp_exporter: line 17: -: command not found >>> /usr/local/bin/snmp_exporter: line 18: metrics:: command not found >>> /usr/local/bin/snmp_exporter: line 19: -: command not found >>> /usr/local/bin/snmp_exporter: line 20: oid:: command not found >>> /usr/local/bin/snmp_exporter: line 21: type:: command not found >>> /usr/local/bin/snmp_exporter: line 22: syntax error near unexpected >>> token `(' >>> /usr/local/bin/snmp_exporter: line 22: `help: The time (in >>> hundredths of a second) since the network management portion' >>> >>> >>> On Wednesday, October 13, 2021 at 1:27:19 PM UTC+4 Brian Candler wrote: >>> This is nothing to do with systemd. Type the following command at the shell prompt: /usr/local/bin/snmp_exporter Show what error it returns. It will almost certainly tell you that the binary is bad. If so, you either need to download or build a fresh snmp_exporter binary. On Wednesday, 13 October 2021 at 09:05:41 UTC+1 umus...@gmail.com wrote: > Hey, > Thanks for your response. > > I have changed the systemd file, yet the same error. > > grafana:~# systemctl status snmp-exporter.service > ● snmp-exporter.service - Prometheus SNMP Exporter Service > Loaded: loaded (/etc/systemd/system/snmp-exporter.service; > enabled; vendor preset: enabled) > Active: failed (Result: exit-code) since Wed 2021-10-13 12:02:03 > +04; 11s ago > Process: 683678 ExecStart=/usr/local/bin/snmp_exporter > (code=exited, status=203/EXEC) >Main PID: 683678 (code=exited, status=203/EXEC) > > Oct 13 12:02:03 grafana systemd[1]: Started Prometheus SNMP Exporter > Service. > Oct 13 12:02:03 grafana systemd[683678]: snmp-exporter.service: Failed >
[prometheus-users] Re: snmp_exporter service fails
Hi Brian, Following is the output of less /usr/local/bin/snmp_exporter # WARNING: This file was auto-generated using snmp_exporter generator, manual changes will be lost. apcups: walk: - 1.3.6.1.2.1.2 - 1.3.6.1.4.1.318.1.1.1.12 - 1.3.6.1.4.1.318.1.1.1.2 - 1.3.6.1.4.1.318.1.1.1.3 - 1.3.6.1.4.1.318.1.1.1.4 - 1.3.6.1.4.1.318.1.1.1.7.2 - 1.3.6.1.4.1.318.1.1.10.2.3.2 - 1.3.6.1.4.1.318.1.1.26.10.2.2 - 1.3.6.1.4.1.318.1.1.26.4.3 - 1.3.6.1.4.1.318.1.1.26.6.3 - 1.3.6.1.4.1.318.1.1.26.8.3 get: - 1.3.6.1.2.1.1.3.0 - 1.3.6.1.4.1.318.1.1.1.8.1.0 metrics: - name: sysUpTime oid: 1.3.6.1.2.1.1.3 type: gauge help: The time (in hundredths of a second) since the network management portion of the system was last re-initialized. - 1.3.6.1.2.1.1.3 - name: ifNumber oid: 1.3.6.1.2.1.2.1 type: gauge help: The number of network interfaces (regardless of their current state) present on this system. - 1.3.6.1.2.1.2.1 - name: ifIndex oid: 1.3.6.1.2.1.2.2.1.1 type: gauge help: A unique value, greater than zero, for each interface - 1.3.6.1.2.1.2.2.1.1 indexes: - labelname: ifIndex type: gauge - name: ifDescr oid: 1.3.6.1.2.1.2.2.1.2 type: DisplayString help: A textual string containing information about the interface - 1.3.6.1.2.1.2.2.1.2 indexes: - labelname: ifIndex On Wednesday, October 13, 2021 at 5:36:16 PM UTC+4 Brian Candler wrote: > It looks like you're replaced the snmp_exporter binary with the yaml > file. Try: > > less /usr/local/bin/snmp_exporter > > to look at the contents. > > Possibly you meant to put the generated file into snmp_exporter.yml, but > you replaced the snmp_exporter binary by mistake? > > On Wednesday, 13 October 2021 at 12:04:00 UTC+1 umus...@gmail.com wrote: > >> This is the output >> >> grafana:~# /usr/local/bin/snmp_exporter >> /usr/local/bin/snmp_exporter: line 2: apcups:: command not found >> /usr/local/bin/snmp_exporter: line 3: walk:: command not found >> /usr/local/bin/snmp_exporter: line 4: -: command not found >> /usr/local/bin/snmp_exporter: line 5: -: command not found >> /usr/local/bin/snmp_exporter: line 6: -: command not found >> /usr/local/bin/snmp_exporter: line 7: -: command not found >> /usr/local/bin/snmp_exporter: line 8: -: command not found >> /usr/local/bin/snmp_exporter: line 9: -: command not found >> /usr/local/bin/snmp_exporter: line 10: -: command not found >> /usr/local/bin/snmp_exporter: line 11: -: command not found >> /usr/local/bin/snmp_exporter: line 12: -: command not found >> /usr/local/bin/snmp_exporter: line 13: -: command not found >> /usr/local/bin/snmp_exporter: line 14: -: command not found >> /usr/local/bin/snmp_exporter: line 15: get:: command not found >> /usr/local/bin/snmp_exporter: line 16: -: command not found >> /usr/local/bin/snmp_exporter: line 17: -: command not found >> /usr/local/bin/snmp_exporter: line 18: metrics:: command not found >> /usr/local/bin/snmp_exporter: line 19: -: command not found >> /usr/local/bin/snmp_exporter: line 20: oid:: command not found >> /usr/local/bin/snmp_exporter: line 21: type:: command not found >> /usr/local/bin/snmp_exporter: line 22: syntax error near unexpected token >> `(' >> /usr/local/bin/snmp_exporter: line 22: `help: The time (in hundredths >> of a second) since the network management portion' >> >> >> On Wednesday, October 13, 2021 at 1:27:19 PM UTC+4 Brian Candler wrote: >> >>> This is nothing to do with systemd. >>> >>> Type the following command at the shell prompt: >>> >>> /usr/local/bin/snmp_exporter >>> >>> Show what error it returns. It will almost certainly tell you that the >>> binary is bad. If so, you either need to download or build a fresh >>> snmp_exporter binary. >>> >>> On Wednesday, 13 October 2021 at 09:05:41 UTC+1 umus...@gmail.com wrote: >>> Hey, Thanks for your response. I have changed the systemd file, yet the same error. grafana:~# systemctl status snmp-exporter.service ● snmp-exporter.service - Prometheus SNMP Exporter Service Loaded: loaded (/etc/systemd/system/snmp-exporter.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Wed 2021-10-13 12:02:03 +04; 11s ago Process: 683678 ExecStart=/usr/local/bin/snmp_exporter (code=exited, status=203/EXEC) Main PID: 683678 (code=exited, status=203/EXEC) Oct 13 12:02:03 grafana systemd[1]: Started Prometheus SNMP Exporter Service. Oct 13 12:02:03 grafana systemd[683678]: snmp-exporter.service: Failed to execute command: Exec format error Oct 13 12:02:03 grafana systemd[683678]: snmp-exporter.service: Failed at step EXEC spawning /usr/local/bin/snmp_exporter: Exec format error Oct 13 12:02:03 grafana systemd[1]: snmp-exporter.service: Main process exited, code=exited, status=203/EXEC Oct 13 12:02:03 grafana systemd[1]:
[prometheus-users] Re: snmp_exporter service fails
It looks like you're replaced the snmp_exporter binary with the yaml file. Try: less /usr/local/bin/snmp_exporter to look at the contents. Possibly you meant to put the generated file into snmp_exporter.yml, but you replaced the snmp_exporter binary by mistake? On Wednesday, 13 October 2021 at 12:04:00 UTC+1 umus...@gmail.com wrote: > This is the output > > grafana:~# /usr/local/bin/snmp_exporter > /usr/local/bin/snmp_exporter: line 2: apcups:: command not found > /usr/local/bin/snmp_exporter: line 3: walk:: command not found > /usr/local/bin/snmp_exporter: line 4: -: command not found > /usr/local/bin/snmp_exporter: line 5: -: command not found > /usr/local/bin/snmp_exporter: line 6: -: command not found > /usr/local/bin/snmp_exporter: line 7: -: command not found > /usr/local/bin/snmp_exporter: line 8: -: command not found > /usr/local/bin/snmp_exporter: line 9: -: command not found > /usr/local/bin/snmp_exporter: line 10: -: command not found > /usr/local/bin/snmp_exporter: line 11: -: command not found > /usr/local/bin/snmp_exporter: line 12: -: command not found > /usr/local/bin/snmp_exporter: line 13: -: command not found > /usr/local/bin/snmp_exporter: line 14: -: command not found > /usr/local/bin/snmp_exporter: line 15: get:: command not found > /usr/local/bin/snmp_exporter: line 16: -: command not found > /usr/local/bin/snmp_exporter: line 17: -: command not found > /usr/local/bin/snmp_exporter: line 18: metrics:: command not found > /usr/local/bin/snmp_exporter: line 19: -: command not found > /usr/local/bin/snmp_exporter: line 20: oid:: command not found > /usr/local/bin/snmp_exporter: line 21: type:: command not found > /usr/local/bin/snmp_exporter: line 22: syntax error near unexpected token > `(' > /usr/local/bin/snmp_exporter: line 22: `help: The time (in hundredths > of a second) since the network management portion' > > > On Wednesday, October 13, 2021 at 1:27:19 PM UTC+4 Brian Candler wrote: > >> This is nothing to do with systemd. >> >> Type the following command at the shell prompt: >> >> /usr/local/bin/snmp_exporter >> >> Show what error it returns. It will almost certainly tell you that the >> binary is bad. If so, you either need to download or build a fresh >> snmp_exporter binary. >> >> On Wednesday, 13 October 2021 at 09:05:41 UTC+1 umus...@gmail.com wrote: >> >>> Hey, >>> Thanks for your response. >>> >>> I have changed the systemd file, yet the same error. >>> >>> grafana:~# systemctl status snmp-exporter.service >>> ● snmp-exporter.service - Prometheus SNMP Exporter Service >>> Loaded: loaded (/etc/systemd/system/snmp-exporter.service; enabled; >>> vendor preset: enabled) >>> Active: failed (Result: exit-code) since Wed 2021-10-13 12:02:03 >>> +04; 11s ago >>> Process: 683678 ExecStart=/usr/local/bin/snmp_exporter (code=exited, >>> status=203/EXEC) >>>Main PID: 683678 (code=exited, status=203/EXEC) >>> >>> Oct 13 12:02:03 grafana systemd[1]: Started Prometheus SNMP Exporter >>> Service. >>> Oct 13 12:02:03 grafana systemd[683678]: snmp-exporter.service: Failed >>> to execute command: Exec format error >>> Oct 13 12:02:03 grafana systemd[683678]: snmp-exporter.service: Failed >>> at step EXEC spawning /usr/local/bin/snmp_exporter: Exec format error >>> Oct 13 12:02:03 grafana systemd[1]: snmp-exporter.service: Main process >>> exited, code=exited, status=203/EXEC >>> Oct 13 12:02:03 grafana systemd[1]: snmp-exporter.service: Failed with >>> result 'exit-code'. >>> >>> _ >>> >>> Initially I had installed snmp_exporter, but I was unable to get the >>> instance up for my cisco switch (thought local host and snmp_exporter >>> service was running and I was even able to do snmpwalk to my switch). So I >>> removed it and then I installed snmp_exporter generator and that is >>> generating the snmp_exporter file. But after installing this the service >>> itself never came up. >>> >>> >>> >>> >>> >>> >>> >>> >>> On Wednesday, October 13, 2021 at 11:54:27 AM UTC+4 Brian Candler wrote: >>> "Exec format error" = the binary is invalid = there was a problem with how you built the binary. I expect you'll get the same error running the binary directly at the command line: try /usr/local/bin/snmp_exporter and see if that gives a better error message. Also see if "ldd /usr/local/bin/snmp_exporter" gives you any clues. This is the sort of error you'd get if you built the binary to run on Linux but you're trying to run it on a Mac, for example. On Wednesday, 13 October 2021 at 06:47:36 UTC+1 umus...@gmail.com wrote: > Hi, > > I have recently installed snmp_exporter generator, which is generating > the snmp_exporter file. > But this service shows failed. I have tried to change the systemd file > and give various paths. Also moved the snmp.yml file to different > location > but still service is failed Following is the
[prometheus-users] Re: snmp_exporter service fails
This is the output grafana:~# /usr/local/bin/snmp_exporter /usr/local/bin/snmp_exporter: line 2: apcups:: command not found /usr/local/bin/snmp_exporter: line 3: walk:: command not found /usr/local/bin/snmp_exporter: line 4: -: command not found /usr/local/bin/snmp_exporter: line 5: -: command not found /usr/local/bin/snmp_exporter: line 6: -: command not found /usr/local/bin/snmp_exporter: line 7: -: command not found /usr/local/bin/snmp_exporter: line 8: -: command not found /usr/local/bin/snmp_exporter: line 9: -: command not found /usr/local/bin/snmp_exporter: line 10: -: command not found /usr/local/bin/snmp_exporter: line 11: -: command not found /usr/local/bin/snmp_exporter: line 12: -: command not found /usr/local/bin/snmp_exporter: line 13: -: command not found /usr/local/bin/snmp_exporter: line 14: -: command not found /usr/local/bin/snmp_exporter: line 15: get:: command not found /usr/local/bin/snmp_exporter: line 16: -: command not found /usr/local/bin/snmp_exporter: line 17: -: command not found /usr/local/bin/snmp_exporter: line 18: metrics:: command not found /usr/local/bin/snmp_exporter: line 19: -: command not found /usr/local/bin/snmp_exporter: line 20: oid:: command not found /usr/local/bin/snmp_exporter: line 21: type:: command not found /usr/local/bin/snmp_exporter: line 22: syntax error near unexpected token `(' /usr/local/bin/snmp_exporter: line 22: `help: The time (in hundredths of a second) since the network management portion' On Wednesday, October 13, 2021 at 1:27:19 PM UTC+4 Brian Candler wrote: > This is nothing to do with systemd. > > Type the following command at the shell prompt: > > /usr/local/bin/snmp_exporter > > Show what error it returns. It will almost certainly tell you that the > binary is bad. If so, you either need to download or build a fresh > snmp_exporter binary. > > On Wednesday, 13 October 2021 at 09:05:41 UTC+1 umus...@gmail.com wrote: > >> Hey, >> Thanks for your response. >> >> I have changed the systemd file, yet the same error. >> >> grafana:~# systemctl status snmp-exporter.service >> ● snmp-exporter.service - Prometheus SNMP Exporter Service >> Loaded: loaded (/etc/systemd/system/snmp-exporter.service; enabled; >> vendor preset: enabled) >> Active: failed (Result: exit-code) since Wed 2021-10-13 12:02:03 >> +04; 11s ago >> Process: 683678 ExecStart=/usr/local/bin/snmp_exporter (code=exited, >> status=203/EXEC) >>Main PID: 683678 (code=exited, status=203/EXEC) >> >> Oct 13 12:02:03 grafana systemd[1]: Started Prometheus SNMP Exporter >> Service. >> Oct 13 12:02:03 grafana systemd[683678]: snmp-exporter.service: Failed to >> execute command: Exec format error >> Oct 13 12:02:03 grafana systemd[683678]: snmp-exporter.service: Failed at >> step EXEC spawning /usr/local/bin/snmp_exporter: Exec format error >> Oct 13 12:02:03 grafana systemd[1]: snmp-exporter.service: Main process >> exited, code=exited, status=203/EXEC >> Oct 13 12:02:03 grafana systemd[1]: snmp-exporter.service: Failed with >> result 'exit-code'. >> >> _ >> >> Initially I had installed snmp_exporter, but I was unable to get the >> instance up for my cisco switch (thought local host and snmp_exporter >> service was running and I was even able to do snmpwalk to my switch). So I >> removed it and then I installed snmp_exporter generator and that is >> generating the snmp_exporter file. But after installing this the service >> itself never came up. >> >> >> >> >> >> >> >> >> On Wednesday, October 13, 2021 at 11:54:27 AM UTC+4 Brian Candler wrote: >> >>> "Exec format error" = the binary is invalid = there was a problem with >>> how you built the binary. >>> >>> I expect you'll get the same error running the binary directly at the >>> command line: try >>> /usr/local/bin/snmp_exporter >>> and see if that gives a better error message. Also see if "ldd >>> /usr/local/bin/snmp_exporter" gives you any clues. >>> >>> This is the sort of error you'd get if you built the binary to run on >>> Linux but you're trying to run it on a Mac, for example. >>> >>> On Wednesday, 13 October 2021 at 06:47:36 UTC+1 umus...@gmail.com wrote: >>> Hi, I have recently installed snmp_exporter generator, which is generating the snmp_exporter file. But this service shows failed. I have tried to change the systemd file and give various paths. Also moved the snmp.yml file to different location but still service is failed Following is the output. Can any one help? grafana:~# systemctl status snmp-exporter.service ● snmp-exporter.service - Prometheus SNMP Exporter Service Loaded: loaded (/etc/systemd/system/snmp-exporter.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Tue 2021-10-12 13:07:18 +04; 8s ago Process: 469550 ExecStart=/usr/local/bin/snmp_exporter --config.file=/usr/local/bin/snmp.yml (code=exited, status=203/EXEC) Main PID:
[prometheus-users] Re: snmp_exporter service fails
This is nothing to do with systemd. Type the following command at the shell prompt: /usr/local/bin/snmp_exporter Show what error it returns. It will almost certainly tell you that the binary is bad. If so, you either need to download or build a fresh snmp_exporter binary. On Wednesday, 13 October 2021 at 09:05:41 UTC+1 umus...@gmail.com wrote: > Hey, > Thanks for your response. > > I have changed the systemd file, yet the same error. > > grafana:~# systemctl status snmp-exporter.service > ● snmp-exporter.service - Prometheus SNMP Exporter Service > Loaded: loaded (/etc/systemd/system/snmp-exporter.service; enabled; > vendor preset: enabled) > Active: failed (Result: exit-code) since Wed 2021-10-13 12:02:03 +04; > 11s ago > Process: 683678 ExecStart=/usr/local/bin/snmp_exporter (code=exited, > status=203/EXEC) >Main PID: 683678 (code=exited, status=203/EXEC) > > Oct 13 12:02:03 grafana systemd[1]: Started Prometheus SNMP Exporter > Service. > Oct 13 12:02:03 grafana systemd[683678]: snmp-exporter.service: Failed to > execute command: Exec format error > Oct 13 12:02:03 grafana systemd[683678]: snmp-exporter.service: Failed at > step EXEC spawning /usr/local/bin/snmp_exporter: Exec format error > Oct 13 12:02:03 grafana systemd[1]: snmp-exporter.service: Main process > exited, code=exited, status=203/EXEC > Oct 13 12:02:03 grafana systemd[1]: snmp-exporter.service: Failed with > result 'exit-code'. > > _ > > Initially I had installed snmp_exporter, but I was unable to get the > instance up for my cisco switch (thought local host and snmp_exporter > service was running and I was even able to do snmpwalk to my switch). So I > removed it and then I installed snmp_exporter generator and that is > generating the snmp_exporter file. But after installing this the service > itself never came up. > > > > > > > > > On Wednesday, October 13, 2021 at 11:54:27 AM UTC+4 Brian Candler wrote: > >> "Exec format error" = the binary is invalid = there was a problem with >> how you built the binary. >> >> I expect you'll get the same error running the binary directly at the >> command line: try >> /usr/local/bin/snmp_exporter >> and see if that gives a better error message. Also see if "ldd >> /usr/local/bin/snmp_exporter" gives you any clues. >> >> This is the sort of error you'd get if you built the binary to run on >> Linux but you're trying to run it on a Mac, for example. >> >> On Wednesday, 13 October 2021 at 06:47:36 UTC+1 umus...@gmail.com wrote: >> >>> Hi, >>> >>> I have recently installed snmp_exporter generator, which is generating >>> the snmp_exporter file. >>> But this service shows failed. I have tried to change the systemd file >>> and give various paths. Also moved the snmp.yml file to different location >>> but still service is failed Following is the output. Can any one help? >>> >>> grafana:~# systemctl status snmp-exporter.service >>> ● snmp-exporter.service - Prometheus SNMP Exporter Service >>> Loaded: loaded (/etc/systemd/system/snmp-exporter.service; enabled; >>> vendor preset: enabled) >>> Active: failed (Result: exit-code) since Tue 2021-10-12 13:07:18 +04; 8s >>> ago >>> Process: 469550 ExecStart=/usr/local/bin/snmp_exporter >>> --config.file=/usr/local/bin/snmp.yml (code=exited, status=203/EXEC) >>> Main PID: 469550 (code=exited, status=203/EXEC) >>> >>> Oct 12 13:07:18 grafana systemd[1]: Started Prometheus SNMP Exporter >>> Service. >>> Oct 12 13:07:18 grafana systemd[469550]: snmp-exporter.service: Failed >>> to execute command: Exec format error >>> Oct 12 13:07:18 grafana systemd[469550]: snmp-exporter.service: Failed >>> at step EXEC spawning /usr/local/bin/snmp_exporter: Exec format error >>> Oct 12 13:07:18 grafana systemd[1]: snmp-exporter.service: Main process >>> exited, code=exited, status=203/EXEC >>> Oct 12 13:07:18 grafana systemd[1]: snmp-exporter.service: Failed with >>> result 'exit-code'. >>> >> -- 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-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/67d46e9e-376b-4f85-a152-ad5dac6c27acn%40googlegroups.com.
[prometheus-users] Re: snmp_exporter service fails
Hey, Thanks for your response. I have changed the systemd file, yet the same error. grafana:~# systemctl status snmp-exporter.service ● snmp-exporter.service - Prometheus SNMP Exporter Service Loaded: loaded (/etc/systemd/system/snmp-exporter.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Wed 2021-10-13 12:02:03 +04; 11s ago Process: 683678 ExecStart=/usr/local/bin/snmp_exporter (code=exited, status=203/EXEC) Main PID: 683678 (code=exited, status=203/EXEC) Oct 13 12:02:03 grafana systemd[1]: Started Prometheus SNMP Exporter Service. Oct 13 12:02:03 grafana systemd[683678]: snmp-exporter.service: Failed to execute command: Exec format error Oct 13 12:02:03 grafana systemd[683678]: snmp-exporter.service: Failed at step EXEC spawning /usr/local/bin/snmp_exporter: Exec format error Oct 13 12:02:03 grafana systemd[1]: snmp-exporter.service: Main process exited, code=exited, status=203/EXEC Oct 13 12:02:03 grafana systemd[1]: snmp-exporter.service: Failed with result 'exit-code'. _ Initially I had installed snmp_exporter, but I was unable to get the instance up for my cisco switch (thought local host and snmp_exporter service was running and I was even able to do snmpwalk to my switch). So I removed it and then I installed snmp_exporter generator and that is generating the snmp_exporter file. But after installing this the service itself never came up. On Wednesday, October 13, 2021 at 11:54:27 AM UTC+4 Brian Candler wrote: > "Exec format error" = the binary is invalid = there was a problem with how > you built the binary. > > I expect you'll get the same error running the binary directly at the > command line: try > /usr/local/bin/snmp_exporter > and see if that gives a better error message. Also see if "ldd > /usr/local/bin/snmp_exporter" gives you any clues. > > This is the sort of error you'd get if you built the binary to run on > Linux but you're trying to run it on a Mac, for example. > > On Wednesday, 13 October 2021 at 06:47:36 UTC+1 umus...@gmail.com wrote: > >> Hi, >> >> I have recently installed snmp_exporter generator, which is generating >> the snmp_exporter file. >> But this service shows failed. I have tried to change the systemd file >> and give various paths. Also moved the snmp.yml file to different location >> but still service is failed Following is the output. Can any one help? >> >> grafana:~# systemctl status snmp-exporter.service >> ● snmp-exporter.service - Prometheus SNMP Exporter Service >> Loaded: loaded (/etc/systemd/system/snmp-exporter.service; enabled; >> vendor preset: enabled) >> Active: failed (Result: exit-code) since Tue 2021-10-12 13:07:18 +04; 8s >> ago >> Process: 469550 ExecStart=/usr/local/bin/snmp_exporter >> --config.file=/usr/local/bin/snmp.yml (code=exited, status=203/EXEC) >> Main PID: 469550 (code=exited, status=203/EXEC) >> >> Oct 12 13:07:18 grafana systemd[1]: Started Prometheus SNMP Exporter >> Service. >> Oct 12 13:07:18 grafana systemd[469550]: snmp-exporter.service: Failed to >> execute command: Exec format error >> Oct 12 13:07:18 grafana systemd[469550]: snmp-exporter.service: Failed at >> step EXEC spawning /usr/local/bin/snmp_exporter: Exec format error >> Oct 12 13:07:18 grafana systemd[1]: snmp-exporter.service: Main process >> exited, code=exited, status=203/EXEC >> Oct 12 13:07:18 grafana systemd[1]: snmp-exporter.service: Failed with >> result 'exit-code'. >> > -- 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-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/e98dc679-9886-497b-8a2c-cb1ba088f305n%40googlegroups.com.
[prometheus-users] Re: snmp_exporter service fails
"Exec format error" = the binary is invalid = there was a problem with how you built the binary. I expect you'll get the same error running the binary directly at the command line: try /usr/local/bin/snmp_exporter and see if that gives a better error message. Also see if "ldd /usr/local/bin/snmp_exporter" gives you any clues. This is the sort of error you'd get if you built the binary to run on Linux but you're trying to run it on a Mac, for example. On Wednesday, 13 October 2021 at 06:47:36 UTC+1 umus...@gmail.com wrote: > Hi, > > I have recently installed snmp_exporter generator, which is generating the > snmp_exporter file. > But this service shows failed. I have tried to change the systemd file and > give various paths. Also moved the snmp.yml file to different location but > still service is failed Following is the output. Can any one help? > > grafana:~# systemctl status snmp-exporter.service > ● snmp-exporter.service - Prometheus SNMP Exporter Service > Loaded: loaded (/etc/systemd/system/snmp-exporter.service; enabled; vendor > preset: enabled) > Active: failed (Result: exit-code) since Tue 2021-10-12 13:07:18 +04; 8s > ago > Process: 469550 ExecStart=/usr/local/bin/snmp_exporter > --config.file=/usr/local/bin/snmp.yml (code=exited, status=203/EXEC) > Main PID: 469550 (code=exited, status=203/EXEC) > > Oct 12 13:07:18 grafana systemd[1]: Started Prometheus SNMP Exporter > Service. > Oct 12 13:07:18 grafana systemd[469550]: snmp-exporter.service: Failed to > execute command: Exec format error > Oct 12 13:07:18 grafana systemd[469550]: snmp-exporter.service: Failed at > step EXEC spawning /usr/local/bin/snmp_exporter: Exec format error > Oct 12 13:07:18 grafana systemd[1]: snmp-exporter.service: Main process > exited, code=exited, status=203/EXEC > Oct 12 13:07:18 grafana systemd[1]: snmp-exporter.service: Failed with > result 'exit-code'. > -- 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-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/31013be4-b117-47de-a55d-7ef0a6598ac1n%40googlegroups.com.