I have created a custom EXE sensor that executes a bit of Java code that pulls memory utilization data from a remote JMX server. I created a batch script as a wrapper around my Java application and place both batch file and Java jar file in the PRTG Network Monitor\Custom Sensors\EXE directory. The batch file just executes the Java app, passing in parameters:
@echo off
cd C:\Program Files\PRTG Network Monitor\Custom Sensors\EXE
java -jar heapchecker.jar %1 %2 %3 %4
The params are: hostname/IPaddress JMX port warning_threshold error_threshold
example: myhost.mydomain.com 6969 85 95
The above example would warn when memory utilization reaches 85% of max memory and error when it hits 95%.
My Custom sensor executes the batch script and passes in the parameters for the machine name and port to be monitored and the alerting thresholds.
I can post the code for the Java application if that would help.
Add comment