Hi Folks,
I am trying to build an monitor using Cook down, which will help us in getting DATA from multiple property bag in ONE script and passing the $Target Instance in Filter Module later. To yield the data for an target.
However I am facing the below issue . As per TechNet Article it is mentioned that DS should run once in which the script is present, but I have not seeing it in my implementation .
I have created an discovery for object of a class with key property based on an SQL Query output , The Base Class is the windows Computer on which I need to discover the Object then I have Created an Application component Class which is hosted by the Base Class via an relationship .
Following is the activity I have performed so Far.
- Created the 2 Class as mentioned above, one is base class (which is REG Discovery), Second is the Application Component which is hosted via an relation to this base class.
- Created an Probe module which return the DATA of the All the instance of the Target Class. There is no need to pass parameter to it (Windows.Powershellpropertybagtriggeronlyprobe)
- Created an DS module which run the Scheduler an probe module Created above.
- Created an DS Module which filter the above module based on the Key property of the Target instance. Using the Expression filter.
- Then Create the Appropriate Monitor Type and determine the failure and success based on the property bag output
- Then I have Created an Monitor in which I pass the parameter of Interval second & Sync Time(optional) .
However I have noticed the Probe which is created in Part 2 is running as many as the target instance are present . I am confused with the Statement that cook down should run the DS once an pass it to the target.
But I am seeing the it is running once but for every instance of $target instance . Does anyone have any handy MP which Deal with SQL query .
In my case below : my script discovery run and discover the object below in excess of 400+ Row
Computer |
JobName (KEY) |
JobGroup (KEY) |
XYZ |
SSDD |
ERR |
XYZ |
SSDD |
EER |
XYZ |
SSPP |
EE |
XYZ |
ERRR |
SSP |
I want to create monitoring around the based on the last column , I have built an script which get the data in Multiple property bag .
Computer |
Job Name (KEY) |
JobGroup (KEY) |
Health |
XYZ |
SSDD |
ERR |
OK |
XYZ |
SSDD |
EER |
ERROR |
XYZ |
SSPP |
EE |
ERROR |
XYZ |
ERRR |
SSP |
OK |
The Problem I am facing is I have targeted the monitor to the discovered Class (Target) , now it is running as much time as the no of the discovered item are, The filter is done based on the Key value but it is not efficient as I don`t want to Query my SQL for each target instance.
Can some guide me if I am missing anything or this is default behavior of Cook down i.e. one DataSource for one Target instance , if anyone has created some solution for monitoring above using cookdown can you share the MP with me so I can cross-verify for any mistake I am making. I am specifically looking based on output of SQL qu