Process Monitoring Batch Script
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?
Ashish Sikarwar
Posted 2 years ago·Last reply 2 years ago
7 comments
LM User
·2 years agoVery 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!
Ashish Sikarwar
OP2 years agoFYI 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
Ashish Sikarwar
OP2 years agoThank you, I will check them out.
LM User
·2 years agoFor me, i just check that it exited successfully and how long it took. Both of which are datapoints available on any scripted datasource.
Ashish Sikarwar
OP2 years agoFor 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.
Ashish Sikarwar
OP2 years agoThanks 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?
LM User
·2 years agoYes, there’s lots you can do.
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.