Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request / Readability Improvement #2557

Closed
Wintermute2k6 opened this issue Jul 4, 2022 · 1 comment
Closed

Feature Request / Readability Improvement #2557

Wintermute2k6 opened this issue Jul 4, 2022 · 1 comment
Assignees
Milestone

Comments

@Wintermute2k6
Copy link

Expected Behavior

Kickstart ITL Commands should at least show the Macro/Icinga2 DSL Code and not simply replace it with

 /* Unable to fetch function body through API */

So you can at least tell what Macro or Icinga2 DSL usage is used via the Web2/Director GUI.
The resolving/fetch function Disclaimer can still be presented.

Current Behavior

Functions and Macros/Icinga DSL which can't be resolved during Kickstart will be represented via the Director GUI with

 /* Unable to fetch function body through API */

As an Example

        "-I" = {
            description = "IP address or name (use numeric address if possible to bypass DNS lookup)"
            set_if = {{
                /* Unable to fetch function body through API */
            }}
            value = "$http_address$"
        }

Possible Solution

Just show the function/Macro/Icinga2 DSL Code so at least you can tell from the GUI what Macro or function is used with this imported Command, this makes Debugging easier ..

There can still be a Disclaimer that it isn't resolve/usable via the Director but this helps improving Debugging and readablility/knowledge of the Kickstartet files.

Steps to Reproduce (for bugs)

Kickstart or import ITL/Commands via Director Kickstart which use as an example Macro/Icinga2 DSL functions or even the example above set_if.

Your Environment

  • Director version (System - About): latest Director Version 1.9.1
  • Icinga Web 2 version and modules (System - About): 2.11.0
  • Icinga 2 version (icinga2 --version): 2.13.4-1
  • Operating System and version: Ubuntu focal fossa
  • Webserver, PHP versions: Apache 2.4, latest php-fpm
@Thomas-Gelf
Copy link
Contributor

While Director is able to show your configured DSL (you're allowed to do so in your command arguments defined in the Director), the problem here lies elsewhere: the Icinga 2 API doesn't export DSL bodies. For a better understanding we might rephrase...

Unable to fetch function body through API

...to:

Icinga 2 does not export DSL function bodies via API

Other suggestions, anyone?

@Thomas-Gelf Thomas-Gelf added this to the 1.10.0 milestone Jul 18, 2022
@Thomas-Gelf Thomas-Gelf self-assigned this Jul 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants