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.

Slack Alerts Integration Issue

Hello,

Props to chad.every​ for making these great awesome slack integration alert, everyone should definitely have a look at his scripts

Slack Alert Integration - Overview

I am having an issue with one of the scripts though, For some reason, it does not seem to properly send the data over to slack, in particular, the Memory Module

pastedImage_0.png

Should like something like (Props to chad.every​)

2016-05-05 14_30_05-Slack - LehiSalesEngineering.png

Here is the snippet below of the settings

Here is the snippet of the Alert settings, For some reason it doesn't look like it is not sending the $ORIONTIME? but for all his other scripts, they work excellent, just the "MEMORY POwershel",

I have attached the link of the script https://thwack.solarwinds.com/servlet/JiveServlet/downloadBody/188402-102-4-29570/

Another pair of eyes would be appreciated emoticons_happy.png

pastedImage_0.pngpastedImage_1.png

pastedImage_4.pngpastedImage_5.png

Path I used from your snippet

C:\windows\system32\windowspowershell\v1.0\powershell.exe -ExecutionPolicy unrestricted -command "C:\curl\ps\Slack_Alert_Trigger_Action_Node_Memory.ps1 '${N=SwisEntity;M=DisplayName}' '${N=SwisEntity;M=Stats.PercentMemoryUsed}' '${N=SwisEntity;M=MemoryUsed}' '${N=SwisEntity;M=TotalMemory}' '${N=SwisEntity;M=PercentMemoryUsedThreshold.IsLevel1State}' '${N=SwisEntity;M=PercentMemoryUsedThreshold.IsLevel2State}' '${N=Alerting;M=AlertDetailsUrl}' '${N=SwisEntity;M=DetailsUrl}' '${N=Alerting;M=AcknowledgeUrl}' '${N=Generic;M=DateTime;F=OriginalValue}'"

From the powershell script - I Simply downloaded the link provided by your original post - The only area I have modified was the Token and Channel

  • Sorry for the delay. The script should output to a log file. I checked mine and it was blank...it you're is working then it should include what each alert variable is reporting.  it is found on your Orion server here:
    C:\ProgramData\SolarWinds\Logs

    If yours is blank too then i might need to figure out why and update the script so we can continue troubleshooting.

  • Hello,

    Yes I checked the location as mentioned and is indeed blank, it looks to be outputting fine, sorry, not pushing you in anyways, i am just stumped why its parsing over like this in Slack....

    [03/22/2018 14:53:51] - INFO -

    Thanks

    Steve

  • Looks like there is an extra alert variable in my write up. Drop this variable from the alert action

    '${N=SwisEntity;M=TotalMemory}'

    The new path should look like:

    C:\windows\system32\windowspowershell\v1.0\powershell.exe -ExecutionPolicy unrestricted -command "C:\curl\ps\Slack_Alert_Trigger_Action_Node_Memory.ps1 '${N=SwisEntity;M=DisplayName}' '${N=SwisEntity;M=Stats.PercentMemoryUsed}' '${N=SwisEntity;M=MemoryUsed}' '${N=SwisEntity;M=PercentMemoryUsedThreshold.IsLevel1State}' '${N=SwisEntity;M=PercentMemoryUsedThreshold.IsLevel2State}' '${N=Alerting;M=AlertDetailsUrl}' '${N=SwisEntity;M=DetailsUrl}' '${N=Alerting;M=AcknowledgeUrl}' '${N=Generic;M=DateTime;F=OriginalValue}'"

    It should display as follows once you do that.

    pastedImage_0.png

    I'll update my original post with exclude it.

    C:\windows\system32\windowspowershell\v1.0\powershell.exe -ExecutionPolicy unrestricted -command "C:\curl\ps\Slack_Alert_Trigger_Action_Node_Memory.ps1 '${N=SwisEntity;M=DisplayName}' '${N=SwisEntity;M=Stats.PercentMemoryUsed}' '${N=SwisEntity;M=MemoryUsed}' '${N=SwisEntity;M=TotalMemory}' '${N=SwisEntity;M=PercentMemoryUsedThreshold.IsLevel1State}' '${N=SwisEntity;M=PercentMemoryUsedThreshold.IsLevel2State}' '${N=Alerting;M=AlertDetailsUrl}' '${N=SwisEntity;M=DetailsUrl}' '${N=Alerting;M=AcknowledgeUrl}' '${N=Generic;M=DateTime;F=OriginalValue}'"
  • You sir are a champion, really appreciate the time and effort you looking into this, thank you so much ! one happy slacker here now emoticons_silly.png 

  • Am trying to integrate the solarwinds with slack its not working am getting the  log WARNING - The underlying connection was closed: An unexpected error occurred on a send ​kindly help me in this case.

  • Hi Chad,

    I'm still getting an error, I tried your amended new path and I am getting the following:

    pastedImage_0.png

    Any assistance you can give would be most appreciated.

    Regards,

    Dave