Generalize system metrics collection
Is your feature request related to a problem? Please describe. The APIML should allow any third party service to collect system metrics.
Describe the solution you'd like Wrapper that calls configured endpoints to retrieve system level metrics from a third party source. HTTP parameter to be used when retrieving system metrics may also need to be configured.
Endpoints should be configured on a service by service basis in case services are hosted on different machines. If the configuration options are not present or not valid, no system level metrics information should be expected or shown. Additionally, there should be an option to explicitly enable/disable metrics collection for the service, within configuration. Configuration should also provide a description for what each endpoint provides.
For example, within each service's application.yml:
metrics:
system:
enabled: true
endpoints:
- endpoint: https://myurl.com/endpoint1
description: "Gets data about X"
- endpoint: https://myurl.com/endpoint2
description: "Get data about Y"
Alternatively, if each service is to have its metrics configured in one location, it could look like the following in config/metrics.yml:
service:
serviceId: "serviceId"
system:
enabled: true
endpoints:
<same as above>
Wrapper should be well documented on usage to ensure users don't try to connect with a metrics service that is unsupported (due to endpoints or parameters needed to retrieve metrics).
Describe alternatives you've considered Support specific metrics services to limit need for configuration.
We expect to get the memory and CPU consumption for the specific service not the state of the whole machine.
We will poll the data from the services on demand.
Metrics servis is deprecated and will not be developed.