grok_exporter
grok_exporter copied to clipboard
Apply grok_exporter to k8s
trafficstars
I wonder how to use this exporter to k8s pod's logs. anyone can help me? thanks
It depends on what exactly you want to achieve. One simple way is to use the kubectl logs command to print the logs to the stdout, and to pipe it into a grok_exporter with input type stdin, like this:
kubectl logs ... | grok_exporter -config ./config.yaml
Does that help?
thinks, that would be help, but I wanna use the exporter inside pod like sidecar, when the pod have new logs, the exporter can work at once. And the pod doesn't have the log file, only can get the logs by stdout.