Is it possible to have a sensor like http Content which can handle real Content like Strings.
We have some Status Websites with the following simple text output
Status: [OK] Info: [Everything OK]
Now it would be nice to have a sensor that can handle the two words in [ ] as a channel like the http content sensor. But with that i got an "Unexpected Format: OK" error...
The Info als can have values like "Import of File was not successfully" and so on.
Any solution for this?
Article Comments
That works.
But with "HTTP Advanced Sensor" it is not possible to Display the Website Output.
I will try it with a costum sensor and a vbs script.
Dec, 2014 - Permalink
Now we have created our own "Costum Sensor" with a vbs check Here the vbs file
'GetHTMLSource.vbs args = WScript.Arguments.Count if args <> 1 then Wscript.Echo "usage: GetHTMLSource.vbs URL" wscript.Quit end if URL = WScript.Arguments.Item(0) Set WshShell = WScript.CreateObject("WScript.Shell") Set http = CreateObject("Microsoft.XmlHttp") http.open "GET", URL, FALSE http.send "" responseText = http.responseText if InStr(http.responseText,"OK") > 0 then WScript.Echo "0:" & http.responseText Wscript.quit ("0") Elseif InStr(http.responseText,"WARNING") > 0 then WScript.Echo "1:" & http.responseText Wscript.quit ("1") Elseif InStr(http.responseText,"CRITICAL") > 0 then WScript.Echo "1:" & http.responseText Wscript.quit ("2") Elseif InStr(http.responseText,"UNKNOWN") > 0 then WScript.Echo "1:" & http.responseText Wscript.quit ("2") Else WScript.Echo "1:result not valid" Wscript.quit ("1") End if
Dec, 2014 - Permalink
Please look the Sensor "HTTP Advanced Sensor" with the option "Check For Existing Key Words" this should help you. Enable key word check (positive) : In the result returned at the URL, check if a key word exists.
https://www.paessler.com/manuals/prtg/http_advanced_sensor.htm
Hope it helps!
Dec, 2014 - Permalink