Platform Metric Provider
About the Platform Metric Provider
Platform Metric Provider is responsible for providing additional performance metrics on the cluster. The metrics are centered around message production and consumption delays.
If distribution is enabled for the Instance, monitoring can extend to include the distribution overhead.
Configuration
Setup initStreams
In order to enable Platform Metric Provider you will need to create the instance topics relevant to it. For the instances for which you want to monitor message delays (round-trip producer consumer delay and distribution delays if relevant) you will need to update your Instance configuration like so:
platform:
instance:
instanceapi:
initstreams: (1)
streams:
- name: '_[your-tenant-name]-[your-instance-name]-metric-provider'
config:
cleanup-policy: "delete" (2)
min-isr: 1
partitions: 1
replication-factor: 1
retention-time: "PT1H" (3)
segment-roll-time: "PT1H" (3)
resolving-disabled: true (4)
forceSchemas: true
consumers: (5)
- principal: "CN=Platform-Metric-Provider"
principalChain: "[0] CN=Your Root CA, [1] CN=Platform-Metric-Provider"
consumerGroups:
- applicationId: "io.axual.distribution.monitor"
producers:
- principal: "CN=Platform-Metric-Provider"
principalChain: "[0] CN=Your Root CA, [1] CN=Platform-Metric-Provider"
applicationIds:
- "io.axual.distribution.monitor"
1 | List of topics will be deployed on startup of the service as a soft requirement (failure will not prevent the service from starting) |
2 | Topic must be a deletion topic |
3 | In ISO format, 1 hour is sufficient |
4 | This is a system topic, therefore topic name resolving needs to be disabled |
5 | PMP needs to have read/write access to this topic |
The above is a soft requirement on Instance Manager startup, meaning that if the stream was not successfully applied on startup it will simply not create it and start normally. That can happen if Cluster Manager is not started or not reachable for whatever reason. If this occurs, a restart of Instance Manager once connectivity is in place will guarantee the stream was applied. This can be verified through Instance Manager startup logs. |
Enable and configure PMP
First, toggle the PMP flag to enable it:
global:
cluster:
pmp:
enabled: true
Now provide the configuration needed for the service to start
platform:
core:
pmp:
serviceMonitor:
enabled: true
application:
provider:
# bootstrapServers: (1)
consumer:
group: "io.axual.distribution.monitor" (2)
config: (3)
connections-max-idle-ms: 180000
producer:
produceIntervalStr: "1000" (4)
config: (5)
connections-max-idle-ms: 180000
tls:
keystoreCertificateChain: ...
privateKey: ...
caCerts: (6)
root_ca.crt: ...
1 | Kafka Broker url override |
2 | Consumer group.id, needs to match the initStreams ACL applicationId |
3 | Kafka Consumer configuration overrides |
4 | Interval (in ms) at which a message is produced per instance |
5 | Kafka Consumer configuration overrides |
6 | Map containing all CA certificates needed |