Grafana Kubernetes MonitoringOther Kubernetes configuration methodsDeploy Grafana Agent directly

Deploy Grafana Agent directly for Kubernetes

Grafana Agent is a lightweight telemetry collector based on Prometheus that only performs its scraping and remote_write functions. Agent can also collect metrics, logs, and traces for storage in Grafana Cloud and Grafana Enterprise, as well as OSS deployments of Loki (logs), and Tempo (traces), Prometheus (metrics), and Cortex (metrics). Grafana Agent also contains several integrations (embedded metrics exporters) like node-exporter, a MySQL exporter, and many more.

Note: While it is theoretically possible to configure the same Agent DaemonSet to collect and ship both metrics and logs to Grafana Cloud, support for this deployment model is currently minimal and under active development. For best results, deploy the following:

  • A StatefulSet or Deployment of Agents to collect metrics (similar to how you’d roll out Prometheus)
  • A DaemonSet to collect logs
  • A Deployment or DaemonSet to collect traces
  • Additional Deployments and/or DaemonSets to export metrics using embedded integrations

To deploy Grafana Agent and ship telemetry data to Grafana Cloud, select one of the following:

TopicDescription
MetricsTo learn how to deploy Grafana Agent for Kubernetes metrics, see Ship Kubernetes metrics using Grafana Agent.
LogsGrafana Agent contains an embedded Promtail that allows you ship logs to Loki using the same Agent binary. To learn how to deploy Grafana Agent for Kubernetes logs, see Ship Kubernetes logs using Grafana Agent.
TracesTo learn how to deploy Grafana Agent for Kubernetes traces, see Ship Kubernetes traces using Grafana Agent. To learn more about Grafana Agent and traces, see the Grafana Agent Tempo docs.

See the Grafana Agent documentation for more details.

Another option for configuration is to use Grafana Agent Operator. See Ship metrics and logs using Grafana Agent Operator for details.