[icinga-users] Replacement for command expander with icinga2 core and ClassicUI?

Michael Friedrich michael.friedrich at netways.de
Mon Aug 11 09:51:07 CEST 2014


Am 09.08.2014 00:44, schrieb Daniel Parthey:
> Hi,
>
> since the command expander of ClassicUI does not work
> with icinga2 core anymore, I'm looking for some replacement
> in order to get an idea which commandline the icinga2 core
> will execute for a service.

The reason why it won't work is simple - the cgis use the same code as
the 1.x core for macro resolution (which is one of those reasons they
are bound together as one). If you would want to support Icinga 2 within
Classic UI Command Expander, you would need to rewrite the macro
resolval functionality entirely. And I doubt anyone wants to a) do it b)
maintain it.

I'm all for the upcoming Icinga Web 2, where this has been partially
solved already (still missing the new Icinga 2 macros).
Collected that into https://dev.icinga.org/issues/6879

>
> To make commands and arguments visible, I had the idea to extract
> the variables "command" and "arguments" from the command object,
> convert them to strings with the string() function, concatenate
> them together, and write them to a customvariable vars.expanded_command,
> but I'm getting nothing but syntax errors and backtraces.
>
> Can my idea be implemented with icinga2 configuration syntax?

No, as you cannot control the dependencies and relations between object
at the time of parsing. That's the reason why the configuration parser
is a complex part of Icinga. Stop here please.

Kind regards,
Michael

-- 
Michael Friedrich, DI (FH)
Application Developer

NETWAYS GmbH | Deutschherrnstr. 15-19 | D-90429 Nuernberg
Tel: +49 911 92885-0 | Fax: +49 911 92885-77
GF: Julian Hein, Bernd Erk | AG Nuernberg HRB18461
http://www.netways.de | Michael.Friedrich at netways.de

** Open Source Backup Conference 2014 - September - osbconf.org **
** Puppet Camp Duesseldorf 2014 - Oktober - netways.de/puppetcamp **
** OSMC 2014 - November - netways.de/osmc **
** OpenNebula Conf 2014 - Dezember - opennebulaconf.com **


More information about the icinga-users mailing list