Package: shinken-core Version: 0.6.5-2 Severity: normal Hi,
while running shinken-discovery -o /etc/shinken/objects/discovery -r nmap after a fresh install of shinken packages, the discovery fails with the following message: Debug : Error in launching command: /usr/lib64/nagios/plugins/nmap_discovery_runner.py -t localhost 172.16.40.0/24 [Errno 2] No such file or directory False I rechecked and the nmap_discovery_runner.py is installed in /usr/lib/shinken/plugins and the debian/config-files/etc/shinken/commands.cfg refers to $USER1$ defined in debian/config-gile/etc/shinken/resource.cfg which points to /usr/lib64/nagios/plugins/. The problem can be solved by adding a $USERSHINKEN1$ variable to resource.cfg and modifying commands.cfg so that shinken specific plugins use this variable. (I'm not sure this is the right way to fix that...Maybe shinken should install files in the another location?) Attached is a patch that should fix this and make the autodiscovery work after a fresh install of the package. Please note that I also modified calls to the check.sh and check_dummy.sh as they are installed by shinken. I did not test these particular ones, feel free to ignore this part of the patch if you feel like it's stupid. Regards, Raphaël -- System Information: Debian Release: wheezy/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 2.6.32-5-amd64 Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) Shell: /bin/sh linked to /bin/dash Versions of packages shinken-core depends on: ii adduser 3.113 ii grep 2.9-2 ii lsb-base 3.2-28 ii pyro 1:3.14-1 ii python 2.7.2-8 ii python-pysqlite2 2.6.3-2 ii python-simplejson 2.2.0-1 ii python2.6 2.6.7-3 ii python2.7 2.7.2-5 shinken-core recommends no packages. shinken-core suggests no packages. -- Configuration Files: /etc/shinken/resource.cfg changed [not included] -- no debconf information
diff -ru debian.orig/config-files/etc/shinken/commands.cfg debian/config-files/etc/shinken/commands.cfg --- debian.orig/config-files/etc/shinken/commands.cfg 2011-09-16 15:42:50.000000000 +0000 +++ debian/config-files/etc/shinken/commands.cfg 2011-10-18 21:47:52.000000000 +0000 @@ -167,7 +167,7 @@ define command{ command_name check_local_disk - command_line $USER1$/check.sh $HOSTADDRESS$ -c $ARG1$ SERVICE $USER1$ + command_line $USERSHINKEN1$/check.sh $HOSTADDRESS$ -c $ARG1$ SERVICE $USER1$ #poller_tag DMZ #module_type nrpe_poller } @@ -185,33 +185,33 @@ # Dummy check for mysql, always CRITICAL define command{ command_name check_mysql - command_line $USER1$/check_dummy.sh 2 + command_line $USERSHINKEN1$/check_dummy.sh 2 } define command{ command_name check_dummy - command_line $USER1$/check_dummy.sh $ARG1$ + command_line $USERSHINKEN1$/check_dummy.sh $ARG1$ #poller_tag DMZ } define command{ command_name super_event_kill_everyone - command_line $USER1$/check.sh $HOSTADDRESS$ -c $ARG1$ SERVICE $_HOSTDELLSUCK$ + command_line $USERSHINKEN1$/check.sh $HOSTADDRESS$ -c $ARG1$ SERVICE $_HOSTDELLSUCK$ } # We say Http checks are always OK define command{ command_name check_http2 - command_line $USER1$/check_dummy.sh 1 + command_line $USERSHINKEN1$/check_dummy.sh 1 #module_type nrpe_poller } define command{ command_name check-host-alive - command_line $USER1$/check.sh $HOSTADDRESS$ -c $ARG1$ HOST $_HOSTDELLSUCK$ $SERVICEDESC:srv-1:Service-2$ $SERVICEDESC::Service-30$ $HOSTADDRESS:$ $HOSTGROUPALIAS:linux-servers$ + command_line $USERSHINKEN1$/check.sh $HOSTADDRESS$ -c $ARG1$ HOST $_HOSTDELLSUCK$ $SERVICEDESC:srv-1:Service-2$ $SERVICEDESC::Service-30$ $HOSTADDRESS:$ $HOSTGROUPALIAS:linux-servers$ #module_type dummy_poller } @@ -238,11 +238,11 @@ #### And Discovery commands define command{ command_name nmap_discovery - command_line $USER1$/nmap_discovery_runner.py -t $NMAPTARGETS$ + command_line $USERSHINKEN1$/nmap_discovery_runner.py -t $NMAPTARGETS$ } define command{ command_name vmware_esx_discovery - command_line $USER1$/vmware_discovery_runner.py -V $VCENTER$ -u $VCENTERLOGIN$ -p $VCENTERPASSWORD$ -r "lower|nofqdn" + command_line $USERSHINKEN1$/vmware_discovery_runner.py -V $VCENTER$ -u $VCENTERLOGIN$ -p $VCENTERPASSWORD$ -r "lower|nofqdn" } diff -ru debian.orig/config-files/etc/shinken/resource.cfg debian/config-files/etc/shinken/resource.cfg --- debian.orig/config-files/etc/shinken/resource.cfg 2011-09-16 15:42:50.000000000 +0000 +++ debian/config-files/etc/shinken/resource.cfg 2011-10-18 21:45:55.000000000 +0000 @@ -1,6 +1,8 @@ $USER1$=/usr/lib64/nagios/plugins $USER2$=public +$USERSHINKEN1$=/usr/lib/shinken/plugins + # Where your plugins are located $PLUGINSDIR$=/usr/lib64/nagios/plugins