Monitoring Extension Types
You can implement custom metrics using these mechanisms:
- Using a script:You can write a shell script (Linux and Unix-like systems) or batch file (Windows) to report custom metrics every minute to the Machine Agent. The Machine Agent passes these metrics on to the Controller. See Build a Monitoring Extension Using Scripts.
- Using Java:Your custom metrics may be too complicated to collect using a script. For example, you may need to perform complex calculations or call a third-party API to retrieve the metrics. In this case, you can extend the
JavaServersMonitor
class to collect the metrics and report them to the Machine Agent. Your Java program extends theJavaServersMonitor
class to provide your custom functionality. See Build a Monitoring Extension Using Java. - Using HTTP:If you enable the Agent HTTP listener, you can post HTTP requests to the Machine Agent to send it custom metrics every minute. To do this, start the Machine Agent with a Jetty HTTP listener. See Machine Agent HTTP Listener.