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

[dev.icinga.com #13044] Custom Properties (Data Fields) inherited by Host from Host Templates - values not visible, values don't append, values don't save #552

Closed
icinga-migration opened this issue Nov 4, 2016 · 5 comments
Labels
Milestone

Comments

@icinga-migration
Copy link

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

Created by DanH on 2016-11-04 01:57:03 +00:00

Assignee: tgelf
Status: Resolved (closed on 2016-12-13 10:55:08 +00:00)
Target Version: 1.3.0
Last Update: 2016-12-13 10:55:08 +00:00 (in Redmine)


Director 1.1:
When using Custom Properties (Data Fields) inherited by Host from Host Template, entered values (eg vars.diskbyssh = 'true') is not visible on Host page, but will display on Preview page.
Similarly, multiple field values won't append, and erase previously saved values.

Was hoping this may have been a 1.2 bugfix, but now...
Director 1.2:
Entering Custom Properties value and click 'Store' displays message 'Object has not been modified'. Preview page (with or without Show resolved) shows no Custom Properties at all.

Perhaps this may be unique to our install? But sounds similar to issue #12413?

Thanks for the great work

Attachments

@icinga-migration
Copy link
Author

Updated by tgelf on 2016-11-04 08:37:46 +00:00

  • Status changed from New to Feedback
  • Assigned to set to DanH

I'm unable to reproduce this. Could you please explain this with more detail, eventually adding related screenshots?

Thanks,
Thomas

@icinga-migration
Copy link
Author

Updated by DanH on 2016-11-06 23:37:41 +00:00

  • File added 6_Data_field_example.png
  • File added 1_host_properties.png
  • File added 2_host_properties_pre_store.png
  • File added 3_host_preview.png
  • File added 4_host_edit_custom.png
  • File added 5_host_preview_previousvars_erased.png
  • File added 7_service_apply_rule.png
  • File added 8_director_resource.png

Hi Thomas.

Here's an attempt to explain the steps we've followed. Please let me know if anything is unclear?

We have created some Data Fields for use as Custom Properties, in order to apply service check rules where 'vars.xyz = true'

  • see attachment '6_data_field_example.png'

Custom properties have been assigned to a host template ("host-server-linux-debian-template"), and inherited by host ("test123").

  • see attachment '1_host_properties.png'

Entering multiple Custom Properties values (must be done together) and 'Store'

  • see attachment '2_host_properties_pre-store.png'

Preview results for multiple Custom Properties shows OK, but values are missing in Host properties web form.

  • see attachment '3_host_preview.png' and '1_host_properties.png'

Try to add a third Custom Property value, and the previous two vars have been erased, with still nothing visible in the Host properties web form.

  • see attachment '4_host_edit_custom.png' and '5_host_previewvars_erased.png'

If we want to have additional Custom Property values, we need to check the 'Preview' tab for previously set values, re-enter the old ones along with the new one, and click 'Store'.

Please see attachment '7_service_apply_rule.png' to see an example of one of our service apply rules.

I have tried deleting Data fields, removing from templates, applying Director 1.2, adding Data fields and templates, and entering values for Custom Properties.
This results in the 'Object has not been modified' messages, and the Host preview tab displays no Custom Properties.

Our Director DB resource passes validation, please see attachment '8_director_resource.png'

Perhaps we are doing something wrong. Possibly a Zone problem? Please let me know if you require further information?

Thanks very much,
Dan

@icinga-migration
Copy link
Author

Updated by DanH on 2016-11-07 00:40:18 +00:00

I've just seen issue #13002.
All our Data Fields have the '-' character

@icinga-migration
Copy link
Author

Updated by DanH on 2016-11-07 02:34:09 +00:00

Renaming data field from 'apt-by-ssh' to 'apt_by_ssh' appears to have fixed the problem!
However, previously set vars for a host still exist, as below.. How do we delete these?

object Host "host123.somewhere.com.au" {
import "host-server-linux-debian-template"

display_name = "host123"
address = "123.456.789.111"
groups = [ "server-linux-all", "server-linux-debian-all" ]
vars.HostProdTestDev = "prod"
vars.apt_by_ssh = "true"
vars.aptbyssh = "true"
vars.disk_by_ssh = "true"
vars.diskbyssh = "rue"
vars.host_prod_test_dev = "prod"

@icinga-migration
Copy link
Author

Updated by tgelf on 2016-12-13 10:55:08 +00:00

  • Status changed from Feedback to Resolved
  • Assigned to changed from DanH to tgelf
  • Target Version set to 1.3.0

DanH wrote:

Renaming data field from 'apt-by-ssh' to 'apt_by_ssh' appears to have fixed the problem!
However, previously set vars for a host still exist, as below.. How do we delete these?

There should be an open issue for such mass-operations, right now it is tricky in the GUI. You could eventually help yourself with temporarily adding a related field and by using the multi-select/edit feature, but you're probably a lot faster with just running this in your DB:

DELETE FROM icinga_host_var WHERE varname = 'my-old-var-name';

Will not show up in your activity log, but hey, who cares about auditors ;-) Closing this as the issue should have been solved in the meantime. Special characters are now supported in variable names. There is still a related issue (ticket exists) involving special variable names and multi-edit, the rest should be fine.

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

No branches or pull requests

1 participant