Skip to content

Service Retention Period gRPC API

Adjust your service retention period with the Service Retention Period gRPC API.

Overview

Coralogix presents services in the Service Catalog based on their metrics. If we do not receive metrics for a service for 30 days, the service is removed from the Catalog. Similarly, if a database has no service interactions for 30 days, the database is removed from the Database Catalog.

This documentation details the Service Retention Period gRPC API, empowering you to modify the default 30-day period for removing services from your Service Catalog or databases from your Database Catalog in the absence of traffic.

Permissions

To utilize the API, you must have the service-catalog:Update permission. This permission is automatically granted to the following roles: Data Admin, Platform Admin, Observability Lead, and Legacy Admin. Find out more here.

Prerequisites

API endpoints

This reference document lists example requests and responses using gRPCurl. The following calls accept arguments as JSON in the request body and return results as JSON in the response body. A complete list of Management endpoints is available here.

Authentication

Coralogix API uses API keys to authenticate requests. You can view and manage your API keys from the Data Flow tab in Coralogix. You need to use this API key in the Authorization request header to connect successfully.

Example:

grpcurl -H "Authorization: Bearer API_KEY_HERE"

Then, use one of our designated Management endpoints to structure your header.

d @ https://ng-api-grpc.<span class="domain-value"></span>:443/

For the Service Retention Period API, the service name will be ReplaceRetentionPeriod.

com.coralogixapis.service_catalog.v1.ApmSettingsService/ReplaceRetentionPeriod

The complete request header should look like this:

grpcurl -H "Authorization: Bearer <token>" -d @ <cx-gprc-endpoint> com.coralogixapis.service_catalog.v1.ApmSettingsService/ReplaceRetentionPeriod <<EOF
{
    "retention_period_in_days": <value>
}
EOF

Input the Management endpoint associated with your Coralogix domain.

ReplaceServiceRetentionPeriod

REQUEST

The request payload should include the following structure:

{
    "retention_period_in_days": 30
}

RESPONSE

{
    "retention_period_in_days": 30
}

Removing the service retention policy

You can remove the service retention policy to ensure that all services in your organization remain visible, regardless of whether Coralogix has received their metrics.

Set retention_period_in_days to 0 as shown below:

{
    "retention_period_in_days": 0
}

This change will make all services continuously visible starting from the day it is applied.

Additional resources

DocumentationService Catalog
Database Monitoring
APM Onboarding Tutorial

Support

Need help?

Our world-class customer success team is available 24/7 to walk you through your setup and answer any questions that may come up.

Feel free to reach out to us via our in-app chat or by sending us an email at [email protected].