I need help with some issues I am running into when I try and get SW to execute a VB script for an Adv Alert.
First thing is I choose to go with a VB Script because Adv Alerts do not have the option to GET or POST to HTTP. So I am using a template a co worker gave me. I use the HTTP GET to open a ticket in our support software at work when an alert is triggered. I can get the script to fire off and open a ticket in our software but only when I manually fill in the macros.
How do I get the script to pull the values listed below? i know the values work I tested them with a email alert.
customer_group_id=${customer_group_id}
CustomerName=${CustomerName}
NodeName=${NodeName}
InterfaceCaption=${InterfaceCaption}
Status=Down
DateTime=${DateTime}
MonitorLevel=${MonitorLevel}
SerialNumber=${SerialNumber}
Here is a copy of the script.
'function http_fetch(URL)
' URL = "">http://localhost:15078" & URL
URL = "https://********.*************.com/solarwinds/submit.asp?agent_key=(For My Eyes Only)&customer_group_id=${customer_group_id}&CustomerName=CoSentry&NodeName=${NodeName}&InterfaceCaption=${InterfaceCaption}&Status=Down&DateTime=${DateTime}&MonitorLevel=${MonitorLevel}&SerialNumber=${SerialNumber}"
dim XMLHTTP,Retcode
set XMLHTTP = CreateObject("MSXML2.ServerXMLHTTP")
XMLHTTP.Open "GET",URL,False
XMLHTTP.Send
if XMLHTTP.Status >= 400 and XMLHTTP.Status <= 599 then
if Application("SystemType") = "dev" then
ErrorOut "HTTP Request to " & URL & " failed: " & XMLHTTP.Status & chr(13) & XMLHTTP.StatusText & chr(13) & XMLHTTP.ResponseText
else
ErrorOut "HTTP Request to " & URL & " failed: " & XMLHTTP.Status & " " & XMLHTTP.StatusText
end if
end if
HTTP_Fetch = XMLHTTP.ResponseText
set XMLHTTP = Nothing
'end function