Hello,
I wrote an custom sensor in C#. I want to create and alert, so I wrote the following statement:
Console.Write(Convert.ToInt64(3)+":" + failLocation);
This fairly works, except that the status bar in prtg is still green. Though the message I get is correct.
Article Comments
Hello,
thank you very much for your KB-Post. It seems that your script returns the value:message for the sensor. To set the sensor into an error/warning state, please use the exit code of the script:
Value Description 0 OK 1 WARNING 2 System Error (e.g. a network/socket error) 3 Protocol Error (e.g. web server returns a 404) 4 Content Error (e.g. a web page does not contain a required word)
best regards
Feb, 2014 - Permalink
I solved it by myself :)
The solution is to use
Exit.Enviroment(3);
Feb, 2014 - Permalink