DX Infrastructure Manager

Expand all | Collapse all

How do you get a report on all the maintenance schedules currently in progress in Nimsoft / UIM?

  • 1.  How do you get a report on all the maintenance schedules currently in progress in Nimsoft / UIM?

    Posted 08-19-2015 07:57 PM

    We have a multi-tenanted UIM environment supporting many customers each with their own hubs.

    The portal displays all the customer lists to the users.

    We are often asked the question why a device did not raise an alarm for a particular event several days after the issue occurred.

    Is there a quick way for us to run  a report or sql query that will tell us if the device was in maintenance mode on the day in question?

    Can we generate a daily report of all devices that are SCHEDULED to be in maintenance for the next calendar day and publish it as a report in Unified Reporter?

    Appreciate any insights into getting data on maintenance schedules either at a device level or a date / day level.

    thanks



  • 2.  Re: How do you get a report on all the maintenance schedules currently in progress in Nimsoft / UIM?

    Posted 08-20-2015 01:13 AM

    Hi,

     

    Getting historical windows from DB is simple:

     

    select
      ms.SCHEDULE_NAME,
      mw.START_TIME,
      mw.END_TIME,
      d.dev_name,
      d.dev_ip
    from
      MAINTENANCE_SCHEDULE ms,
      MAINTENANCE_WINDOW mw,
      CM_DEVICE d
    where
      mw.SCHEDULE_ID = ms.SCHEDULE_ID
      and
      d.dev_id = mw.DEV_ID
    order by
      ms.START_TIME,
      ms.SCHEDULE_NAME
    

     

    Getting schedules that will fire within the next day isn't quite so simple, since they are usually defined by recurrence. The data is stored in MAINTENANCE_SCHEDULE table, but you'd have to build a bit more complicated query for that. Maintenance_mode probe also has callbacks for both functions, but I'm not quite sure why I haven't gotten them to work properly. However, both are also exposed through the REST api, which is very simple to use in the case of schedules about to trigger, althought it might be a bit more arduous to make your data presentable. Then again, building a UR report with variables in queries is also nasty job in my experience.

     

    To get schedules that are about to trigger:

    https://your.domain.com/rest/maintenance_mode/Domain/Hub/Robot/get_next_fire_time_for_schedules

    You need to point it to the robot that has maintenance_mode installed on it.

     

    It's funny how it seems it's more simple to get one from the db and the other from the ws..

     

    -jon