Viewing protocol plug-in monitoring statistics by using an external application

External monitoring applications can access protocol plug-in process data that is published by Eclipse Amlen by subscribing to the Eclipse Amlen topic $SYS/ResourceStatistics/Plugin.

To publish monitoring data on the protocol plug-in process, the Eclipse Amlen server must be running.

The published data is in JSON format. The published data always includes Version, NodeName, Timestamp, and ObjectType. NodeName is the name of the server and ObjectType is the name of the object that you are monitoring.

For more information about monitoring by using an external application, see Monitoring and reporting.

Monitoring data is automatically published every 60 seconds to the topic string $SYS/ResourceStatistics/Plugin.

In MQTT, you cannot subscribe to a $SYS topic if you specify cleanSession=0. In JMS, you cannot subscribe to a $SYS topic if you use a durable subscription.

  1. Create an endpoint. You can use this endpoint to connect your external monitoring application to Eclipse Amlen and create a monitoring subscription. For more information about configuring an endpoint, see Configuring message hubs.
  2. Strengthen your security by configuring this endpoint specifically for monitoring, with connection and messaging policies to restrict access to monitoring data that is published on the topic root $SYS.
    For more information about configuring connection and messaging policies, see Configuring message hubs.
  3. Connect your external application to the endpoint that you created in step 1, and subscribe to the topic string $SYS/ResourceStatistics/Plugin.

The following information is made available to the monitoring application:

  • Version
    String
    Specifies the version of server.
  • NodeName
    String
    Specifies the name of the server.
  • TimeStamp
    Date/Time
    Specifies the date and time in ISO8601 format.
  • ObjectType
    String
    Specifies the type of object that you are monitoring.
  • HeapSizeMB
    Numeric
    The size, in megabytes, of the Java™ heap.
  • HeapUsedPercent
    Numeric
    The amount of the heap, expressed as a percentage, that is currently in use.
  • GCRate
    Numeric
    The rate of garbage collection activity expressed as the number of garbage collections per minute.
  • CPU
    Numeric
    CPU usage by the plug-in process expressed as a percentage of a single processor.

The following example shows a monitoring message that contains monitoring data about the protocol plug-in process.

{
"Version":"1.2.0.3",
"NodeName":"myserver",
"TimeStamp":"2015-09-22 14:32:02+04:00",
"ObjectType":"Plugin",
"HeapSizeMB":512,
"HeapUsedPercent":12,
"GCRate":3,
"CPU":1
}