Data access for OnmsAlarm objects.

Hierarchy

Constructors

Accessors

Methods

  • Acknowledge an alarm.

    Version

    ReST v1+

    Parameters

    • alarm: number | Model.OnmsAlarm
    • Optional user: string

      The user to ack the alarm as. (Only administrators have the right to do this.)

    Returns Promise<void>

  • Finds the values for the given propertyId, if it exists.

    Returns

    A promise containing the values.

    Parameters

    • propertyId: string

      The propertyId to find the values for

    • Optional options: any

      Some additional options. May be implementer dependent, such as limit, or value restrictions

    Returns Promise<any>

  • Retrieve the API version from the currently configured server.

    Returns number

  • A convenience method to make it easy for implementers to extract the count (or totalCount) values from response data.

    Parameters

    • data: any
    • Optional status: number

    Returns number

  • Retrieves the URL to the details page for the given alarm.

    Returns

    URL on the associated OpenNMS server for the alarm details page.

    Parameters

    Returns string

  • Returns or creates a cache of properties for this dao.

    Returns

    the cache for this dao. It is created if it does not exist.

    Returns Promise<any>

  • Fetches the data from the result and verfifes that the dataFieldName exists in the data property. If it does not exist, an exception is thrown.

    Parameters

    • result: any

      The result to fetch the data from

    • dataFieldName: string

      The property name (basically result.data[dataFieldName].

    • path: string

      The path where the result was fetched from. This is for error handling

    • mapCallbackFunction: any

      Callback function to convert each entry from result.data[dataFieldName].

    Returns any[]

  • Create or update the journal memo associated with the alarm.

    Version

    ReST v2

    Parameters

    • alarm: number | Model.OnmsAlarm

      The OnmsAlarm or alarm ID.

    • body: string

      The memo body

    • Optional user: string

      The user to update the memo as. (Only administrators have the right to do this.)

    Returns Promise<void>

  • Create or update the sticky memo associated with the alarm.

    Version

    ReST v2

    Parameters

    • alarm: number | Model.OnmsAlarm

      The OnmsAlarm or alarm ID.

    • body: string

      The memo body

    • Optional user: string

      The user to update the memo as. (Only administrators have the right to do this.)

    Returns Promise<void>

  • The path to the alarm search properties endpoint.

    Returns string

  • Convert the given value to a date, or undefined if it cannot be converted.

    Deprecated

    use Util.toDate instead.

    Parameters

    • from: any

    Returns Moment

  • Convert the given value to a number, or undefined if it cannot be converted.

    Deprecated

    use Util.toNumber instead.

    Parameters

    • from: any

    Returns number

  • Notify OpenNMS it should fetch updated ticket state for an alarm from the remote ticketing system.

    Version

    ReST v2

    Parameters

    Returns Promise<void>

  • Whether or not to use JSON when making ReST requests.

    Returns boolean

Generated using TypeDoc