How to label multiple users to a host

New to CMK, discovering 2.0.0p16 (CRE), trying to find out how to do things.

To keep track which client machine(s) has which local users, I thought I add users as multiple host labels in the form user:username1, user:username2.
Manually at first and perhaps later add them dynamically with a custom inventory plugin using something like:
Get-WmiObject -Class Win32_UserAccount -Filter "Disabled=False" | Select Name

But I am already failing in the manual adding part of host labels, since there can only be 1 unique key per host. So adding user:username1 is not a problem, but adding user:username2 to the same host is not possible.

So how can I ‘label’ multiple users to a host instead?

Hopefully it is possible in a way so I can filter for it in a view.

Make your labels in the form user/username1:yes and user/username2:yes.

2 Likes

I thought about making the value as key, like username1:true, but then I wouldn’t have an organised collection of users to filter on. This solves that too.

Thanks!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.