Skip to content
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 Target instant option not applied #558

Open
OscarVanL opened this issue Dec 13, 2022 · 0 comments
Open

Loki Target instant option not applied #558

OscarVanL opened this issue Dec 13, 2022 · 0 comments

Comments

@OscarVanL
Copy link
Contributor

What you expected to happen?

In my Grafanalib code I set instant=True for my Loki Target, however in the generated dashboard the query is set to Range.

What happened?

The instant arg assigns the instant JSON value, but toggling between Instant and Range in the Grafana GUI changes between "queryType": "instant" and "queryType": "range"

e.g.

  "targets": [
    {
      "datasource": {
        "type": "loki",
        "uid": "${LokiDataSource}"
      },
      "expr": "foo",
      "format": "time_series",
      "hide": false,
      "instant": true,
      "interval": "",
      "intervalFactor": 2,
      "legendFormat": "",
      "metric": "",
      "query": "foo",
      "refId": "A",
      "step": 10,
      "target": "",
      "editorMode": "code",
      "queryType": "range"
    }
  ],

How to reproduce it?

Create a Loki query and change queryType.

My setup: Grafana v9.2.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant