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

[FEED] How to set custom attributes / host labels? #522

Closed
RogerSik opened this issue Jan 2, 2024 · 4 comments
Closed

[FEED] How to set custom attributes / host labels? #522

RogerSik opened this issue Jan 2, 2024 · 4 comments
Assignees
Labels
feedback General feedback

Comments

@RogerSik
Copy link

RogerSik commented Jan 2, 2024

Example:

02_13-06-30

Setting in backend is not possible because Ansible will overwrite it and set it empty. Not sure how to set it in Ansible as variable.

@RogerSik RogerSik added the feedback General feedback label Jan 2, 2024
@robin-checkmk
Copy link
Member

You do not want to set labels explicitly on host or folder level. If you do so, that indicates, that you actually need a host tag. If you actually require a label, use a rule.

@RogerSik
Copy link
Author

RogerSik commented Jan 2, 2024

I think im not really understanding. I'm inherited this infrastracture and want to move it to Ansible with less changes as possible to not break something.

You do not want to set labels explicitly on host or folder level. If you do so, that indicates, that you actually need a host tag. If you actually require a label, use a rule.

As i understand from our environment in folders and hosts are set the labels / custom_attributes and we have already service rules which are depending of the host_labels if there is an apply. So i don't see why it is wrong / not good use case.

Really appreciating for your help and fast feedback! :)

@robin-checkmk
Copy link
Member

robin-checkmk commented Jan 2, 2024

Well, it would take half a day of consulting to lay this all out, so let's get back to the issue at hand.
You have an environment that is how it is, and you want to manage it with Ansible. So far, so good.
You can of course set custom labels on host-level, you just have to put all the information in Ansible and figure out the correct syntax for the host module. The more long-term approach might be to actually rethink some aspects of your approach and implement that in Ansible.

All that being said: Is there a specific issue you are facing? An error or something, that we can help with here?
Otherwise, I would direct you to the Checkmk forum, for more general advice.

@RogerSik
Copy link
Author

RogerSik commented Jan 2, 2024

Yeah you are right i will going the long-term approach and rethink how this is used.

@RogerSik RogerSik closed this as completed Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feedback General feedback
Projects
None yet
Development

No branches or pull requests

2 participants