Solved

Process Monitoring Batch Script

  • 2 February 2024
  • 7 replies
  • 53 views

Userlevel 3
Badge +2

 

s there a way we can measure the performance of a Data Source or collectors?

Repository: ProcessMonitoring

@Stuart Weenig I presume I did not understand why monitoring lots of processes/services on Windows systems, with _Select Data Sources might not be the best approach.

Aren’t both making a WMI call? Aren’t both going to bring all the Processes in one go?

 

Can we see the query count from WMI Vs Batch Groovy?

icon

Best answer by Stuart Weenig 2 February 2024, 20:02

View original

7 replies

Userlevel 7
Badge +20

s there a way we can measure the performance of a Data Source or collectors?

Yes, there’s lots you can do.

Aren’t both making a WMI call? Aren’t both going to bring all the Processes in one go?

For Win_Service_Select_Groovy, it does one call to fetch all the services where startmode == auto. However, the discovery filters only create instances for those services that match the includeRegEx and do not match the excludeRegEx properties. Then during collection, it does fetch all the services and filter to only output the data for the services of interest.

For discovery, there is no good alternative other than to grab the entire list. You could go through grabbing them one at a time, but that would take more time than asking for them all at once.

For collection, you could switch from batchscript to script, which would spawn a task for each instance. This would essentially run the tasks in parallel, potentially improving performance. However, that method is more complicated than just grabbing everything and filtering in script. You could do it, but I didn’t. As to whether it would improve performance, you’d have to build it then test it out.

Userlevel 3
Badge +2

Thanks a lot!

I now begin to understand its mechanism, I also went through the following documents:

creating-datasources

what-is-active-discovery

After reading I guess I would need to find out what is more expensive WMI Call or Batchscript?

Userlevel 3
Badge +2

For measuring the performance of a data source you mentioned “Yes, there’s lots you can do.” May you please point me to an article or document.

Userlevel 7
Badge +20

For me, i just check that it exited successfully and how long it took. Both of which are datapoints available on any scripted datasource.

Userlevel 3
Badge +2

Thank you, I will check them out.

Userlevel 3
Badge +2

FYI I found these

https://www.logicmonitor.com/support/logicmodules/datasources/data-collection-methods/batchscript-data-collection

https://www.logicmonitor.com/support/collectors/collector-management/collector-performance

https://www.logicmonitor.com/support/collectors/collector-management/monitoring-your-collector

https://www.logicmonitor.com/support/logicmodules/datasources/data-collection-methods/scripted-data-collection-overview

Userlevel 7
Badge +20

Very good! I was busy working on something else so i didn’t have time to look those up as part of the “lots you can do” comment. Glad you were able to go find them!

Reply