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

Allow checks to specify entity_label attributes. #23

Merged
merged 2 commits into from Mar 21, 2013

Conversation

tildedave
Copy link
Contributor

This allows checks to unambiguously refer to an
entity (similar to how alarms unambiguously refer
to their associated checks).

This allows checks to unambiguously refer to an
entity (similar to how alarms unambiguously refer
to their associated checks).
@tildedave
Copy link
Contributor Author

I ran into a few issues using the CM cookbook to create new entities. Trying to determine how best to contribute fixes back, please let me know what's appropriate/not appropriate.

It appears that on using a check the cookbook assumes that node['cloud_monitoring']['entity_id'] is set.

However when an entity is newly created this value is not set and the check assignment immediately fails. By allowing specifying entity_label in a check you can unambiguously look up the entity.

(I did investigate ways to possibly set node['cloud_monitoring']['entity_id'] after entity creation but due to how LWRPs work it looked really bad.)

There's another issue where entities step on each other -- have one entity, entity_id gets set, define a second entity, it renames the current entity to the next one. Will have a PR for that once I figure out a reasonable fix.

@philk
Copy link
Contributor

philk commented Mar 21, 2013

This seems safe and beneficial. +1

@philk
Copy link
Contributor

philk commented Mar 21, 2013

Bump the version in metadata.rb then good to merge.

tildedave pushed a commit that referenced this pull request Mar 21, 2013
Allow checks to specify entity_label attributes.
@tildedave tildedave merged commit 96b2707 into master Mar 21, 2013
@philk philk deleted the add_entity_label_for_check_resource branch March 21, 2013 20:14
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

Successfully merging this pull request may close these issues.

None yet

2 participants