Is it possible, based on a certain sensor treshold or state (down/up) to trigger an output on any, but for instance above mentioned device?

We need to trigger several inputs (non IP) so we want to connect a IP based output unit (several outputs) so we can trigger those.

Any idea on how to configure this? And how to only trigger a specific output?


Article Comments

Hi,
we have not tested this so I cannot guarantee if this will work but you might have a look at the EXE Notifications. Those can be used to trigger a script on a certain sensor state, so if you are able to access the device using a script you might give this a try.
best regards


Jul, 2015 - Permalink

I'm going to contact Axis if their unit (P8221) supports it, or what it supports else...

Get back here after that.


Jul, 2015 - Permalink

They Say it is possible using a "HTTP" request, is that possible with PRTG?

Other thing that popped my mind is: can PRTG send SNMP traps maybe?


Jul, 2015 - Permalink

Hi there,

You can create Notifications and choose

  • Execute HTTP Action
  • Send SNMP Trap

Afterwards, you can add a state trigger to the device or sensor to send the HTTP request or SNMP Trap.

Best regards


Jul, 2015 - Permalink

Hi,

I figured out to do a http trigger on the device and the Output did indeed get triggered.

However when i try it from PRTG nothing happens.

In the log of the device we get a "unauthorized" message, could make sense that i need to add the user credentials for the I/O unit in PRTG, been searching but i can't figure out where!

I need to create around 60 http sensors with the unique strings to trigger all the Outputs on several devices.

Thank you and kind regars.


Jul, 2015 - Permalink

Hi,

You can add Postdata to the HTTP POST in the settings of the notifications. If this is not accepted by the target device, you will need to create a custom script which is triggered by the notification. You can create a notification with Execute Program.

Best regards


Jul, 2015 - Permalink

Yes i saw that, but i don't have any clue to know "how" to put the credentials in there.

I have a running case with Axis, but it was very difficult to get the string for triggering the output via http, i doubt if i ever get the info like this......

Do you have any experience with that, like some "common practise"?


Jul, 2015 - Permalink

Hi,

I'm afraid that we do not have these devices in our test environment and it depends on the API of the Axis device, so I cannot assist you in this case, sorry.

In PRTG, the credentials are simply appended to the URL:

/api/getsensordetails.xml?id=sensorid&username=name&password=pass

Best regards


Jul, 2015 - Permalink

Well, scratch that! They do have that information and they shared it with me.

I have it all working now, i can trigger the output and turn it off after a predefined amount of time using a single URL.

So let me share it here:

In order to open an output contact (nr 1):

http://uname:password@mydeviceIP/axis-cgi/io/port.cgi?action=1:/

In order to close an output contact (nr 1):

http://uname:password@mydeviceIP/axis-cgi/io/port.cgi?action=1:\

In order to open and close (2 seconds) a contact (nr 1):

http://uname:password@mydeviceIP/axis-cgi/io/port.cgi?action=1:/2000\

The url for opening a contact without username and password:

http://mydeviceIP/axis-cgi/io/port.cgi?action=1:/


Jul, 2015 - Permalink

Thanks for sharing the solution with the community! Good to hear that it's working now.


Jul, 2015 - Permalink