Hi, i have a fortigate firewall which also supplies VPN connections. I want to automatically add new IPSEC connections to PRTG using the PRTG API and a custom made OIDlib. I tried to use the autodiscover function with the template function, but because the template only contains the sensors found/detected at the moment of saving the template this method is not finding any new ipsec vpn connections.

What is the best way to add newly added vpn connections to PRTG using the api (or at least automatically)?

With regards,

Jiri.


Article Comments

Hello,

thank you very much for your KB-Post. I'm afraid this indeed is a bit tricky. If you know the OID of the new VPN, maybe get it within a script with a snmpwalk, then you could clone an existing sensor, and change the OID, which the clone monitors into the OID for the new VPN connection. For the details on the API Calls to clone and then change properties of the new clone, please see the API Documentation under "Setup"->"PRTG API"->"Object Manipulation".

best regards.


Feb, 2014 - Permalink

How would one change the OID on a sensor, cloned or otherwise? I am very interested in being able to do this but I cannot find anywhere to even see the OID a given sensor is polling, much less change it.


Mar, 2014 - Permalink

Kyle, you could try using the setobjectproperty-API-Call:

Change properties of objects:
/api/setobjectproperty.htm?id=id_of_object&name=property_name&value=new_value 

For more details, please see your own PRTG under Setup->PRTG API->Object Manipulation.


Mar, 2014 - Permalink