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

Show Director Labels in Monitoring Module Custom Vars section #2239

Open
adsoto20 opened this issue Dec 2, 2020 · 7 comments · May be fixed by #2445
Open

Show Director Labels in Monitoring Module Custom Vars section #2239

adsoto20 opened this issue Dec 2, 2020 · 7 comments · May be fixed by #2445
Assignees

Comments

@adsoto20
Copy link

adsoto20 commented Dec 2, 2020

Expected Behavior

Custom vars added to a host via Icinga Director employ the key defined in Director but not the label which is what Director displays in all its forms. For consistency and because labels tend to be more human-friendly I'd like to have Director override this behaviour.
It will be enough to have it as an optional setting.

Current Behavior

If we create a data list in Director such as.
Example Data List "Location":

  • Key / Label

  • bcn / Barcelona

  • lon / London

  • par/ Paris

We can now assign a "Location" value to a host selecting from a dropdown (Barcelona, London, Paris) and that label will be what all that you see in Director templates/host forms/etc....
However in the monitoring module when you click on the host you will see that the custom var "location" has the value "bcn/lon/par" which is not ideal particulary because there is no easy way to rename existing keys without deleting/readding.

Possible Solution

In Icinga Insights chat there was a suggestion that there is a hook on the monitoring module that will allow Director to override the usage of keys for labels.

Steps to Reproduce (for bugs)

Your Environment

  • Director version (System - About): 1.7
  • Icinga Web 2 version and modules (System - About): 2.8.1
  • Icinga 2 version (icinga2 --version):2.12
  • Operating System and version: Centos 8
  • Webserver, PHP versions: Apache 2.4 + PHP 7.2
@adsoto20
Copy link
Author

adsoto20 commented Dec 3, 2020

For reference
Display the Director Caption of a Custom Variable
Icinga/icingaweb2#3479

@dgoetz
Copy link
Contributor

dgoetz commented Dec 4, 2020

Just to add a wish from my side because I like the idea very much, but I have one small concern. For debugging I sometimes need the real values and because of this I hated the behaviour of rewriting Icinga Web 2 had in the past. So I would suggest an additional hover effect which shows something like "Label [Key]" or to stick with the given example "Paris [par]" and "Barcelona [bcn]".

@dgoetz
Copy link
Contributor

dgoetz commented Sep 29, 2021

Now with data field categories it would be great to have not only get the fields but also the categories in the monitoring module. Bonus points for the categories then being collapseable and having them hideable for non-administrative users.

@nilmerg
Copy link
Member

nilmerg commented Dec 1, 2021

Bonus points for the categories then being collapseable

The entire custom variable section is collapsible. I see no point in allowing more fine-grained control over this.

and having them hideable for non-administrative users.

That's what blacklists and protections are for. There's the visibility setting for string datafields, which will be respected, but no additional restriction layer.

@nilmerg
Copy link
Member

nilmerg commented Dec 1, 2021

So I would suggest an additional hover effect

Icinga DB Web will show the raw custom variables in the Source tab.

@nilmerg
Copy link
Member

nilmerg commented Dec 1, 2021

ref/NC/734495

@nilmerg
Copy link
Member

nilmerg commented Dec 2, 2021

Bonus points for the categories then being collapseable

The entire custom variable section is collapsible. I see no point in allowing more fine-grained control over this.

Well, never mind. They will be collapsible.

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

Successfully merging a pull request may close this issue.

3 participants