05 Jul 2024 01:21 AM - last edited on 12 Jul 2024 01:16 PM by MaciejNeumann
We have a few thousand servers, both Windows and Linux. We want to tag all the services with the server name that they are running on. We have tried a couple of options but couldn’t succeed without hitting the tagging limit or delay in getting tags applied. I wonder if anyone can share their experience if they have overcome this issue.
Thanks
Raj
05 Jul 2024 05:55 AM
Hi @mrc15816
I allways use this for my enviroments
i know that this does not have a nice performance in big environment but always can be use the hostgroup to reduce the scope.
if this is not posible you can always set metadata in host.
probably exist some other methods but those work for me plenty of times.
05 Jul 2024 07:55 AM - edited 05 Jul 2024 07:55 AM
Hello,
Normally, in this case, I use the {Host:DetectedName} without any regex to not impact performance and apply it directly to Services.
It is true that some delay is expected, but normally, within 3 to 10 minutes, the rule should be applied to every entity in the environment.
Try following the best practices.
I can't help more here.
Best regards! Wish a good monitoring!
05 Jul 2024 03:37 PM
@jaume_reverte @rgarzon1 thank you both for your recommendation.
We are using {host:DetectedNames} and this method wouldn't work under entity selector and we couldn't pick monitored entity as we can't pick os:services hence couldn't achieve. Any other ideas?
Thanks
Raj
05 Jul 2024 04:43 PM
But if you use entity selector the options for set services provided will not work.
05 Jul 2024 05:40 PM
@rgarzon1 the method you are calling out is only available for Monitored Entity method, but the OS services is not available under this method, unless we are missing something here.
Thank you Raj
06 Jul 2024 01:19 AM
Now understand, i was thinking in services in general, after your message try to doit by myselft and notice that its right, there is not a way to doit without reach some limits.
- set a tag with the host name for every service in the host ( no posible if there ist more than a x quantity)
- set a tag by group or range of ip (no a viable option because its not an easy way to drill down in problem)
- set the tag by hostgroup (probably a good option but not too far from a nightmare to drilldown)
and etc..
i was thinking now for the use of this the host in the service inside a host. maybe you will need it when a problem its raise and need more information in the message.
but while i was thinking in that got this for me.
timeseries availability = sum(dt.osservice.availability), by: { dt.entity.host, dt.osservice.status, `dt.entity.os:service` }
| fieldsAdd entityName(dt.entity.host), entityName(`dt.entity.os:service`)
| summarize count = count(), by:{dt.entity.host.name, dt.osservice.status, entityName(`dt.entity.os:service`) }
| summarize active = countIf( dt.osservice.status == "active")
, activating = countIf( dt.osservice.status == "activating")
, failed = countIf( dt.osservice.status == "failed")
, inactive = countIf( dt.osservice.status == "inactive")
, by:{ dt.entity.host.name }
or
i was not able to set the host for the os:services but get something to analyze .. thank you
09 Jul 2024 02:47 AM
@rgarzon1 thank you for checking out and sharing some thoughts.