Skip to main content

Graze API example use case: Mirroring a manually created ITSM ticket in Moogsoft

There may be times where a manually created ticket in the IT service management system needs to be reflected in Moogsoft. This may be a user initiated ticket for which no correlation has been defined. To enable a manually created ITSM ticket to be mirrored in Moogsoft the following steps would be taken:

  1. In the ITSM system, ensure that manual ticket creation can trigger appropriate business logic. It is assumed the ticket would contain references to the impacted CIs or impacted services.

  2. The business logic in the ITSM solution would need to perform the following actions:

    1. For each of the impacted CIs, use the Graze endpoint getAlertIds to fetch a list of filtered alert ids appropriate to the CI, for example using a filter of "source = host123 and custom_info.application = 'payroll' and last_event_time <= time_criteria".

    2. Aggregate the returned alert ids into a single list.

    3. Use the Graze API endpoint createSituation with a suitable description (e.g "Manually created Incident: INC xxxxxx"). This will return the newly created Situation id.

    4. For each of the alert ids identified in step b, use the Graze endpoint addAlertToSituation to add each alert to the newly created Situation.

    5. Once the above is complete, add a suitable thread entry to indicate why this action was taken using the addThreadEntry Graze API call.

    6. Finally, add correlation info to "entangle" the manual ITSM ticket with the Moogsoft Situation and allow bi-directional communication between the two. Use the Graze endpoint addSigCorrelationInfo with the ITSM service name and and resource id to link the two together.