Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

[dev.icinga.com #535] Order for broker_module in icinga.cfg for livestatus and idoutils #262

Closed
icinga-migration opened this issue Jun 24, 2010 · 5 comments

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/535

Created by croft on 2010-06-24 14:29:56 +00:00

Assignee: mfriedrich
Status: Resolved (closed on 2010-06-25 11:25:04 +00:00)
Target Version: 1.0.2
Last Update: 2010-06-28 22:11:06 +00:00 (in Redmine)


After the update from Icinga/IdoUtils-1.0.1 to Icinga/IdoUtils-1.0.2 I have to change the order for the broker modules in icinga.cfg. My config before:

broker_module=/usr/local/icinga/bin/idomod.o config_file=/usr/local/icinga/etc/idomod.cfg
broker_module=/usr/local/icinga/bin/livestatus.o /usr/local/icinga/var/rw/live

Results now in icinga.log :

[1277386436] livestatus: Version 1.1.0 initializing. Socket path: '/usr/local/icinga/var/rw/live'
[1277386436] livestatus: Created UNIX control socket at /usr/local/icinga/var/rw/live
[1277386436] livestatus: Opened UNIX socket /usr/local/icinga/var/rw/live
[1277386436] livestatus: successfully finished initialization
[1277386436] Event broker module '/usr/local/icinga/bin/livestatus.o' initialized successfully.
[1277386436] livestatus: Version 1.1.0 initializing. Socket path: 'config_file=/usr/local/icinga/etc/idomod.cfg'
[1277386436] livestatus: Created UNIX control socket at config_file=/usr/local/icinga/etc/idomod.cfg
[1277386436] livestatus: Unable to bind adress config_file=/usr/local/icinga/etc/idomod.cfg to UNIX socket: No such file or directory
[1277386436] Error: Function nebmodule_init() in module '/usr/local/icinga/bin/idomod.o' returned an error.  Module will be unloaded.
[1277386436] Event broker module '/usr/local/icinga/bin/idomod.o' deinitialized successfully.

If I change the order to:

broker_module=/usr/local/icinga/bin/livestatus.o /usr/local/icinga/var/rw/live
broker_module=/usr/local/icinga/bin/idomod.o config_file=/usr/local/icinga/etc/idomod.cfg

after restarting icinga:

[1277389278] Icinga 1.0.1 starting... (PID=24843)
[1277389278] Local time is Thu Jun 24 16:21:18 CEST 2010
[1277389278] LOG VERSION: 2.0
[1277389278] idomod: IDOMOD 1.0.1 (03-03-2010) Copyright (c) 2005-2008 Ethan Galstad (nagios@nagios.org), Copyright (c) 2009-2010 Icinga Development Team (http://www.icinga.org))
[1277389278] idomod: Successfully connected to data sink.  0 queued items to flush.
[1277389278] Event broker module '/usr/local/icinga/bin/idomod.o' initialized successfully.
[1277389278] idomod: IDOMOD 1.0.1 (03-03-2010) Copyright (c) 2005-2008 Ethan Galstad (nagios@nagios.org), Copyright (c) 2009-2010 Icinga Development Team (http://www.icinga.org))
[1277389278] idomod: Successfully connected to data sink.  0 queued items to flush.
[1277389278] Event broker module '/usr/local/icinga/bin/livestatus.o' initialized successfully.

Everything seems to work fine :-) Mhhh I don`t know if it's interesting for others too.

Changesets

2010-06-25 10:56:22 +00:00 by mfriedrich 0aa908d

revert buggy my_fcopy hacks for nebmods

-* core: base/nebmods.c: Replace local file-copy hack with my_fcopy() (Andreas Ericsson)
-* core: base/utils.c: Refactor my_fcopy() (Andreas Ericsson)

those copy stuff causes more than one neb module (one with
config_file and one just with a param, like idomod and
mk_livestatus) to fail.
also it depends on the order of the modules in icinga.cfg
which is really bad.

if ordered idomod|\n|mklivestatus => mklivestatus now has
the param of idomod, idomod has none and fails to load

if ordered mklivestatus|\n|idomod, idomod gets loaded
correctly, but mklivestatus fails not getting the socket
as param.

since 1.0.2 is coming soon, changes are reverted, tested ok.
it will need some further investigations to finally resolve
those issues on a dev branch.

kudos to Lara for reporting :)

fixes #535

2010-06-28 22:16:05 +00:00 by mfriedrich 53b0014

make state based escalation ranges optional by configure

currently, the object definitions used by mk_livestatus
are directly copied from nagios 3.2.0 which leads to the
problem that different exported symbols and variables are
expected.

the state based escalation ranges change that, and this
will lead into mk_livestatus throwing a segfault and
producing a core dump.

in order to give the mk_livestatus developer more time to
resolve this issue, the original patch for #306 has been
reworked into optional selection through configure.

this will be changed when mk_livestatus becomes ready
to fully support icinga core.

refs #306
refs #531
refs #535
@icinga-migration
Copy link
Author

Updated by mfriedrich on 2010-06-25 07:42:52 +00:00

this looks really suspicious

livestatus: Unable to bind adress config_file=/usr/local/icinga/etc/idomod.cfg to UNIX socket: No such file or directory

maybe handling of configlines, i'll have a look.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2010-06-25 10:57:08 +00:00

  • Assigned to set to mfriedrich
  • Priority changed from Normal to Immediate

it's basically this:

https://git.icinga.org/?p=icinga-core.git;a=blobdiff;f=base/nebmods.c;h=422f7e8947d08e85a2dd67660a005dc48b0a05d8;hp=ce64030f6e74b41e0a9656b736eb9505770bd9ac;hb=c715e2a109240fc55240b18a86a5c7449561ea83;hpb=436324b3120858ae582219e6139f9de90d342aa0

coming from this

https://git.icinga.org/?p=icinga-core.git;a=commit;h=d1a751b9f48187d7486fd80a438e16a6d21d9787

i've reverted the changes manually and it's to be working fine again. some more testing needed.

/me hands a hero sticker to lara :-)

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2010-06-25 11:25:04 +00:00

  • Status changed from New to Resolved
  • Done % changed from 0 to 100

Applied in changeset commit:"0aa908d1f577985a0e97f6c2eac07f8472548b77".

@icinga-migration
Copy link
Author

Updated by croft on 2010-06-25 13:08:22 +00:00

THX very much :-)

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2010-06-28 22:11:06 +00:00

just a few notes on that:

  • mk_livestatus is being compiled with header files copied from nagios 3.2.0 for being portable, but changing icinga's header files will result in oncompatibility to that (which sucks regarding development)

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

No branches or pull requests

1 participant