I would like to describe some inner work how maintenance_mode probe works with nas probe to discard UIM alarms.
3 tables
MAINTENANCE_SCHEDULE
It has master table of your maintenance rule.
MAINTENANCE_SCHEDULE_MEMBERS
It has mapping in between device and your maintenance rule.
cs_id is an internal computer system identifier in CA UIM, you can look up cs_id using CM_COMPUTER_SYSTEM table.
MAINTENANCE_WINDOW
When your maintenance starting time is arriving, maintenance_mode probe populate rows.
The row is paired with dev_id, schedule_id, start_time and end_time
dev_id is another internal computer system identifier in CA UIM, you can look up dev_id using CM_DEVICE table.
Interaction with nas probe
nas probe builds list of which device is in under maintenance by regularly asking maintenance_mode probe.
maintenance_mode probe provides the latest info of maintenance_window table (its end_time not expired).
When new alarm is arriving at nas probe, nas probe checks dev_id (which is an attribute in alarm) and if dev_id is in the list, then the alarm is discarded.
some useful probe callback
add_computer_systems_to_schedule - the callback add your computer system(s) into maintenance.
remove_computer_systems_from_schedule - the callback remove your computer system(s) from maintenance.
An SQL script example how to display all devices in under maintenance now |
SELECT distinct cmcs.cs_id, cmcs.name, mw.dev_id, cmd.probe_name, ms.schedule_name, mw.start_time, mw.end_time from MAINTENANCE_WINDOW mw INNER JOIN CM_DEVICE cmd on mw.dev_id = cmd.dev_id INNER JOIN CM_COMPUTER_SYSTEM cmcs on cmcs.cs_id = cmd.cs_id INNER JOIN MAINTENANCE_SCHEDULE ms on mw.SCHEDULE_ID = ms.schedule_id where mw.end_time > GETDATE() |
An SQL script example how to display device members for each maintenance rules |
select ms.schedule_id, ms.schedule_name,cmcs.name from MAINTENANCE_SCHEDULE ms INNER JOIN MAINTENANCE_SCHEDULE_MEMBERS msm on msm.schedule_id = ms.schedule_id INNER JOIN CM_COMPUTER_SYSTEM cmcs on cmcs.cs_id = msm.cs_id |
Similar SQL can be found at the below KB as well.
How to run a query to show devices in maintenance - CA Knowledge
Important caveat !! (Updated)
Starting with maintenance_mode 8.53 HF3, rows in maintenance_window table for expired schedule automatically removed after you enable the following key.
<setup>/purge_maintenance_window_interval = 1
See UIM hotfix page for download the hotfix.
CA Unified Infrastructure Management Hotfix Index - CA Technologies