Description:
The caWmiAgent can be used to monitor Windows WMI Resources, such as files, scheduled tasks, processes, and so forth. You must first identify those jobs that were created using the AT command, and then add a watcher in Agent Technology. For more information about the agent-specific options of caWmiAgent, see the guide Inside Systems Monitoring , which you can find either on the product media or online at
https://support.ca.com/irj/portal/DocumentationResults?productID=130639&releaseID=ALL&languageID=ENU&actionID=2
Solution:
You can configure caWmiAgent to monitor Windows Scheduled Jobs if the jobs or tasks are created using AT command.
Note: If a Task was created manually from Control Panel -> Scheduled Tasks, the WMI agent cannot recognize it. See below for information on how to monitor the status of these tasks.
To run a WMI query to see all the Scheduled Jobs
<Please see attached file for image>
<Please see attached file for image>
<Please see attached file for image>
<Please see attached file for image>
To monitor the Status of a Job created using the AT command
Field | Entry |
Watcher Name | TestJob |
NameSpace | root\cimv2 |
Class Name | Win32_ScheduledJob |
Where Clause | JobId=7 (Specifies the JobId you want to monitor) |
Property Name | JobStatus (Click Property List to select a Property) |
Exists | Should Exist (Action: Down Critical) |
String Match | Success (Action: Down Critical) |
<Please see attached file for image>
The Watcher will query against ?JobId=7? (example: select JobStatus from Win32_ScheduledJob where JobId=7). If the Watcher returns Success (Job Status is Success), then the Watcher status will be Normal; if the Watcher returns Fail, then the Watcher status will show Critical status.
To monitor Scheduled Jobs created from Control Panel -> Scheduled Tasks
Scheduled Jobs or Tasks created manually cannot be found by WMI. Therefore, the caWmiAgent cannot monitor a Job property such as Status. However, Microsoft's Scheduled Tasks writes its results to a file : %SystemRoot%\SchedLgU.Txt.
With this text file you can use the Log Agent (caiLogA2) to monitor that file for certain job failures or errors.
For more information about how to use the Log Agent, see the chapter Monitoring System Resources in Inside Systems Monitoring.