Managing and Monitoring the Connector

Monitoring the Connector’s States

The PubSub+ connector provides an ability to monitor its internal states through exposed endpoints provided by Spring Boot Actuator.

An Actuator shares information through the endpoints reachable over HTTP/HTTPS. The endpoints that are available are configured in the connector configuration file. Based on the version of the connector, the files differ:

For connector versions 2.0.0 and later:

management:
  simple: 
    metrics:
      export: 
        enabled: true
  endpoints: 
    web:
      exposure: 
        include: "health,metrics,loggers,logfile,channels,env,workflows,leaderelection,bindings,info"

The above sample configuration enables metrics collection through the configuration parameter of management.simple.metrics.export.enabled set to true and then shares them through the HTTP/HTTPS endpoint together with other sections configured for the current PubSub+  connector.

For connector versions earlier than 2.0.0:

management: 
  metrics:
    export: 
      simple:
        enabled: true
  endpoints: 
    web:
      exposure: 
        include: "health,metrics,loggers,logfile,channels,env,workflows,leaderelection,bindings"

The above example configuration enables metrics collection through the configuration parameter of management.metrics.export.simple.enabled set to true and then shares them through the HTTP/HTTPS endpoint together with other sections configured for the current PubSub+ connector.

Exposed HTTP/HTTPS Endpoints

The set of endpoints exposed through the HTTP/HTTPS endpoint.

  • Exposed Actuator endpoints are available if you query the endpoints using the web interface (for example, https://localhost:8090/actuator/<some_endpoint>) and is also available in PubSub+ Connector Manager .
  • The operator may choose to not expose all or some of these endpoints. If so, the Actuator endpoints that are not exposed are not visible if you query the endpoints (for example, using https://localhost:8090/actuator/<some_endpoint>) nor in Connector Manager.

The simple metrics registry is only to be used for testing. It is not a production-ready means of collecting metrics. In  production, use a dedicated monitoring system (e.g., Datadog, Prometheus, etc.) to collect metrics.

The Actuator endpoint now contains information about the PubSub+  connector’s internal states shared over the following HTTP/HTTPS endpoint:

GET: /actuator/        

The following shows an example of the data shared with the configuration above:

"_links": {
  "self": {
    "href": "/actuator", 
    "templated": false
    },
    "workflows": {
      "href": "/actuator/workflows", 
      "templated": false
    },
    "workflows-workflowId": {
      "href": "/actuator/workflows/{workflowId}", 
      "templated": true
    },
    "leaderelection": {
      "href": "/actuator/leaderelection", 
      "templated": false
    },
    "health-path": {
      "href": "/actuator/health/{*path}", 
      "templated": true
    },
    "health": {
      "href": "/actuator/health", 
      "templated": false
    },
    "metrics": {
       "href": "/actuator/metrics", 
       "templated": false
    },
    "metrics-requiredMetricName": {
       "href": "/actuator/metrics/{requiredMetricName}", 
       "templated": true
    }
  }
}