View Maintenance Mode comments

When I put an object in Maintenance Mode through SquaredUp and fill in the additional comments, how do I go back and see that information? Is there a way to dashboard who did it, reason and additional comments?

1 Like

Currently, there’s no way of viewing this info in Squared Up v3, though this was possible in v2. Probably best to send a request to support.

You could write a SQL query to pull MM info, though I wouldn’t know where to begin with this, as I’m not even sure which DB it’s stored in :frowning:

1 Like

Give this a try…

  1. Add a new SQL tile to a dashboard
  2. Choose SQL (Table)
  3. Use your OperationsManager database. For example:
    1. Data Source=FQDN.Of.Your.OpsMgr.DB;Initial Catalog=OperationsManager;Integrated Security=True;
  4. For your query string, use the following SQL:
Use [OperationsManager] SELECT FullName as [Object in Maintenance], TimeAdded as [Time Added], StartTime as [Start Time], ScheduledEndTime as [Scheduled End Time], dbo.MaintenanceMode.[User] as [User], Case ReasonCode When 0 then 'Other (Planned)' When 1 then 'Other (Unplanned)' When 2 then 'Hardware: Maintenance (Planned)' When 3 then 'Hardware: Maintenance (Unplanned)' When 4 then 'Hardware: Installation (Planned)' When 5 then 'Hardware: Installation (Unplanned)' When 6 then 'Operating System: Reconfiguration (Planned)' When 7 then 'Operating System: Reconfiguration (Unplanned)' When 8 then 'Application: Maintenance (Planned)' When 9 then 'Application: Maintenance (Unplanned)' When 10 then 'Application: Installation (Planned)' When 11 then 'Application: Unresponsive' When 12 then 'Application: Unstable' When 13 then 'Security issue' When 14 then 'Loss of network connectivity (Unplanned)' End as [Reason for Maintenance], Comments FROM BaseManagedEntity INNER JOIN MaintenanceMode ON BaseManagedEntity.BaseManagedEntityId = MaintenanceMode.BaseManagedEntityId WHERE IsInMaintenanceMode = 1

 

I found the above SQL code at this web site: http://www.culham.net/sql/what-scom-objects-are-in-maintenance-mode-sql-query/

2 Likes

Brilliant, thanks, looks like that will do the trick.
Had to replace ‘’ with ‘’ to get it working.