Grafana Loki is a set of components that can be composed into a fully featured logging stack.
Promtail is an agent which ships the contents of local logs to a private Grafana Loki instance or Grafana Cloud. It is usually deployed to every machine that has applications needed to be monitored.
- Install agent Promtail for a kubernetes cluster
Replace and with a Grafana.com API key with the MetricsPublisher role.
kubectl create ns loki
sh promtail.sh <User ID> <API Key> logs-prod3.grafana.net loki | kubectl apply --namespace=loki -f -
now logs start to sending to Loki services in Grafana Cloud
Go back to Grafana Cloud Console to Manage your Grafana Cloud Stack.
Click Launch
Grafana, go to Explore
select datasource (Grafana logs datasource automatical added to Grafana Cloud)
kubectl delete ds promtail -n loki
daemonset.apps "promtail" deleted