naparuba/shinken — Issue #48: Arbiter command line option parsing
Author: Frescha
Created: 2011-10-30 16:35:29+00:00
State: open
Labels: Arbiter

Hi,

I've installed shinken_0.4-1_all.deb on a debian squeeze 6.0 and it seems that arbiter has a non excepted behaviour:

When I activate the debug mode it asks me for a filename:

root@shinkensrv:/var/lib/shinken# /usr/bin/python /usr/bin/shinken-arbiter -c /etc/nagios3/nagios.cfg -c /etc/shinken/shinken-specific.cfg -r --debug
Using Pyro 3.9.1
option --debug requires argument
Shinken Arbiter Daemon, version 0.3, from :
Gabes Jean, naparuba@gmail.com
Gerhard Lausser, Gerhard.Lausser@consol.de
Usage: /usr/bin/shinken-arbiter [options] -c configfile [-c additionnal_config_file]
Options:
-c, --config
Config file (your nagios.cfg). Multiple -c can be used, it will be like if all files was just one
-d, --daemon
Run in daemon mode
-r, --replace
Replace previous running scheduler
-h, --help
Print detailed help screen
--debug
Debug File. Default : no use (why debug a bug free program? :) )

So I cd to a shinken writtable directory:

root@shinkensrv:/var/lib/shinken# ls -ld /var/lib/shinken
drwxr-xr-x 2 shinken shinken 4096 Feb 18 13:01 /var/lib/shinken

Then I launch the command but the output is not done in file but on stdout.

root@shinkensrv:/var/lib/shinken# /usr/bin/python /usr/bin/shinken-arbiter -c /etc/nagios3/nagios.cfg -c /etc/shinken/shinken-specific.cfg -r --debug file
Using Pyro 3.9.1
Shinken 0.4
Copyright (c) 2009-2010 :
Gabes Jean (naparuba@gmail.com)
Gerhard Lausser, Gerhard.Lausser@consol.de
License: AGPL
Shinken 0.4
Copyright (c) 2009-2010 :
Gabes Jean (naparuba@gmail.com)
Gerhard Lausser, Gerhard.Lausser@consol.de
License: AGPL
Loading configuration
Opening configuration file /etc/nagios3/nagios.cfg
Processing object config file '/etc/nagios3/hostTemplates.cfg'
Processing object config file '/etc/nagios3/hosts.cfg'
Processing object config file '/etc/nagios3/serviceTemplates.cfg'
Processing object config file '/etc/nagios3/services.cfg'
Processing object config file '/etc/nagios3/misccommands.cfg'
Processing object config file '/etc/nagios3/checkcommands.cfg'
Processing object config file '/etc/nagios3/contactgroups.cfg'
Processing object config file '/etc/nagios3/contacts.cfg'
Processing object config file '/etc/nagios3/hostgroups.cfg'
...

Maybe there is a good reason but from my point of view :
-- debug should write on stdout
-- debug should write in filename.

Thanks in advance.