Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing package snmp (prerequistite for the built-in check_snmp) #125

Open
dominik-r-s opened this issue Apr 25, 2024 · 2 comments
Open

Comments

@dominik-r-s
Copy link

The built-in command check_snmp does not work because the binary snmpget is not installed.

icinga@icinga-icinga2-0:/$ /usr/lib/nagios/plugins/check_snmp -v -C xxx -H yyy ... -v
/usr/bin/snmpget -Le -t 60 -r 5 -m ...
External command error with no output (return code: 3)
icinga@icinga-icinga2-0:/$ /usr/bin/snmpget
bash: /usr/bin/snmpget: No such file or directory
icinga@icinga-icinga2-0:/$
@jwillikers
Copy link

@dominik-r-s I've just switched over my Icinga SNMP image to build Icinga using Nix. Nix manages the dependency on snmpget for check_snmp correctly.

@oxzi
Copy link
Member

oxzi commented Oct 21, 2024

Thanks for creating this issue and please excuse the silence afterwards.

Using the 2.14 image I was unable to reproduce this, as snmpget - being part of the snmp package - seems to be available since faecd36.

$ docker run --pull=always -t -it --rm icinga/icinga2:2.14 bash
2.14: Pulling from icinga/icinga2
Digest: sha256:e77fd729998967da739b7d74d621cb7683fff6fbbe1e4be89b64686dc67125c9
Status: Image is up to date for icinga/icinga2:2.14
[snip]

icinga@0297dd5dd7c5:/$ which snmpget
/usr/bin/snmpget
icinga@0297dd5dd7c5:/$ /usr/lib/nagios/plugins/check_snmp -H 172.17.0.2 -o .1.3.6.1.2.1.1.1.0
SNMP OK - "Linux d2c6e71cc3f1 6.11.3 #1-NixOS SMP PREEMPT_DYNAMIC Thu Oct 10 10:04:18 UTC 2024 x86_64" |

@dominik-r-s: Which version of the Docker image are you using? Could you please verify if this error is still present after updating the local image?

@jwillikers: On first glance, I really like your solution and I hope I can take a closer look in the future :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants