This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Mute alerts for a group

Is it possible to mute alerts for a group?

  • The Manage Nodes and Manage Entities pages don't currently allow you to suppress alerting by group. If you have a custom property assigned to each node in the group, you can use that to display your nodes in the Manage Nodes page and mute the alerting.

  • This sounds like a Feature Request to me . . .

    pastedImage_0.png

  • I also had this question.

    I have attempted to achieve this task through the Orion SDK using Powershell, since there is no way to do it from the UI. This can be used as a workaround if needed...

    I believe I have achieved this by using the following code:

    # Load the SwisSnapin

    Add-PSSnapin "SwisSnapin"

    # Get Swis Connection Info

    $username = Read-Host "Enter Username"

    $SecurePassword = Read-Host "Enter Password"  -AsSecureString

    $BSTR = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($SecurePassword)

    $Password = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR)

    $OrionServer = "OrionServer"

    $swis = Connect-Swis $OrionServer -UserName $Username -Password $password

    # You can get the URI by using $URI = Get-SwisData $swis "SELECT URI FROM Orion.Container WHERE Name LIKE 'WhateverGroupHere'"

    $URI = "Some Group's URI HERE"

    # This is the line that Mutes the group for Alerts

    Invoke-SwisVerb $swis -verb "SuppressAlerts" -EntityName Orion.AlertSuppression @(,@([string]$URI))

    # Checking if the group is muted or not.

    $MutedOrNot = Invoke-SwisVerb $swis -verb "getAlertSuppressionState" -EntityName Orion.AlertSuppression @(,@([string]$URI))

    $MutedOrNot = $MutedOrNot.InnerText.Replace($URI,"")

    if($MutedOrNot -match "\."){$MutedOrNot = ($MutedOrNot -replace '(\d)').Split(".")[1]}

    $MutedOrNot

    # If you want to unmute the group for alerts, uncomment this line of code:

    #Invoke-SwisVerb $swis -verb "ResumeAlerts" -EntityName Orion.AlertSuppression @(,@([string]$URI))

    Thanks,

    Jordan

  • Can this be done for an specific group of nodes? Like reading node names from a text file.

    Thanks in advance

    Adrian

  • In theory you could feed node names in from a text file, pull the URI for those nodes, and put them in an array. Someone much smarter than me will have to figure that one out, though emoticons_happy.png