How can we create a report on robots and devices that are currently set in maintenance?
How do I find out devices that are in Maintenance?
Sometimes people can forget that so we need this check to be sent out by mail each morning so we have control over the environment.
Release : UIM 20.4 - Maintenance Mode
Maintenance in UIM 20.4 is Managed using Operator Console Groups.
From a UI perspective (in OC), you can check which devices are currently in maintenance by going to:
Groups > Select the "Groups" node > Select the Maintenance Icon. You will see all maintenance schedules displayed (active and not active ones. Active maintenances are current) > 3 dots menu > Update devices and there you see the list of devices that are in maintenance.
On the example below, the selected devices on the right show the devices that are in maintenance for the selected maintenance.
On the DB the tables where this information is stored are the following:
select * from MAINTENANCE_SCHEDULE
select * from MAINTENANCE_SCHEDULE_MEMBERS
select * from MAINTENANCE_WINDOW
The below query returns a list of devices that are currently on an active maintainance:
select name as device, origin, ip, dedicated as type, os_name from CM_COMPUTER_SYSTEM where cs_id in(select cs_id from CM_DEVICE where dev_id in (select dev_id from MAINTENANCE_WINDOW where end_time > GETDATE()))
returns the correct list of maintenance devices:
If the query is empty it means there is no current active maintenance device.