Output representation for each process name in Logicmonitor
I am running a powershell script to get the CPU utilization of each process and it is showing when running test script as attached to this question.
To store it in device it is showing as percentage of CPU and not application name. How to store as application name ?
Can someone help on how to save each application CPU utilization in Logicmonitor as every time some application may be having utilization and some may not ?
RajeshP
Posted 5 years ago·Last reply 5 years ago
10 comments
LM User
·5 years agoLooks like batchscript then (look at the options in the "general information" section of the DS config to be sure). In that case, use the 3rd and 4th output snippets from my previous reply as your template.
RajeshP
OP5 years agoMy collector script prints the data like below
Application_Name1##CPU_Percentage
Application_Name2##CPU_Percentage
So what should I place in collector attributes script to store data ?
LM User
·5 years agoIf you set it up as script, then your script should only output the data for one of the instances (app/service/process). In that case, the output should look like this according to the support documentation:
So, in your case, it would look like this:
However, if you chose batchscript (which you likely should change if you didn't), then our output should look like this:
So, in your case it would look like this:
LM User
·5 years agoSure, but you already have the collector script, mostly.
The question you need to answer is whether you setup the DS as script or batchscript.
RajeshP
OP5 years agoCan you please provide any example of the Collector attributes script as reference for better understanding ?
LM User
·5 years agoIn the active discovery script, you should put the script that fetches the list of things to be monitored (instances to create in LM).
In the collector attributes script, you should put the script that fetches the actual data. What you were using for your active discovery script would likely be very close to what you actually need for your collection script.
RajeshP
OP5 years agoIn this setup for multi-instance, active discovery method, there are 2 blocks for adding Powershell script.
1st block after Active discover option parameters and 2nd block after Collector attributes.
What should be placed in the collector attributes script block ?
LM User
·5 years agoThat's not the right format. Your discovery script output should be like this:
RajeshP
OP5 years ago>>>>>>> Just to check some basics: this is a multi-instance, BATCHSCRIPT DS and you have active discovery enabled. Right?
Yes, Correct multi-instance and active discovery enabled.
>>>>>>>>> It looks like you put your collection script into the active discovery script section. Your ActiveDiscovery script should be outputting the ID and name of the application in this format:
It is in below format:
Application_Name1##CPU_Percentage
Application_Name2##CPU_Percentage
LM User
·5 years agoJust to check some basics: this is a multi-instance, BATCHSCRIPT DS and you have active discovery enabled. Right?
It looks like you put your collection script into the active discovery script section. Your ActiveDiscovery script should be outputting the ID and name of the application in this format: