Forum Discussion
3 Replies
- mnagel
Professor
5 minutes ago, mnagel said:The normal way I monitor services is via AD, but you would end up with a new instance wildvalue each time it was changed if you use the normal option (WMI-based datasource). If you use Groovy script DS instead, you could strip the PID portion to build the wildvalue so that the data is stable. There should be some examples of that in the existing datasource repo, need to dig around....
Many examples of using WMI from Groovy, none that select from Win32_Service, but should be simple enough to adjust the query. See Microsoft_LyncServer_StorageService as one example.
- mnagel
Professor
The normal way I monitor services is via AD, but you would end up with a new instance wildvalue each time it was changed if you use the normal option (WMI-based datasource). If you use Groovy script DS instead, you could strip the PID portion to build the wildvalue so that the data is stable. There should be some examples of that in the existing datasource repo, need to dig around....
- Vitor_Santos
Advisor
I believe we might be doing what you want in our environment (it uses the service name & not its display name).
Another reason for creating this custom data source was to don't consume so many WMI resources for each box (since it was doing pretty much 1 query per service/instance) on the out of box DS.
We've came up with a custom one that does a single WMI query (via groovy) to get all the services & then process the output...This reduced the WMI load substantially since we discover all the services running on a server (as an MSP this is way easier in terms of management).
We can then use AD filters to filter stuff globally and/or make use of the token to filter stuff individually (group level/resource level).Not sure if it helps you out but, here you go
Related Content
- 5 months ago