I'm trying to change the OID's of a SNMPCustomSensor by using the API setobjectproperty method. PRTG returns OK, but the value hasn't changed.
Probably I'm not using not the correct subid=channelid &name=property_name. At least none of the combo's I've tried seem to work. What do I miss here?
In de example it is: Sensor Channel #2 OID I try to change.
According to html that is channel2oid_ (with or without _ ?):
<input class="text valid" data-rule-oid="true" data-rule-required="true" type="text" name="channel2oid_" id="channel2oid_" autocomplete="off" value="1.3.6.1.4.1.2011.6.139.13.3.3.1.40.0" aria-required="true" aria-invalid="false">
According to prtg edit channel it is: Name: Memory Usage ID: 3
So I tried (without luck) the ChannelID : Property_Name Combo's:
2 : channel2oid
https://myurl/api/setobjectproperty.htm?id=17548&subid=2&subtype=channel&name=channel2oid&value=1.3.6.1.4.1.2011.6.139.13.3.3.1.40.252.227.60.177.214.96
2 : channel2oid_
https://myurl/api/setobjectproperty.htm?id=17548&subid=2&subtype=channel&name=channel2oid_&value=1.3.6.1.4.1.2011.6.139.13.3.3.1.40.252.227.60.177.214.96
3 : channel2oid
https://myurl/api/setobjectproperty.htm?id=17548&subid=3&subtype=channel&name=channel2oid&value=1.3.6.1.4.1.2011.6.139.13.3.3.1.40.252.227.60.177.214.96
3 : channel2oid_
https://myurl/api/setobjectproperty.htm?id=17548&subid=3&subtype=channel&name=channel2oid_&value=1.3.6.1.4.1.2011.6.139.13.3.3.1.40.252.227.60.177.214.96
channel2oid_ : channel2oid_
https://myurl/api/setobjectproperty.htm?id=17548&subid=channel2oid_&subtype=channel&name=channel2oid_&value=1.3.6.1.4.1.2011.6.139.13.3.3.1.40.252.227.60.177.214.96
channel2oid : channel2oid
https://myurl/api/setobjectproperty.htm?id=17548&subid=channel2oid&subtype=channel&name=channel2oid&value=1.3.6.1.4.1.2011.6.139.13.3.3.1.40.252.227.60.177.214.96
channel2oid_ : channel2oid
https://myurl/api/setobjectproperty.htm?id=17548&subid=channel2oid_&subtype=channel&name=channel2oid&value=1.3.6.1.4.1.2011.6.139.13.3.3.1.40.252.227.60.177.214.96
channel2oid : channel2oid_
https://myurl/api/setobjectproperty.htm?id=17548&subid=channel2oid&subtype=channel&name=channel2oid_&value=1.3.6.1.4.1.2011.6.139.13.3.3.1.40.252.227.60.177.214.96
Anyone?
Thanks in advance!
Hello, thank you for your post.
Please keep in mind that the OID is a setting from the sensor, so you need to change the sensor, not the channel. Within the settings of an "SNMP Custom" sensor, you will locate the following when inspecting the OID Value input field:
It tells us that oid if the setting that we're looking to change. In this case, the URL to change sensor with ID 23371 to use the OID "1.3.6.1.2.1.1.5.0" instead is:
If you were referring to the SNMP Custom Advanced, then the names of the input fields change a bit. They range from channel1oid to channel10oid. Example to change one of the OID's, for instance channel1oid to "1.3.6.1.2.1.1.5.0":
It's also possible to change the name of the "channel name" setting (Sensor setting). For that, you may reference the property channel1name_ and so on..
Best Regards,
Luciano Lingnau [Paessler Support]
Jan, 2017 - Permalink