SLM

Description

Implements functions for manipulating SLM Services, SLM Filters, and SLM Metrics.

Synopsis

use Assure1::SLM;

Functions

CloneSLMFilter

Convenience function to CloneVertexID that clones a SLM Filter object specifically

CloneSLMFilter(\%options)

Options

DBH         -> Unified Assurance Database Handle Reference (i.e. \$DBH)
NDB         -> Neo4j Database Handle Reference (i.e. \$NDB)
Config      -> Unified Assurance Config handle (i.e. $Config)
Log         -> Unified Assurance Log handle (i.e. $Log)
StorageHash -> Cache (i.e. $StorageHash)
SLMFilterID  -> ServiceID to clone
SLMFilter    -> New SLM Filter Definition containing new Name (required) and other optional filter related properties.
                See CreateSLMEventFilter for list of supported properties.
                If a supported property is not given it defaults to the value from the original service.

Returns

1. ErrorFlag       (0 Good, 1 Bad)
2. Message         (String)
3. SLM Filter ID   (Integer) or undef if error

Synopsis

my ($ErrorFlag, $Message, $SLMFilterID) = CloneSLMFilter({
    DBH         => \$DBH,
    Config      => $Config,
    Log         => $Log,
    StorageHash => $StorageHash,
    SLMFilterID => 1,
    SLMFilter => {
        Name     => "My New SLM Filter",
        EventID  => 2
    }
});

if (!$SLMFilterID) {
    $Log->Message('ERROR', "Error Cloning SLM Filter: $Message");
}

OR

my $SLMFilterID = CloneSLMFilter({
    DBH         => \$DBH,
    Config      => $Config,
    Log         => $Log,
    StorageHash => $StorageHash,
    SLMFilterID => 1,
    SLMFilter => {
        Name     => "My New SLM Filter",
        EventID  => 2
    }
});

if (!$SLMFilterID) {
    $Log->Message('ERROR', "Error Cloning SLM Filter");
}

CloneSLMMetric

Convenience function to CloneVertexID that clones a SLM Metric vertex specifically

CloneSLMMetric(\%options)

Options

NDB         -> Neo4j Database Handle Reference (i.e. \$NDB)
Config      -> Unified Assurance Config handle (i.e. $Config)
Log         -> Unified Assurance Log handle (i.e. $Log)
StorageHash -> Cache (i.e. $StorageHash)
SLMMetricID -> ServiceID to clone
SLMMetric   -> New SLM Metric Definition containing new Name (required) and other optional metric related properties.
               See CreateSLMMetric for list of supported properties.
               If a supported property is not given it defaults to the value from the original service.

Returns

1. ErrorFlag       (0 Good, 1 Bad)
2. Message         (String)
3. SLM Metric ID   (String)

Synopsis

my ($ErrorFlag, $Message, $SLMMetricID) = CloneSLMMetric({
    DBH         => \$DBH,
    Config      => $Config,
    Log         => $Log,
    StorageHash => $StorageHash,
    SLMMetricID => 1,
    SLMMetric => {
        Name        => "My New SLM Metric",
        ThresholdID => 1
    }
});

if (!$SLMMetricID) {
    $Log->Message('ERROR', "Error Cloning SLM Metric: $Message");
}

OR

my $SLMFilterID = CloneSLMMetric({
    DBH         => \$DBH,
    Config      => $Config,
    Log         => $Log,
    StorageHash => $StorageHash,
    SLMMetricID => 1,
    SLMMetric => {
        Name        => "My New SLM Metric",
        ThresholdID => 1
    }
});

if (!$SLMMetricID) {
    $Log->Message('ERROR', "Error Cloning SLM Metric");
}

CloneSLMService

Convenience function to CloneVertexID that clones a service object specifically or linked service tree all at once. Returns a hash of any newly created objects which contain references to their directional children & depths

CloneSLMService(\%options)

Options

DBH         -> Unified Assurance Database Handle Reference (i.e. \$DBH)
NDB         -> Neo4j Database Handle Reference (i.e. \$NDB)
Config      -> Unified Assurance Config handle (i.e. $Config)
Log         -> Unified Assurance Log handle (i.e. $Log)
StorageHash -> Cache (i.e. $StorageHash)
ServiceID   -> ServiceID to clone
CloneTree   -> Indicate whether to clone directionally linked objects of ServiceID as well (0=single, 1=tree)
               NOTE: children objects cannot be modified during tree clone, and does not support circular linking
Service     -> New Service Definition containing new Name (required) and other optional service related properties.
               See CreateSLMService for list of supported properties.
               If a supported property is not given it defaults to the value from the original service.

Returns

1. ErrorFlag   (0 Good, 1 Bad)
2. Message     (String)
3. TopServiceID (String)

Synopsis

my ($ErrorFlag, $Message, $TopServiceID) = CloneSLMService({
    DBH         => \$DBH,
    Config      => $Config,
    Log         => $Log,
    StorageHash => $StorageHash,
    ServiceID   => 1,
    CloneTree   => 1,
    Service  => {
        Name     => "My New Service",
        PollTime => 300
    }
});

if (!$TopServiceID) {
    $Log->Message('ERROR', "Error Cloning Object Tree: $Message");
}

OR

my $TopServiceID = CloneSLMService({
    DBH         => \$DBH,
    Config      => $Config,
    Log         => $Log,
    StorageHash => $StorageHash,
    ServiceID   => 1,
    CloneTree   => 1,
    Service  => {
        Name     => "My New Service",
        PollTime => 300
    }
});

if (!$TopServiceID) {
    $Log->Message('ERROR', "Error Cloning Object Tree");
}

CreateSLMEventFilter

Creates an SLM Filter vertex and returns the new ID. If already existing, returns an error.

CreateSLMEventFilter(\%options)

Options

DBH              -> Unified Assurance Database Handle Reference (i.e. \$DBH)
NDB              -> Neo4j Database Handle Reference (i.e. \$NDB)
Config           -> Unified Assurance Config handle (i.e. $Config)
Log              -> Unified Assurance Log handle (i.e. $Log)
StorageHash      -> Cache (i.e. $StorageHash)
ParentID         -> Parent Service ID
Name             -> SLM Filter name
Field            -> Exact Event field name to calculate threshold against e.g. EventID
Metric           -> Aggregation for threshold field (valid values: 'AVG', 'COUNT', 'MAX', 'MIN', 'SUM')
Operator         -> Threshold operator (valid values: '=', '!=', '>', '>=', '<', '<=')
Value            -> Threshold value
Weight           -> Weight to apply to violations bubbled up to parent from this SLM Filter (recommended=1)
WhereClause      -> (optional) Where Clause for matching events e.g. Severity = 5. (NOTE: an empty WhereClause is usually not desireable since it matches ALL events)
OwnerUserID      -> (optional) Owner user ID or 0 for 'Public to All Users in Group' (defaults to 0)
OwnerUserGroupID -> (optional) Owner user group ID or 0 for 'Public to All Groups' (defaults to 0)
StatusID         -> (optional) Status: 0=disabled, 1=enabled (defaults to 1)

Returns

1. ErrorFlag       (0 Good, 1 Bad)
2. Message         (String)
3. SLM Filter ID   (String)

Synopsis

my ($ErrorFlag, $Message, $SLMFilterID) = CreateSLMEventFilter({
    DBH              => \$DBH,
    NDB              => \$NDB,
    Config           => $Config,
    Log              => $Log,
    StorageHash      => $StorageHash,
    ParentID         => $ParentServiceID,
    Name             => "My SLM Filter",
    Field            => "EventID",
    Metric           => "COUNT",
    Operator         => ">",
    Value            => "0",
    Weight           => 1,
    WhereClause      => "Severity = 5",
    StatusID         => 1
});

if (!$SLMFilterID) {
    $Log->Message('ERROR', "Error Creating SLM Filter: $Message");
}

OR

my $SLMFilterID = CreateSLMEventFilter({
    DBH              => \$DBH,
    NDB              => \$NDB,
    Config           => $Config,
    Log              => $Log,
    StorageHash      => $StorageHash,
    ParentID         => $ParentServiceID,
    Name             => "My SLM Filter",
    Field            => "EventID",
    Metric           => "COUNT",
    Operator         => ">",
    Value            => "0",
    Weight           => 1,
    WhereClause      => "Severity = 5",
    StatusID         => 1
});

if (!$SLMFilterID) {
    $Log->Message('ERROR', "Error Creating SLM Filter");
}

CreateSLMMetric

Creates an SLM Metric vertex with appropriate properties and returns the new ID. If alreaady existing, returns an error

CreateSLMMetric(\%options)

Options

DBH                   -> Unified Assurance Database Handle Reference (i.e. \$DBH)
NDB                   -> Neo4j Database Handle Reference (i.e. \$NDB)
Config                -> Unified Assurance Config handle (i.e. $Config)
Log                   -> Unified Assurance Log handle (i.e. $Log)
StorageHash           -> Cache (i.e. $StorageHash)
ParentID              -> Parent Service ID
Name                  -> SLM Metric name
MetricID              -> MetricID to monitor
ThresholdType         -> Threshold type valid values: Avail, Util, Value
ThresholdID           -> (optional if Operator & Value specified) ThresholdID to associate or 0 for manual (defaults to 0)
Operator              -> (optional if ThresholdID specified) Manual threshold operator (valid values: '=', '!=', '>', '>=', '<', '<=')
Value                 -> (optional if ThresholdID specified) Manual threshold value
Weight                -> Weight to apply to violations bubbled up to parent (recommended=1)
WindowStatusID        -> (optional) Enable Maintenance Window support: 0=disabled, 1=enabled (defaults to 1)
OwnerUserID           -> (optional) Owner user ID or 0 for 'Public to All Users in Group' (defaults to 0)
OwnerUserGroupID      -> (optional) Owner user group ID or 0 for 'Public to All Groups' (defaults to 0)
StatusID              -> (optional) Status: 0=disabled, 1=enabled (defaults to 1)
Notify                -> (optional) Enable notifications: 0=disabled, 1=enabled (defaults to 0)
NotifyEmail           -> (optional) Notify email addresses
NotifyMessage         -> (ignored if Notify disabled optional if ThresholdID given) Notify Message (replaces $MESSAGE in template) (defaults to ThresholdID's if given)
NotifyProfileID       -> (ignored if Notify disabled optional if ThresholdID given) Notify profile to use to send (defaults to ThresholdID's if given)
NotifyTemplateID      -> (ignored if Notify disabled optional if ThresholdID given) Notify template to send (defaults to ThresholdID's if given)
TimeFilterStatusID    -> (optional) Enables time filtering: -1=all except, 0=disabled, 1=enabled (defaults to 0)
TimeFilterStartDayID  -> (ignored if TimeFilterStatusID disabled) start day ID (0=Sunday)
TimeFilterStopDayID   -> (ignored if TimeFilterStatusID disabled) end day ID (0=Sunday)
TimeFilterStartHourID -> (ignored if TimeFilterStatusID disabled) starting 24 hour ID (-1=All day)
TimeFilterStopHourID  -> (ignored if TimeFilterStatusID disabled) ending 24 hour ID

Returns

1. ErrorFlag       (0 Good, 1 Bad)
2. Message         (String)
3. SLM Metric ID   (String)

Synopsis

my ($ErrorFlag, $Message, $SLMMetricID) = CreateSLMMetric({
    DBH           => \$DBH,
    NDB           => \$NDB,
    Config        => $Config,
    Log           => $Log,
    StorageHash   => $StorageHash,
    ParentID      => $ParentServiceID,
    Name          => "My SLM Metric",
    MetricID      => $MetricID,
    ThresholdType => 'Util',
    ThresholdID   => $ThresholdID,
    Weight        => 1,
    StatusID      => 1,
    Notify        => 1
});

if (!$SLMMetricID) {
    $Log->Message('ERROR', "Error Creating SLM Metric: $Message");
}

OR

my $SLMMetricID = CreateSLMMetric({
    DBH           => \$DBH,
    NDB           => \$NDB,
    Config        => $Config,
    Log           => $Log,
    StorageHash   => $StorageHash,
    ParentID      => $ParentServiceID,
    Name          => "My SLM Metric",
    MetricID      => $MetricID,
    ThresholdType => 'Util',
    ThresholdID   => $ThresholdID,
    Weight        => 1,
    StatusID      => 1,
    Notify        => 1
});

if (!$SLMMetricID) {
    $Log->Message('ERROR', "Error Creating SLM Metric");
}

CreateSLMService

Creates a Service vertex with appropriate properties and returns the new ID. If already existing, returns an error

CreateSLMService(\%options)

Options

DBH                   -> Unified Assurance Database Handle Reference (i.e. \$DBH)
NDB                   -> Neo4j Database Handle Reference (i.e. \$NDB)
Config                -> Unified Assurance Config handle (i.e. $Config)
Log                   -> Unified Assurance Log handle (i.e. $Log)
StorageHash           -> Cache (i.e. $StorageHash)
ParentID              -> (optional) Parent Service ID or 0 for [Root] (defaults to 0)
Name                  -> SLM Metric name
Weight                -> Weight to apply to violations bubbled up to parent (defaults to 1)
OwnerUserID           -> (optional) Owner user ID or 0 for 'Public to All Users in Group' (defaults to 0)
OwnerUserGroupID      -> (optional) Owner user group ID or 0 for 'Public to All Groups' (defaults to 0)
StatusID              -> (optional) Status: 0=disabled, 1=enabled (defaults to 1)

-Event-
MetaEventID         -> Meta Event id to send on event-side threshold violations or 0 for none
EventOperator       -> Threshold operator (valid values: '=', '!=', '>', '>=', '<', '<=')
EventValue          -> Threshold value in percentage

-Metric-
PollTime            -> Time in seconds for service to be calculated by SLM Metric Collector
GaugeViewID         -> (optional) Gague display type. 1 for Linear, 2 for Logarithmic (defaults to 1)
WarningThresholdID  -> (optional if WarningOperator & WarningValue specified) Warning ThresholdID to associate or 0 for manual, -1 for none (defaults to 0)
WarningOperator     -> (optional if WarningThresholdID specified) Manual warning threshold operator (valid values: '=', '!=', '>', '>=', '<', '<=')
WarningValue        -> (optional if WarningThresholdID specified) Manual warning threshold value
CriticalThresholdID -> (optional if CriticalOperator & CriticalValue specified) Critical ThresholdID to associate or 0 for manual (defaults to 0)
CriticalOperator    -> (optional if CriticalThresholdID specified) Manual critical threshold operator (valid values: '=', '!=', '>', '>=', '<', '<=')
CriticalValue       -> (optional if CriticalThresholdID specified) Manual critical threshold value in percentage
Notify              -> (optional) Enable notifications: 0=disabled, 1=enabled (defaults to 0)
NotifyEmail         -> (optional) Notify email addresses
NotifyMessage       -> (ignored if Notify disabled optional if ThresholdID given) Notify Message (replaces $MESSAGE in template) (defaults to ThresholdID's if given)
NotifyProfileID     -> (ignored if Notify disabled optional if ThresholdID given) Notify profile to use to send (defaults to ThresholdID's if given)
NotifyTemplateID    -> (ignored if Notify disabled optional if ThresholdID given) Notify template to send (defaults to ThresholdID's if given)

Returns

1. ErrorFlag    (0 Good, 1 Bad)
2. Message      (String)
3. Service ID   (String)

Synopsis

my ($ErrorFlag, $Message, $ServiceID) = CreateSLMService({
    DBH           => \$DBH,
    NDB           => \$NDB,
    Config        => $Config,
    Log           => $Log,
    StorageHash   => $StorageHash,
    ParentID      => $ParentServiceID,
    Name          => "My Sub Service",
    Weight        => 1,
    StatusID      => 1,
    Notify        => 1,
    # Event
    MetaEventID   => $MetaEventID,
    EventOperator => '<',
    EventValue    => '80',
    # Metric:
    PollTime            => 300,
    WarningThresholdID  => -1,
    CriticalThresholdID => $ThresholdID,
    GagueViewID         => 2
});

if (!$ServiceID) {
    $Log->Message('ERROR', "Error Creating Service: $Message");
}

OR

my $ServiceID = CreateSLMService({
    DBH           => \$DBH,
    NDB           => \$NDB,
    Config        => $Config,
    Log           => $Log,
    StorageHash   => $StorageHash,
    ParentID      => $ParentServiceID,
    Name          => "My Sub Service",
    Weight        => 1,
    StatusID      => 1,
    Notify        => 1,
    # Event
    MetaEventID   => $MetaEventID,
    EventOperator => '<',
    EventValue    => '80',
    # Metric:
    PollTime            => 300,
    WarningThresholdID  => -1,
    CriticalThresholdID => $ThresholdID,
    GagueViewID         => 2
});

if (!$ServiceID) {
    $Log->Message('ERROR', "Error Creating Service");
}

DeleteSLMFilter

Convenience function to DeleteVertexID. Delete an SLM Filter ID.

DeleteSLMFilter(\%options)

Options

DBH         -> Unified Assurance Database Handle Reference (i.e. \$DBH)
NDB         -> Neo4j Database Handle Reference (i.e. \$NDB)
Config      -> Unified Assurance Config handle (i.e. $Config)
Log         -> Unified Assurance Log handle (i.e. $Log)
StorageHash -> Cache (i.e. $StorageHash)
ID          -> SLM Filter ID to delete

Returns

1. ErrorFlag   (0 Good, 1 Bad)
2. Message     (String)

Synopsis

my ($ErrorFlag, $Message) = DeleteSLMFilter({
    DBH         => \$DBH,
    NDB         => \$NDB,
    Config      => $Config,
    Log         => $Log,
    StorageHash => $StorageHash,
    ID          => $SLMFilterID
});

if ($ErrorFlag) {
    $Log->Message('ERROR', "Error Deleting SLM Filter: $Message");
}

DeleteSLMMetric

Convenience function to DeleteVertexID. Delete an SLM Metric ID.

DeleteSLMMetric(\%options)

Options

NDB         -> Neo4j Database Handle Reference (i.e. \$NDB)
Config      -> Unified Assurance Config handle (i.e. $Config)
Log         -> Unified Assurance Log handle (i.e. $Log)
StorageHash -> Cache (i.e. $StorageHash)
ID          -> SLM Metric ID to delete

Returns

1. ErrorFlag   (0 Good, 1 Bad)
2. Message     (String)

Synopsis

my ($ErrorFlag, $Message) = DeleteSLMMetric({
    NDB         => \$NDB,
    Config      => $Config,
    Log         => $Log,
    StorageHash => $StorageHash,
    ID          => $SLMMetricID
});

if ($ErrorFlag) {
    $Log->Message('ERROR', "Error Deleting SLM Metric: $Message");
}

DeleteSLMService

Convenience function to DeleteVertexID. Delete an SLM Service ID.

DeleteSLMService(\%options)

Options

NDB         -> Neo4j Database Handle Reference (i.e. \$NDB)
DBH         -> Unified Assurance Database Handle Reference (i.e. \$DBH)
Config      -> Unified Assurance Config handle (i.e. $Config)
Log         -> Unified Assurance Log handle (i.e. $Log)
StorageHash -> Cache (i.e. $StorageHash)
ID          -> SLM Service ID to delete

Returns

1. ErrorFlag   (0 Good, 1 Bad)
2. Message     (String)

Synopsis

my ($ErrorFlag, $Message) = DeleteSLMService({
    NDB         => \$NDB,
    DBH         => \$DBH,
    Config      => $Config,
    Log         => $Log,
    StorageHash => $StorageHash,
    ID          => $SLMServiceID
});

if ($ErrorFlag) {
    $Log->Message('ERROR', "Error Deleting SLM Service: $Message");
}

FindSLMFilterID

Convenience function to FindVertexID for SLM Filter vertex with Create = 0. Finds an SLM Filter ID based on the name and given parent (or -1 for any parent), returns undef if not found.

FindSLMFilterID(\%options)

Options

NDB         -> Neo4j Database Handle Reference (i.e. \$NDB)
DBH         -> Unified Assurance Database Handle Reference (i.e. \$DBH)
Config      -> Unified Assurance Config handle (i.e. $Config)
Log         -> Unified Assurance Log handle (i.e. $Log)
StorageHash -> Cache (i.e. $StorageHash)
Name        -> SLM Filter Name
ParentID    -> (Optional) Service Parent ID (-1=any (first occurence), defaults to -1)

Returns

1. ErrorFlag       (0 Good, 1 Bad)
2. Message         (String)
3. SLM Filter ID   (String)

Synopsis

my ($ErrorFlag, $Message, $SLMFilterID) = FindSLMFilterID({
    NDB         => \$NDB,
    DBH         => \$DBH,
    Config      => $Config,
    Log         => $Log,
    StorageHash => $StorageHash,
    ParentID    => $ServiceID,
    Name        => "My SLM Filter"
});

if (!$SLMFilterID) {
    $Log->Message('ERROR', "Error Finding SLM Filter: $Message");
}

OR

my $SLMFilterID = FindSLMFilterID({
    NDB         => \$NDB,
    DBH         => \$DBH,
    Config      => $Config,
    Log         => $Log,
    StorageHash => $StorageHash,
    ParentID    => $ServiceID,
    Name        => "My SLM Filter"
});

if (!$SLMFilterID) {
    $Log->Message('ERROR', "Error Finding SLM Filter");
}

FindSLMMetricID

Convenience function to FindVertexID for SLM Metric vertex with Create = 0. Finds an SLM Metric ID based on the name and given parent (or -1 for any parent), returns undef if not found.

FindSLMMetricID(\%options)

Options

NDB         -> Neo4j Database Handle Reference (i.e. \$NDB)
DBH         -> Unified Assurance Database Handle Reference (i.e. \$DBH)
Config      -> Unified Assurance Config handle (i.e. $Config)
Log         -> Unified Assurance Log handle (i.e. $Log)
StorageHash -> Cache (i.e. $StorageHash)
Name        -> SLM Metric Name
ParentID    -> (Optional) Service Parent ID (-1=any (first occurence), defaults to -1)

Returns

1. ErrorFlag       (0 Good, 1 Bad)
2. Message         (String)
3. SLM Metric ID   (String)

Synopsis

my ($ErrorFlag, $Message, $SLMMetricID) = FindSLMMetricID({
    NDB         => \$NDB,
    DBH         => \$DBH,
    Config      => $Config,
    Log         => $Log,
    StorageHash => $StorageHash,
    ParentID    => $ServiceID,
    Name        => "My SLM Metric"
});

if (!$SLMMetricID) {
    $Log->Message('ERROR', "Error Finding SLM Metric: $Message");
}

OR

my $SLMMetricID = FindSLMMetricID({
    NDB         => \$NDB,
    DBH         => \$DBH,
    Config      => $Config,
    Log         => $Log,
    StorageHash => $StorageHash,
    ParentID    => $ServiceID,
    Name        => "My SLM Metric"
});

if (!$SLMMetricID) {
    $Log->Message('ERROR', "Error Finding SLM Metric");
}

FindSLMServiceID

Convenience function to FindVertexID for SLM Service vertex with Create = 0. Finds an SLM Service ID based on the name and given parent (or -1 for any parent), returns undef if not found.

FindSLMServiceID(\%options)

Options

NDB         -> Neo4j Database Handle Reference (i.e. \$NDB)
DBH         -> Unified Assurance Database Handle Reference (i.e. \$DBH)
Config      -> Unified Assurance Config handle (i.e. $Config)
Log         -> Unified Assurance Log handle (i.e. $Log)
StorageHash -> Cache (i.e. $StorageHash)
Name        -> Service Name
ParentID    -> (Optional) Service Parent ID (-1=any (first occurence), 0=top level, defaults to -1)

Returns

1. ErrorFlag       (0 Good, 1 Bad)
2. Message         (String)
3. SLM Service ID  (String)

Synopsis

my ($ErrorFlag, $Message, $SLMServiceID) = FindSLMServiceID({
    NDB         => \$NDB,
    DBH         => \$DBH,
    Config      => $Config,
    Log         => $Log,
    StorageHash => $StorageHash,
    ParentID    => $ServiceID,
    Name        => "My SLM Service"
});

if (!$SLMServiceID) {
    $Log->Message('ERROR', "Error Finding SLM Service: $Message");
}

OR

my $SLMServiceID = FindSLMServiceID({
    NDB         => \$NDB,
    DBH         => \$DBH,
    Config      => $Config,
    Log         => $Log,
    StorageHash => $StorageHash,
    ParentID    => $ServiceID,
    Name        => "My SLM Service"
});

if (!$SLMServiceID) {
    $Log->Message('ERROR', "Error Finding SLM Service");
}

UpdateSLMFilter

Updates an SLM Filter vertex. If doesn't exist, returns an error.

UpdateSLMFilter(\%options)

Options

DBH         -> Unified Assurance Database Handle Reference (i.e. \$DBH)
NDB         -> Neo4j Database Handle Reference (i.e. \$NDB)
Config      -> Unified Assurance Config handle (i.e. $Config)
Log         -> Unified Assurance Log handle (i.e. $Log)
StorageHash -> Cache (i.e. $StorageHash)
SLMFilterID -> SLM Filter ID to update
SLMFilter   -> SLM Filter hash ref containing at least one related property & new value.
               See CreateSLMEventFilter for list of supported properties. If a supported property is not given, no change is made to it.

Returns

1. ErrorFlag       (0 Good, 1 Bad)
2. Message         (String)
3. SLM Filter ID   (String)

Synopsis

my ($ErrorFlag, $Message) = UpdateSLMFilter({
    DBH         => \$DBH,
    NDB         => \$NDB,
    Config      => $Config,
    Log         => $Log,
    StorageHash => $StorageHash,
    SLMFilterID => $SLMFilterID,
    SLMFilter   => {
        Name        => "My Updated SLM Filter",
        WhereClause => "Severity = 4",
        StatusID    => 0
    }
});

if ($ErrorFlag) {
    $Log->Message('ERROR', "Error Updating SLM Filter: $Message");
}

OR

$ErrorFlag = UpdateSLMFilter({
    DBH         => \$DBH,
    NDB         => \$NDB,
    Config      => $Config,
    Log         => $Log,
    StorageHash => $StorageHash,
    SLMFilterID => $SLMFilterID,
    SLMFilter   => {
        Name        => "My Updated SLM Filter",
        WhereClause => "Severity = 4",
        StatusID    => 0
    }
});

if ($ErrorFlag) {
    $Log->Message('ERROR', "Error Updating SLM Filter");
}

UpdateSLMMetric

Updates an SLM Metric vertex. If doesn't exist, returns an error.

UpdateSLMMetric(\%options)

Options

DBH         -> Unified Assurance Database Handle Reference (i.e. \$DBH)
NDB         -> Neo4j Database Handle Reference (i.e. \$NDB)
Config      -> Unified Assurance Config handle (i.e. $Config)
Log         -> Unified Assurance Log handle (i.e. $Log)
StorageHash -> Cache (i.e. $StorageHash)
SLMMetricID -> SLM Metric ID to update
SLMMetric   -> SLM Metric hash ref containing at least one related property & new value.
                    See CreateSLMMetric for list of supported properties. If a supported property is not given, no change is made to it.

Returns

1. ErrorFlag       (0 Good, 1 Bad)
2. Message         (String)
3. SLM Metric ID   (String)

Synopsis

my ($ErrorFlag, $Message) = UpdateSLMMetric({
    DBH         => \$DBH,
    NDB         => \$NDB,
    Config      => $Config,
    Log         => $Log,
    StorageHash => $StorageHash,
    SLMMetricID => $SLMFilterID,
    SLMMetric   => {
        Name      => "My Updated SLM Metric",
        MetricID  => $MetricID,
        StatusID  => 0
    }
});

if ($ErrorFlag) {
    $Log->Message('ERROR', "Error Updating SLM Metric: $Message");
}

OR

$ErrorFlag = UpdateSLMMetric({
    DBH         => \$DBH,
    NDB         => \$NDB,
    Config      => $Config,
    Log         => $Log,
    StorageHash => $StorageHash,
    SLMMetricID => $SLMFilterID,
    SLMMetric   => {
        Name      => "My Updated SLM Metric",
        MetricID  => $MetricID,
        StatusID  => 0
    }
});

if ($ErrorFlag) {
    $Log->Message('ERROR', "Error Updating SLM Metric");
}

UpdateSLMService

Updates an SLM Service vertex. If doesn't exist, returns an error.

UpdateSLMService(\%options)

Options

DBH         -> Unified Assurance Database Handle Reference (i.e. \$DBH)
NDB         -> Neo4j Database Handle Reference (i.e. \$NDB)
Config      -> Unified Assurance Config handle (i.e. $Config)
Log         -> Unified Assurance Log handle (i.e. $Log)
StorageHash -> Cache (i.e. $StorageHash)
ServiceID   -> SLM Service ID to update
Service     -> SLM Service hash ref containing at least one related property & new value.
               See CreateSLMService for list of supported properties. If a supported property is not given, no change is made to it.

Returns

1. ErrorFlag       (0 Good, 1 Bad)
2. Message         (String)
3. SLM Service ID  (String)

Synopsis

my ($ErrorFlag, $Message) = UpdateSLMMetric({
    DBH         => \$DBH,
    NDB         => \$NDB,
    Config      => $Config,
    Log         => $Log,
    StorageHash => $StorageHash,
    ServiceID   => $ServiceID,
    Service     => {
        Name      => "My Updated SLM Service",
        PollTime  => 300,
        StatusID  => 0
    }
});

if ($ErrorFlag) {
    $Log->Message('ERROR', "Error Updating SLM Service: $Message");
}

OR

$ErrorFlag = UpdateSLMService({
    DBH         => \$DBH,
    NDB         => \$NDB,
    Config      => $Config,
    Log         => $Log,
    StorageHash => $StorageHash,
    ServiceID   => $ServiceID,
    Service     => {
        Name      => "My Updated SLM Service",
        PollTime  => 300,
        StatusID  => 0
    }
});

if ($ErrorFlag) {
    $Log->Message('ERROR', "Error Updating SLM Service");
}