lausser / check_nwc_health

nwc = network component. This plugin checks lots of aspects of routers, switches, wlan controllers, firewalls,.....
http://labs.consol.de/nagios/check_nwc_health
GNU General Public License v2.0
151 stars 87 forks source link

running plugin in docker container - no result #179

Open GrexAut opened 6 years ago

GrexAut commented 6 years ago

Hi,

I'm running this plugin in jordan/icinga2 docker container, I compiled it and want to exectute it. Without parameters I get the usage informations, but if I run the command with all required parameters, I get no answer from the plugin.


root@mydockercontainer:/usr/lib/nagios/plugins# /usr/lib/nagios/plugins/check_nwc_health
Usage: check_nwc_health [ -v|--verbose ] [ -t <timeout> ] --mode <what-to-do> --hostname <network-component> --community <snmp-community>  ...]

root@mydockercontainer:/usr/lib/nagios/plugins# /usr/lib/nagios/plugins/check_nwc_health --hostname 10.0.0.1 --community public --mode uptime
root@mydockercontainer:/usr/lib/nagios/plugins#

root@mydockercontainer:/usr/lib/nagios/plugins# $?
bash: 2: command not found

Maybe anyone have an idea, thanks!

GrexAut commented 6 years ago

Found the solution, happens if /etc/protocols is not existing! link or copy from dockerhost to dockertainer:

docker run .... -v /etc/protocols:/etc/protocols