api-layer icon indicating copy to clipboard operation
api-layer copied to clipboard

Generalize system metrics collection

Open CarsonCook opened this issue 5 years ago • 1 comments

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.

CarsonCook avatar Sep 25 '20 16:09 CarsonCook

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.

balhar-jakub avatar Oct 08 '20 13:10 balhar-jakub

Metrics servis is deprecated and will not be developed.

EvaJavornicka avatar May 29 '23 12:05 EvaJavornicka