2023-11-28T12:43:01.589559352Z stdout F {"level":30,"time":1701175381588,"pid":8,"hostname":"directus-ict-7fa84654sd-154fa","msg":"Initializing bootstrap..."}
2023-11-28T12:43:01.789190358Z stdout F {"level":30,"time":1701175381788,"pid":8,"hostname":"directus-ict-7fa84654sd-154fa","msg":"Database already initialized, skipping install"}
2023-11-28T12:43:01.789460698Z stdout F {"level":30,"time":1701175381789,"pid":8,"hostname":"directus-ict-7fa84654sd-154fa","msg":"Running migrations..."}
2023-11-28T12:43:01.911139285Z stdout F {"level":30,"time":1701175381910,"pid":8,"hostname":"directus-ict-7fa84654sd-154fa","msg":"Done"}
2023-11-28T12:43:02.292976739Z stdout F 2023-11-28T12:43:02: PM2 log: Launching in no daemon mode
2023-11-28T12:43:02.324715731Z stdout F 2023-11-28T12:43:02: PM2 log: App [directus:0] starting in -cluster mode-
2023-11-28T12:43:05.36610777Z stdout F 2023-11-28T12:43:05: PM2 log: App [directus:0] online
2023-11-28T12:43:07.550486396Z stdout F {"level":30,"time":1701175387547,"pid":29,"hostname":"directus-ict-7fa84654sd-154fa","msg":"Server started at http://0.0.0.0:8055"}
I mean you can do a telnet test against the port. I’m not sure if that’s the issue. I remember I left the s in my address and I was going full Happy Gilmore yelling at my log files to go home
I tested your logs against a promtail agent with inspection turned on, and everything looks good, so I am not quite sure what the problem is. I would recommend:
Remove both the cri and relabel configs. This should forward the logs to Loki as they come in, with no parsing at all.
If #1 is successful, add cri stage.
Add relabel configs afterwards.
This should hopefully tell you where the issue is.
I probably should’ve looked at it a bit closely. With kubernetes_sd_configs you don’t need to specify path. My understanding is it reads from kubernetes API, find the pods that match the filter (in your case you were filtering by namespaces), and scrape logs directly from the API.
You would only need to specify path if you were configuring promtail to read from docker logs directly (such as /var/lib/docker/containers//*.log or pods//*.log).