I am using grafana loki version in Ubuntu
I’m trying to obtain logs for kyverno policy reporter in grafana loki
I’m trying to obtain it using log queries
My logs are pushed but not accesible
Expected logs to be visualized in loki
Didn’t face errors but not able to obtain the required logs
It will be really useful if someone provided an example query of how to obtain the logs for kyverno policy-reporter
@jeremysundareeves welcome to the community!
I’m not sure if we should move this post to the Loki category. Are you able to see your logs in the explore view in Grafana?
If you’re not sure what is available start by checking in explore and select your loki datasource:
- Check that your time range is set to capture the time period of your logs
- Turn on the explain query toggle for query help
- Click on label browser to open a dialog box that will show you the available labels to search on. Here you can choose a single label and click Show logs to verify if the Loki datasource is retrieving logs:
Once we’re sure that the datasource is connected and bringing logs over, then we can continue working through how to format your query.
Alternatively, you’ll notice there is a toggle for builder | code in the top right corner of the query box. If you switch to builder you’ll see a drop down of labels and it will help walk you through creating a basic query with the prompts and drop downs.