Comments
-
So what worked. This is what I put in my body: { "syslog": "${N=SWQL;M=SELECT top 1 SubString('${N=OLM.AlertingMacros;M=OLMAlertMessage.EventMessage}', 0, length('${N=OLM.AlertingMacros;M=OLMAlertMessage.EventMessage}')) as minus1 from orion.nodes n}" } The json that hit my server was: "{\"syslog\":…
-
Both of these pluck the actual alarm off but the POST sent includes the SQL (and still doesn't pass a json validator)
-
Here is what I get when I try that: { SELECT top 1 SubString('2053846 RP/0/RSP0/CPU0:Oct 18 17:54:58.272 EDT: envmon[212]: %PLATFORM-ENVMON-2-SAT_DOM_SENSOR_ALARM : [Satellite 100]: ALARM_LOW alarm occurred for DOM sensor type TXPOWER and port number 11 ', 0, length('2053846 RP/0/RSP0/CPU0:Oct 18 17:54:58.272 EDT:…
-
I bet I am doing someting wrong here with the defining of the SQWL variables. In the diaglog box under advanced I am entering: SELECT top 1 SubString(${N=OLM.AlertingMacros;M=OLMAlertMessage.EventMessage}", 0, length(${N=OLM.AlertingMacros;M=OLMAlertMessage.EventMessage}")) as minus1 from orion.nodes n I click insert…
-
I'm using flask to run a simple webhook server. Then I can use python functions within to process and send the data to various destinations. I will give the customer swql a go here soon.
-
Thanks for the response. Interesting that the variable does in fact add a space. You think there is something going on with my flask route? That section is fairly basic: @app.route('/webhook', methods=['POST']) def solarwinds_alert(): # Parse the incoming JSON alert from SolarWinds alert_data = request.json Can you expound…