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.

Invoking SupressAlerts API is not reflected in Web Console

I've successfully used the swis API to invoke SupressAlerts for a node (uri) but the supression state is not reflected in Web Console.

I can Invoke GetAlertSupressioState and use SWQL Studio to check that indeed the node has Alerts Suppressed.

(Not sure it if matters, but I did not provide any from or until parameters, they are supposed to be optional)

UPDATE:

I've also confirmed that even when I set SuppressAlerts via API and use the the Alert Manger to edit an alert, the Alert Engine will still send an alert when testing

If I use Web Console to Mute Alerts and try the the same test the Alert Manager will honor the Mute Alert setting and not show the node in the list of node that will trigger the alert.

POST I'm using to suppress:

localhost:17778/.../SuppressAlerts

Payload:

[ [ "swis://localhost/Orion/Orion.Nodes/NodeID=1398" ] ]

Results from GetAlertSupressionState:

[

    {

        "EntityUri": "swis://localhost/Orion/Orion.Nodes/NodeID=1398",

        "SuppressedParentUri": null,

        "SuppressionMode": 1,

        "SuppressedFrom": "2018-12-12T23:25:04.963",

        "SuppressedUntil": null

    }

]

Web Console does not reflect that Alerts are Suppressed in managed nodes:

pastedImage_1.png

Same on Node Details Page:

pastedImage_2.png

If I use Web Console to Mute alerts - both show that Alerts are Muted as status:

pastedImage_4.png

pastedImage_3.png

Is this a known bug with the the API?

  • tdanner​ Any feed back on this issue I've run into using the AlertSuppresison/SuppressAlerts. The action is working through SWIS and can be confirmed through SWIS but the status in not getting reflected in the Web Console UI.

    What can I do to troubleshoot?

    -marc

  • Hello marcv​,

    I tried suppressing node using SDK in my environment and node was successfully muted/suppressed - I verified it in Web Console.

    This is the request I send to Orion:

    curl --header "Content-Type: application/json" --request POST --data '[ [ "swis://WIN-8UIFHR6MOER./Orion/Orion.Nodes/NodeID=1" ] ]' --user "admin:" -k 10.140.66.64:17778/.../SuppressAlerts

    During testing I found out that node URI must be correct otherwise the node is not muted.

    I resolved correct node URI in SWQL Studio

    • using query: select NodeId, Uri from Orion.Nodes
    • or by muting alert in Web console and running query "SELECT ID, EntityUri, SuppressFrom, SuppressUntil FROM Orion.AlertSuppression" and looking for specific muted node URI

    In case I provided URI with other hostname (e.g. swis://localhost/Orion/Orion.Nodes/NodeID=1398 instead of swis://WIN-8UIFHR6MOER./Orion/Orion.Nodes/NodeID=1)  the node was not suppressed correctly.

    If this will not help you, I will need more information to narrow down the problem - could you please provide your Orion version and exact curl request you are creating (with blanked IP address and credentials)?

  • Hi tomas.vrabel

    Thanks for the reply.

    I've been using "localhost" in the URI because the integration scripts I'm writing are executed on the Orion server.

    I'll revisit this later in the week, and rewrite my code to update the how I build the URI.

    I'm working from a different remote office this week and testing is a bit hampered from that location.

    I'll try using curl too, to eliminate any Postman overhead. BTW the integration code I'm trying to implement is being done through javascript.

    What's strange is after I make the API call using my code or my Postman test rig, the updated status (Suppressed aka Muted) is reflected correctly when queried using the API (like in SWQL Studio) or through Postman - but the Web console does not.

    To answer your question about my environment:

    Current Product Versions:

    Orion Platform 2018.2 HF6, WPM 2.2.2, NPM 12.3, DPAIM 11.1.0, SAM 6.7.0, NetPath 1.1.3

    MPE, AWS and DB servers are W2K12 R2 and DB is SQL 2012 SP1.

    (I need to upgrade my server infrastructure before I can update to any newer SolarWinds components

    -marc

  • Thank you,

    I tested on Orion Platform 2018.4 and you on Orion Platform 2018.2 HF6 but I don't think this makes any difference.

    I would try to put correct URI into the call. Please try to resolve it from Orion and not construct by yourself. Orion URI works differently than web URI (e.g. comparison rules).

    Regarding difference between API and Web - I saw similar behaviour. When I provided incorrect URI, API was able to show the data correctly but Web was not able to interpret the URI and recognize related Orion node. This is probably because API just show raw (and possibly inconsistent) data but web (and rest of Orion) tries to interpret data and fails so the node is not muted.

    In case this will not work I will check whether we did some fix in the feature - upgrade would help then.

  • tomas.vrabel  I believe you were right about the the URI. I hardcoded it to what is being shown when I query. In this case the UR is using the the FQDN of our original instance before we upgraded.

    On top of that, I do no thin the javascript function where  I built the the Payload string played nicely when I had some spaces between the bracket for the payload string.

    [["URI"]] versus [ [ "URI" ] ]

    After changing the URI and removing those spaces when I invoke Alert Suppression now it is reflected in the Console

    pastedImage_1.png

    and in Audited Events.

    pastedImage_0.png