Alerts & Anomaly Detection Models

mPulseAPI.deleteRepositoryAlertMethod

Deletes an Alert object from the mPulse repository

At least one of alertID or alertName must be passed in to delete the alert object.

Arguments

token::AbstractString : The Repository authentication token fetched by calling getRepositoryToken

Keyword Arguments

alertID::Int64 : The ID of the alert to update.

alertName::AbstractString : The Alert name in mPulse. This is available from the mPulse domain configuration dialog.

Returns

Returns true if the delete is successful, else false.

Throws

ArgumentError : if token is empty or alertID is empty

mPulseAPIException : if API access failed for some reason

source
mPulseAPI.getRepositoryAlertMethod

Fetches an Alert object from the mPulse repository

At least one of alertID or alertName must be passed in to identify the alert. If neither are passed in, then all alerts for the tenant are returned.

The alert will be cached in memory for 1 hour, so subsequent calls using a matching alertID return quickly without calling out to the API. This can be a problem if the alert changes in the repository. You can clear the cache for this tenant using mPulseAPI.clearAlertCache and passing in alertID.

Arguments

token::AbstractString : The Repository authentication token fetched by calling getRepositoryToken

Keyword Arguments

alertID::Int64 : The ID of the alert to fetch.

alertName::AbstractString : The Alert name in mPulse. This is available from the mPulse domain configuration dialog.

Returns

{Dict} The alert object with the following fields:

hidden::Bool : Flag indicating whether the alert is visible to the user

parentID::Int64 : The ID of the parent folder that this alert is in

path::AbstractString : The folder path that this alert is in

readOnly::Bool : Flag indicating whether the alert is able to be edited

name::AbstractString : The alert's name

tenantID::Int64 : The ID of the tenant that the alert is in

created::DateTime : The timestamp when this object was created

id::Int64 : The ID of the alert.

description::AbstractString : The description of this alert entered into mPulse

lastCached::DateTime : The timestamp when this object was last cached

body::XMLElement : An XML object representing the alert's XML definition or an empty node if you do not have permission to see the full alert

references::Dict : An array of Dicts with reference information such as name, id, type, and path.

uid::AbstractString : The encrypted uid associated with the alert

deleted::Bool : Flag indicating whether the alert has been deleted

ownerID::Int64 : The ID of the alert's owner

attributes::Dict : A Dict containing whether the alert is active, version number, and the time(s) that the alert was last cleared, triggered, and updated.

lastModified::DateTime : The timestamp when this object was created

Throws

ArgumentError : if token is empty or alertID is empty

mPulseAPIException : if API access failed for some reason

source
mPulseAPI.postRepositoryAlertMethod

Updates an Alert object from the mPulse repository

At least one of alertID or alertName must be passed in to update the alert object.

Arguments

token::AbstractString : The Repository authentication token fetched by calling getRepositoryToken

Keyword Arguments

alertID::Int64 : The ID of the alert to update.

alertName::AbstractString : The Alert name in mPulse. This is available from the mPulse domain configuration dialog.

attributes::Dict : A Dict of alert attributes to update

objectFields::Dict : A Dict of alert object fields to update

body::AbstractString|LightXML.XMLElement="" : An XMLElement (if not empty) containing the body of the alert, containing pertinent information surrounding errors.

Returns

{Dict} The updated alert object with the following fields:

hidden::Bool : Flag indicating whether the alert is visible to the user

parentID::Int64 : The ID of the parent folder that this alert is in

path::AbstractString : The folder path that this alert is in

readOnly::Bool : Flag indicating whether the alert is able to be edited

name::AbstractString : The alert's name

tenantID::Int64 : The ID of the tenant in which the alert is in

created::DateTime : The timestamp when this object was created

id::Int64 : The ID of the alert.

description::AbstractString : The description of this alert entered into mPulse

lastCached::DateTime : The timestamp when this object was last cached

errorXML::Union{AbstractString, LightXML.XMLElement} : An XML object representing the alert's XML error definition to be updated by the repository.

references::Dict : An array of Dicts with reference information such as name, id, type, and path.

uid::AbstractString : The encrypted uid associated with the alert

deleted::Bool : Flag indicating whether the alert has been deleted

ownerID::Int64 : The ID of the alert's owner

attributes::Dict : A Dict containing whether the alert is active, version number, and the time(s) that the alert was last cleared, triggered, and updated.

lastModified::DateTime : The timestamp when this object was created

Throws

ArgumentError : if token is empty or alertID is empty

mPulseAPIException : if API access failed for some reason

source
mPulseAPI.deleteRepositoryStatModelMethod

Deletes an StatisticalModel object from the mPulse repository

At least one of statModelID or statModelName must be passed in to delete the Statistical Model object.

Arguments

token::AbstractString : The Repository authentication token fetched by calling getRepositoryToken

Keyword Arguments

statModelID::Int64 : The ID of the statistical model to update.

statModelName::AbstractString : The statistical model name in mPulse. This is available from the mPulse domain configuration dialog.

Returns

Returns true if the delete is successful, else false.

Throws

ArgumentError : if token is empty or statModelID is empty

mPulseAPIException : if API access failed for some reason

source
mPulseAPI.getRepositoryStatModelMethod

Fetches an StatisticalModel object from the mPulse repository

At least one of statModelID or statModelName must be passed in to identify the statistical model.

The statistical model will be cached in memory for 1 hour, so subsequent calls using a matching statModelID return quickly without calling out to the API. This can be a problem if the statistical model changes in the repository. You can clear the cache for this tenant using mPulseAPI.clearStatModelCache and passing in statModelID.

Arguments

token::AbstractString : The Repository authentication token fetched by calling getRepositoryToken

Keyword Arguments

statModelID::Int64 : The ID of the statistical model to update.

statModelName::AbstractString : The statistical model name in mPulse. This is available from the mPulse domain configuration dialog.

Returns

{Dict} The statisticalmodel object with the following fields:

hidden::Bool : Flag indicating whether the statistical model is visible to the user

parentID::Int64 : The ID of the parent folder that this statistical model is in

path::AbstractString : The folder path that this statistical model is in

readOnly::Bool : Flag indicating whether the statistical model is able to be edited

name::AbstractString : The statistical model's name

tenantID::Int64 : The ID of the tenant that the statistical model is in

created::DateTime : The timestamp when this object was created

id::Int64 : The ID of the statistical model.

description::AbstractString : The description of this statistical model entered into mPulse

lastCached::DateTime : The timestamp when this object was last cached

body::XMLElement : An XML object representing the statistical model's XML definition or an empty node if you do not have permission to see the full statistical model

references::Dict : An array of Dicts with reference information such as name, id, type, and path.

uid::AbstractString : The encrypted uid associated with the statistical model

deleted::Bool : Flag indicating whether the statistical model has been deleted

ownerID::Int64 : The ID of the statistical model's owner

attributes::Dict : A Dict containing whether the statistical model is active, version number, and the time(s) that the statistical model was last cleared, triggered, and updated.

lastModified::DateTime : The timestamp when this object was created

Throws

ArgumentError : if token is empty or statModelID is empty

mPulseAPIException : if API access failed for some reason

source
mPulseAPI.postRepositoryStatModelMethod

Updates an StatisticalModel object from the mPulse repository

At least one of statModelID or statModelName must be passed in to update the statistical model object.

Arguments

token::AbstractString : The Repository authentication token fetched by calling getRepositoryToken

Keyword Arguments

statModelID::Int64 : The ID of the statistical model to update.

statModelName::AbstractString : The statistical model name in mPulse. This is available from the mPulse domain configuration dialog.

attributes::Dict : A Dict of statistical model attributes to update

objectFields::Dict : A Dict of statistical model object fields to update

body::AbstractString|LightXML.XMLElement="" : An XMLElement (if not empty) containing the body of the statistical model, containing pertinent information surrounding errors.

Returns

{Dict} The updated statistical model object with the following fields:

hidden::Bool : Flag indicating whether the statistical model is visible to the user

parentID::Int64 : The ID of the parent folder that this statistical model is in

path::AbstractString : The folder path that this statistical model is in

readOnly::Bool : Flag indicating whether the statistical model is able to be edited

name::AbstractString : The statistical model's name

tenantID::Int64 : The ID of the tenant in which the statistical model is in

created::DateTime : The timestamp when this object was created

id::Int64 : The ID of the statistical model.

description::AbstractString : The description of this statistical model entered into mPulse

lastCached::DateTime : The timestamp when this object was last cached

errorXML::Union{AbstractString, LightXML.XMLElement} : An XML object representing the alert's XML error definition to be updated by the repository.

references::Dict : An array of Dicts with reference information such as name, id, type, and path.

uid::AbstractString : The encrypted uid associated with the statistical model

deleted::Bool : Flag indicating whether the statistical model has been deleted

ownerID::Int64 : The ID of the statistical model's owner

attributes::Dict : A Dict containing whether the statistical model is active, version number, and the time(s) that the statistical model was last cleared, triggered, and updated.

lastModified::DateTime : The timestamp when this object was created

Throws

ArgumentError : if token is empty or statModelID is empty

mPulseAPIException : if API access failed for some reason

source
mPulseAPI.clearAlertCacheFunction

Expire an entry from the alert cache. Use this if the alert has changed.

Keyword Arguments

alertID::Int64 : The ID of the alert to expire.

alertName::AbstractString : The Alert name in mPulse. This can be found from the mPulse alert configuration dialog.

Returns

true : on success

false : if the entry was not in cache

source
mPulseAPI.clearStatModelCacheFunction

Expire an entry from the statistical model cache. Use this if the model has changed.

Keyword Arguments

statModelID::Int64 : The ID of the statistical model to expire.

statModelName::AbstractString : The statistical model name in mPulse. This can be found from the mPulse statistical model configuration dialog.

Returns

true : on success

false : if the entry was not in cache

source