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

Custom sensor for handling strings over TCP-connections

Votes:

0

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

moxa serial tcp

Created on Aug 10, 2016 7:28:43 AM



3 Replies

Votes:

0

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...

Created on Aug 11, 2016 11:38:38 AM by  Stephan Linke [Paessler Support]



Votes:

0

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.

Created on May 6, 2018 11:30:34 AM



Votes:

0

Hi Frank,

I'm not sure if he's still working on this issue 2y later :)


Kind regards,
Stephan Linke, Tech Support Team

Created on May 7, 2018 4:52:31 AM by  Stephan Linke [Paessler Support]




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.