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 #13351] Service applys "Apply For" does not list any arrays. #632

Closed
icinga-migration opened this issue Nov 29, 2016 · 3 comments
Milestone

Comments

@icinga-migration
Copy link

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

Created by ninjasloth22 on 2016-11-29 04:28:23 +00:00

Assignee: (none)
Status: Resolved (closed on 2016-12-06 09:02:16 +00:00)
Target Version: 1.3.0
Last Update: 2016-12-06 09:02:16 +00:00 (in Redmine)


Wanting to apply a service check in the following manner:

apply Service "check_disks" for (partition => config in hosts.vars.partitions) {
import "generic-service"
vars += config
if (!vars.warn) { vars.warn = "85%" }
if (!vars.crit) { vars.crit = "95%" }

display_name = "Diskspace " + vars.mountpoint
check_command = "nrpe"
vars.nrpe_command = "check_disk"
vars.nrpe_arguments = [ vars.warn, vars.crit, vars.mountpoint ]

assign where host.vars.os == "Linux"
}

In one of the recent updates the "Apply For" option was added in Director service applys. However despite having created arrays, they do know show up in the drop down list on the service apply page.
Also tested creating a new array since updating. Behavior is still the same.

@icinga-migration
Copy link
Author

Updated by tgelf on 2016-11-29 07:28:46 +00:00

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

As soon as one of your host has such an array it should show up in that list. In case it doesn't please show me some more details, host-definition and field config would be great. It should IMO basically show up as soon as you create a related field, however that's something that will get tricky as soon as restrictions based on template (and therefore field) usage will be in place. So I'd prefer to keep the current limitation unless ongoing work related to restrictions got it's final shape.

Cheers,
Thomas

@icinga-migration
Copy link
Author

Updated by ninjasloth22 on 2016-11-29 19:08:37 +00:00

Thanks Thomas,

I had assigned the field to a host but not a value. It took assigning a value to the variable array for it to appear.

@icinga-migration
Copy link
Author

Updated by tgelf on 2016-12-06 09:02:16 +00:00

  • Tracker changed from Bug to Support
  • Status changed from Feedback to Resolved
  • Assigned to deleted ninjasloth22
  • Target Version set to 1.3.0

It's not a bug, it's a feature :D You'll have to live with this unless upcoming restrictions on an object level are going to be a thing. At that point I'll better understand whether adding available field names (respecting eventual restrictions!) regardless of whether they are used or not would be a problem.

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

No branches or pull requests

1 participant