If i update tags on client.conf, is expected behavior for it to show up on the Console?

Asked by Abhi Sangeetha

I edited the client.conf file on a client to add a new tag, but it does not show up on the console.

More interestingly, when I look at monitor.log, I do not see "ComputerTags" plugin be loaded, But just wanted to know what the expected behavior was.

Thank you!

Question information

Language:
English Edit question
Status:
Answered
For:
Landscape Client Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Andreas Hasenack (ahasenack) said :
#1

No, the tags from the client config file are only taken into account at registration time.

Revision history for this message
Abhi Sangeetha (abhisangeetha-da) said :
#2

Thank you Andreas. Is there any way to add tags based off a script result? Managing would be so much easier if we could add dynamic tags.

Revision history for this message
Andreas Hasenack (ahasenack) said :
#3

You mean have the client update its own tags on its record on the server? Only via the API I think, but that would mean handing out API credentials. My knowledge of landscape is a few years old, but that's the only thing that comes to mind now.

Revision history for this message
Abhi Sangeetha (abhisangeetha-da) said :
#4

 Yes, having client update its own tags is the goal, if I already had privileged execution, figured changing local file and reload would be the easiest way.... if it worked.

I did think about using the API, but as you mentioned, main point of concern is the creds and I do not see a way to scope creds to just update tags etc., :(

I will leave this open for a day or two to see if anyone else has an idea. Really appreciate your response!

Revision history for this message
Mitch Burton (mitchburton) said :
#5

Hi Abhi,

While there is no way to use a script to update the client's tags, depending on your use-case you might be able to use annotations. Essentially any files created in /var/lib/landscape/client/annotations.d/ will be reported to Landscape as annotations. Here's an example of using annotations to add custom monitoring via script execution and use it in searches: https://ubuntu.com/tutorials/monitor-and-manage-livepatch-configurations-at-scale-with-landscape#3-monitor-livepatch-via-landscape

Revision history for this message
Andreas Hasenack (ahasenack) said :
#6

I suppose you could, via the API, from a central point, schedule the script to run, query its output, and then update the tag accordingly. That is if the script text output is available via the API, I don't remember if it is.

Revision history for this message
Abhi Sangeetha (abhisangeetha-da) said :
#7

@Andreas : Not according to the doc (https://ubuntu.com/landscape/docs/api-scripts) . We can view the script code and edit it, but not the output, which makes sense.

@Mitch: That is interesting. The use case is to tag/annotate machines that are not running some processes. To make it easy to audit. This is a great starting point. Thank you!

Revision history for this message
Kevin Nasto (silverdrake11) said :
#8

Someone asked for this early last year I think. It was implemented and released into the new Landscape client. Basically if you add tags to the client.conf they will show up in Landscape server, however only adding tags is supported. Removing tags is not (due to possibility of conflicts). Make sure to upgrade landscape client to use this feature. So to summarize, it's not just registration time, that file is being monitored for tags. No need to use the api to do this unless deletion is required

Can you help with this problem?

Provide an answer of your own, or ask Abhi Sangeetha for more information if necessary.

To post a message you must log in.