Closed rgildein closed 4 months ago
Use LogForwarder from loki_push_api library to forwards all logs from workload container to Loki. This requires to use ops 2.9 or newer, so it was needed to be updated.
fixes: #111
How I tested it:
# deployed the cos following https://charmhub.io/topics/canonical-observability-stack/tutorials/install-microk8s $ tox -e integration -- --keep-models --model kubeflow $ juju switch test-charm-zk9n u1-k8s:admin/test-charm-kee3 -> u1-k8s:admin/test-charm-zk9n $ juju consume u1-k8s:cos.loki-logging Added u1-k8s:admin/cos.loki-logging as loki-logging $ juju integrate grafana-agent-k8s loki-logging $ kubectl get services -n test-charm-zk9n | grep tensorboards-web-app tensorboards-web-app-endpoints ClusterIP None <none> <none> 7m23s tensorboards-web-app ClusterIP 10.152.183.233 <none> 5000/TCP 7m23s $ curl 10.152.183.233:5000 {"log":"No user detected.","status":401,"success":false,"user":null}
And after checking the Grafana, I was able to see all logs.
Use LogForwarder from loki_push_api library to forwards all logs from workload container to Loki. This requires to use ops 2.9 or newer, so it was needed to be updated.
fixes: #111
How I tested it:
And after checking the Grafana, I was able to see all logs.