-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[loki] add log dashboard #60
Comments
-> adding and automatic reload (within grafana) works but... |
additional information: This is what may should be tested |
And especially this doc https://grafana.com/docs/loki/latest/setup/install/helm/monitor-and-alert/with-local-monitoring/ |
erster schritt: wie lautet unser CLUSTER_NAME? The dashboards require certain metric labels to display Kubernetes metrics. The best way to accomplish this is to install the kube-prometheus-stack Helm chart with the following values file, replacing CLUSTER_NAME with the name of your cluster. The cluster name is what you specify during the helm installation, so a cluster installed with the command helm install loki-cluster grafana/loki would be called loki-cluster. ===> schaut so aus als wär das eigentlich der Release-Name vom installierten Loki, und das ist bei uns "sx-loki", weil der Helm-Release-Name dem ArgoCD appname entspricht. |
Signed-off-by: Johannes Kleinlercher <johannes.kleinlercher@suxess-it.com>
cluster="sx-loki" label is jetzt bei jede menge metriken dabei, d.h. die Konfiguration von ea185bb scheint gezogen zu haben. Das Dashboard https://grafana-127-0-0-1.nip.io/d/logs/loki-logs?orgId=1&refresh=10s zeigt trtozdem noch keine daten an. |
it seems I face the same issue right now as in grafana/loki#9273 (comment) "the loki_build_info metric seems empty on the Prometheus data source." investigating ... |
meine Vermutung ist aktuell dass die loki_build_info Metrik nur existiert, wenn selfMonitoring aktiviert ist. Grund: dazu müssten zusätzliche CRDs installiert werden. Lt. Kommentar beim Attribut:
Um den Grafana Agent Operator zu installieren muss man das Helm-Value monitoring.selfMonitoring.grafanaAgent.installOperator auf 'true' setzen, siehe Das habe ich jetzt lokal im k3d-Cluster versucht, allerdings taucht da das nächste Problem auf beim syncen:
Meine Vermutung: und über loki will eine installiert werden mit der Version v1alpha1 und ich vermute deshalb passiert jetzt auch beim syncen von loki der Fehler. k get crd podlogs.monitoring.grafana.com -n monitoring -o yaml
|
According to https://grafana.com/docs/agent/latest/flow/reference/components/loki.source.podlogs/ the grafana agent is deprecated so we should use podlogs CRD from alloy which is also newer. Investigating how podlogs instance in Loki could work together with podlogs CRD from alloy (v1alpha1 VS v1alpha2) |
You can specify the podlogs api version in loki values file https://github.com/grafana/loki/blob/4c563f7823f9f9b7e65026b52e9c16580d4d87f4/production/helm/loki/values.yaml#L3331 |
and here again why selfMonitoring needs to be enabled to get the included dashboards to work:
https://grafana.com/docs/loki/latest/setup/install/helm/monitor-and-alert/with-local-monitoring/ |
Conclusion:
|
Let’s try if Loki dashboards and selfmonitoring works when alloy is not installed. If it works, we should think about skipping alloy until it is integrated in Loki instead of grafana agent operator Some info about internal —Grafana— Datasource: this is just a datasource with test data! ( https://grafana.com/docs/grafana/latest/datasources/#grafana) |
for this let’s take a look again at the off-the-shelf dashboards https://grafana.com/grafana/dashboards/15141-kubernetes-service-logs/ |
after uninstalling alloy the loki app with selfMonitoring enabled installs sucessfully (grafanaagent included), however no loki metric is in prometheus datasource.
However, the sx-loki servicemonitor doesn't show up in servicediscovery page on prometheus itself: I think the reason is that the prometheus selector labels are set like this
and the loki servicemonitor doesn't have labels like this. Maybe we need to set Question: or should grafana-agent-operator use this servicemonitor to scrape the metrics? if so, can grafana-agent-operator push those metrics to prometheus datasource??? |
…loki helm chart and disable serviceMonitorSelectorNilUsesHelmValues so loki serviceMonitors get honored by kube-prometheus-stack, #60 Signed-off-by: Johannes Kleinlercher <johannes.kleinlercher@suxess-it.com>
Signed-off-by: Johannes Kleinlercher <johannes.kleinlercher@suxess-it.com>
Signed-off-by: Johannes Kleinlercher <johannes.kleinlercher@suxess-it.com>
everything as expected. when importing the dashboard from url above you are asked for the datasource uid. since we add it automatically in the helm chart we need to set "loki" as uid also in the configmap https://github.com/suxess-it/sx-cnp-oss/blob/4cfef24243bf187a48fa6c2a74ccfe22aa60aea5/platform-apps/charts/loki/templates/dashboard.yaml#L192 |
created new k3d cluster and did some tests --> looks good. One last hint: some self-monitoring dashboards like "loki-reads resources" show no data.
Maybe some of the dashboards only work for a certain deployment mode. Look like grafana/loki#7657 |
automatic deployed dashboards are for loki health only...
examples:
https://grafana.com/grafana/dashboards/?search=loki
The text was updated successfully, but these errors were encountered: