Currently we are using our own custom software (Matlab, Labview, Python) to monitor various physical sensors and measurement equipment that only have a serial port.
For each serial connected device we use a MOXA serial server (N5110A) which 'converts' the serial port into ethernet and allows us to query and read data from these devices by sending and receiving simple strings via TCP.
What would be the optimal method for writing a custom sensor with PRTG that we could implement and move all our data monitoring into PRTG?
The Sensor would need to: - open and close TCP connections to custom IPs and ports - send ASCII strings with custom termination characters - have some delay handling (for slow equipment) - read custom lenghts of ASCII from the TCP port - and parse them using standard regular expressions - validate the parsed data and store it in the monitoring database
Article Comments
Hello Miikka.
i would got for a Custom Sensor written in PowerShell oder any other langauge. I know powershell can do that. Start with Code line on
http://myitpath.blogspot.de/2013/02/simple-powershell-tcp-client-for.html or https://cyberwardog.blogspot.de/2016/07/powershell-tcp-client-server-with-net.html
Using the TCP-Client is pretty straight forward to connect to a remote host, send data and get back tha answers. Then you have to do the parsing and send the output back to STDOUT as a Single line or CusstomXML. Depends what data you want to send to prtg.
May, 2018 - Permalink
Hi Frank,
I'm not sure if he's still working on this issue 2y later :)
Kind regards,
Stephan Linke, Tech Support Team
May, 2018 - Permalink
You could try the following guide and use our SNMP Library sensor (import the mentioned mib first). However, not sure if this will do the trick. You may need to come up with a custom script sensor that evaluates the OID tables accordingly...
Aug, 2016 - Permalink