DX Infrastructure Management

Tech Tip - maintenance_mode probe behavior 

03-01-2018 01:13 AM

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.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 

Statistics
0 Favorited
4 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Comments

09-13-2018 08:07 AM

Have added an example SQL script to display current affected devices.

03-01-2018 06:53 PM

This is a great start. I would like to see more info on timezone and daylight savings handling, and also troubleshooting tips, e.g. when maintenance schedules don't fire

Related Entries and Links

No Related Resource entered.