New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

300.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


Return codes does not effect prtg status

Votes:

0

Your Vote:

Up

Down

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.

api c# custom-sensor

Created on Feb 5, 2014 10:06:17 AM by  Spawn (0) 1



2 Replies

Votes:

0

Your Vote:

Up

Down

I solved it by myself :)

The solution is to use Exit.Enviroment(3);

Created on Feb 5, 2014 3:14:02 PM by  Spawn (0) 1



Votes:

0

Your Vote:

Up

Down

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

Created on Feb 5, 2014 3:23:22 PM by  Torsten Lindner [Paessler Support]



Please log in or register to enter your reply.


Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.