Hello there,
thank you for your KB-Post.
I've just tried out the discovery for a custom port and it appears to work just fine. I've tried this for the custom port 12345 and 1234 as "control" group:
<?xml version="1.0" encoding="UTF-8"?>
<devicetemplate id="custom" name="Custom Port Test v0.2" priority="1">
<check id="ping" meta="ping"/>
<check id="port1234" meta="port" requires="ping"/>
<create id="_port1234" kind="port" requires="port1234" displayname="Port 1234"/>
<check id="port12345" meta="port" requires="ping"/>
<create id="_port12345" kind="port" requires="port12345" displayname="Port 12345"/>
</devicetemplate>
As expected, this was the discovery log output:
15.05.2018 07:35:11: Autodiscovery Started; Device ID: 45830
15.05.2018 07:35:11: Device ID: 45830 Name: xxxx-011.domain.int (XXXX-011) Host: XXXX
15.05.2018 07:35:11: Device Templates; Device ID: 45830; Selected: 1
15.05.2018 07:35:11: Template Loaded; Device ID: 45830; Name: Custom Port Test v0.2
15.05.2018 07:35:14: Template Check; Device ID: 45830; Check ID: ping; FOUND
15.05.2018 07:35:20: Template Check; Device ID: 45830; Check ID: port1234; NOT FOUND
15.05.2018 07:35:25: Template Check; Device ID: 45830; Check ID: port12345; FOUND
15.05.2018 07:35:25: Template Assigned; Device ID: 45830; Name: Custom Port Test v0.2
15.05.2018 07:35:25: Sensor Created; Device ID: 45830; Create ID: _port12345; Sensor ID: 45841; Name: Port 12345 1
15.05.2018 07:35:30: Autodiscovery Finished: Device ID: 45830; Sensor(s): 1; Templates: Custom Port Test v0.2
As expected, the check for port 12345 worked fine and the check for 1234 (the control group) produced NOT FOUND. As a result, only sensor for port 12345 was created.
Would you mind sharing the complete discovery log using your custom template so that I can get a better idea of what's going on?
P.S.: Please keep in mind that the PORT sensor/check only works for TCP sockets.
P.S.2: The Auto-Discovery process (at group level) is a two step process. First, it will use ICMP/Ping to find network devices, which will then create the devices in PRTG and in a second step it will use the template you've created. If you're attempting to create the devices and they don't respond to ping, this won't work. In this case, you might want to try using the API to clone an existing device, update it's IP address and lastly, start the discovery with your custom template. This will work.
The process above is documented within PRTG under Setup > PRTG API in the "Object Manipulation" tab.
Related
Best Regards,
Luciano Lingnau [Paessler Support]
Add comment