Grafana Cloud

Reduce Grafana Cloud Logs costs

To reduce your Grafana Cloud Logs costs, you need to reduce the volume of logs you are sending to Grafana Cloud. Start by looking at Analyze Grafana Cloud Logs costs to identify what software applications and infrastructure are generating the most logs, so that you can decide what areas you want to focus on to reduce log volumes. After you have identified these areas, make changes to your client to drop log lines before they’re sent to Grafana Cloud.

Drop log lines via Grafana Agent

If using the Grafana Agent in Flow mode use the stage.drop block to configure a filtering stage that drops log entries based on several conditions, such as the log line length, age, or matching a regular expression.

If you are running Grafana Agent on Kubernetes, try the Kubernetes Logs module. It provides parameterizable, out-of-the-box Flow configurations that include options for trimming or dropping log lines.

If using the Grafana Agent in static mode, configure drop and match pipeline stages in the logs_config in the same way you would with Promtail directly. For more information, refer to Drop log lines with Promtail.

Drop log lines with Promtail

Promtail allows you to filter out log lines based on age, length, or content, by using its match and drop pipeline stages.

Drop log lines with other clients

Grafana Cloud Logs accepts log lines sent by other third party clients. To drop log lines via a third party client, refer to that client’s documentation.