[omd-devel] init.d/icinga Signal 5 exit - send no feedback to user
contant.olivier at gmail.com
Fri Dec 6 19:04:10 CET 2013
I found it was confusing to troubleshoot an issue about why icinga.cfg
wasn’t parsed in tmp/ when I tried to start the service using omd start
- The script return nothing and just finished and return to shell.
- After doing a status : omd status mysite icinga, it returned only
- Going in init.d and running icinga checkconfig, the script return
nothing and return to shell, start and stop the same and status continue to
I had to read the source code of init.d/icinga and load all the includes
file in my editor to trace and figure out what went wrong.
- dig in the init.d script to figure out that the script only exit 5
if the omd is not configured to use icinga on the value of variable
$CONFIG_CORE defined in etc/omd/site.conf
It shouldn’t be to the user to dig in the init.d script to figure it out.
An explicit message should be thrown to explain what went wrong and how to
My suggestion is to add a trap to the script to catch exit 5 and throw an
explicit message to the user before exiting properly.
Piece of code involved:
37 : cd /omd/sites/mtl_omd01
38 : . .profile
39 : . lib/omd/init_profile
40 : . etc/omd/site.conf
41: [ "$CONFIG_CORE" = "icinga" ] || exit 5
Variable $CONFIG_CORE is declared in etc/omd/site.conf
Since there is only one reference for a Signal 5 exit in the script,
changing the if statement would be the easiest way. If there is other
condition that use signal 5 exit, it would be better to use a trap signal
If [ "$CONFIG_CORE" = "icinga" ]; then
echo “Value of variable $CONFIG_CORE in $OMD_ROOT/etc/omd/site.conf is set
echo “To use icinga engine instead, change the value to:
Thank you for your consideration,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the omd-devel