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 #13235] director service CLI update template vs apply broken #609

Open
icinga-migration opened this issue Nov 17, 2016 · 0 comments
Labels

Comments

@icinga-migration
Copy link

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

Created by plarivee on 2016-11-17 19:21:11 +00:00

Assignee: (none)
Status: New
Target Version: (none)
Last Update: 2016-11-17 19:21:11 +00:00 (in Redmine)


might be a documentation issue and not a bug but seems like you cannot update a service template or apply rules using the CLI without overwriting the first one created

root@web:~# icingacli director service create template_check --display_name 'the template'  --object_type template --check_command dummy
Service 'template_check' has been created

root@web:~# icingacli director service create template_check --display_name 'the template: $host.address4$'  --object_type apply --assign_filter 'host.address4!=%22%22'
Service 'template_check' has been created

*************************** 1. row ***************************
  object_name: template_check
  object_type: template
 display_name: the template
assign_filter: NULL
    apply_for: NULL
*************************** 2. row ***************************
  object_name: template_check
  object_type: apply
 display_name: the template: $host.address4$
assign_filter: host.address4!=%22%22
    apply_for: NULL

Now, if want to update the apply_for service part, it will override the template

root@web:~# icingacli director service set template_check --display_name 'the updated template: $host.address4$'  --object_type apply --assign_filter 'host.address4!=%22%22'
Service 'template_check' has been modified

*************************** 1. row ***************************
  object_name: template_check
  object_type: apply
 display_name: the updated template: $host.address4$
assign_filter: host.address4!=%22%22
    apply_for: NULL
*************************** 2. row ***************************
  object_name: template_check
  object_type: apply
 display_name: the template: $host.address4$
assign_filter: host.address4!=%22%22
    apply_for: NULL

So template was override with the apply object.

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