What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

EXE/Script Sensor Does not Send Email

Votes:

0

Hello,

I have a Custom Exe/Script sensor that does not send an email notification when in down status. When in a "down" state, the sensor will change to a red/error state in the console, but no email notification to the admin. When the sensor is back to a "up/OK" state a notification email is sent to the admin notifying of the state to "up".

In the code below, "0:OK" works great and sends a notification email and changes status in the console, but the ELSE clause with "2:ERROR" does not send an email only changes status in the console. I am guessing there is something wrong with my exit code in the ELSE clause???

If State = "2" Then
	WScript.echo "0:OK"
	WScript.Quit ("0")
Else
	WScript.echo "2:ERROR"
	WScript.Quit ("2")
End If

Thanks, Tim

custom-script-exe exe-script-sensor exitcode

Created on Aug 29, 2017 3:32:25 PM



1 Reply

Votes:

0

Dear CosmosCreations,

so the 'down' trigger does not work, but the trigger for 'condition clears'?

Please contact us at [email protected] and include screenshots of

  • the sensor overview tab
  • the sensor logs tab
  • the notifications tab

Created on Aug 29, 2017 6:19:17 PM by  Arne Seifert [Paessler Support]

Last change on Aug 29, 2017 6:34:16 PM by  Arne Seifert [Paessler Support]




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.