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

Trying to set trafficmode property for sensors via the API

Votes:

0

I am trying to set the "Additional Channels" setting via the API for SNMP Traffic Sensors. I seem to be only be able to set one value at a time (IE: errrors or discards, but not both). Is there a way to set more then one via the API?

Examples:

Sets errors https://<server>/setobjectproperty.htm?id=<objid>&name=trafficmode&value=errors&username=<user>&passhash=<hash>

Sets discards, unsets errors https://<server>/setobjectproperty.htm?id=<objid>&name=trafficmode&value=discards&username=<user>&passhash=<hash>

If I try doing value=errors,discards or value=Errors In &amp; Out<br>Discards In &amp; Out<br> none are set.

Running the latest stable version.

api setobjectproperty snmp

Created on Aug 15, 2018 4:01:02 PM



2 Replies

Votes:

0

Hi there,

You can use the backend-api call of PRTG (the ones used to change the settings via the webinterface):

http(s)://<server>/editsettings?id=<SENSORID>&username=<user>&passhash=<hash>&trafficmode_=standinfornoselection&trafficmode_=errors&trafficmode_=discards&trafficmode_=unicast&trafficmode_=nonunicast&trafficmode_=multicast&trafficmode_=broadcast&trafficmode_=unknown

The above call will enable all Additional Channels. To just activate two, delete the other channels from the call (delete "trafficmode_=errors" for example).

Best regards.

Created on Aug 16, 2018 11:05:40 AM by  Dariusz Gorka [Paessler Support]



Votes:

0

That did the trick. It would be great if this could be done as regular API call (feature request), so that the return can be easily parsed to know if the call was good or not rather then getting the full html page for the object (sensor in this case).

Created on Aug 16, 2018 1:46:39 PM




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.