Git Product home page Git Product logo

Comments (3)

cryptobioz avatar cryptobioz commented on May 20, 2024 1

I've been able to reproduce, the variable support was not enabled for the "single" format.
This issue is now fixed, I also added the support of "All" and "Multi" values.

from grafana-prometheus-alertmanager-datasource.

SPFZ avatar SPFZ commented on May 20, 2024

I can not reproduce this for the single stat in 0.0.3.

When I create a variable in the dashboard it gets properly replaced by it's value:

Metrik query:
alertname="$alertname"

Query Inspector:

xhrStatus:"complete"
request:Object
method:"GET"
url:"api/datasources/proxy/1/api/v1/alerts?silenced=false&filter=alertname%3D%22Blackbox_Exporter_Probe_Failure%22"
data:Object
timezone:"browser"
panelId:3
range:Object
rangeRaw:Object
interval:"15s"
intervalMs:15000
targets:Array[1]
format:"json"
maxDataPoints:1259
scopedVars:Object
cacheTimeout:undefined
response:Object
status:"success"
data:Array[1]
0:Object

Make sure you select the format of the metric as "single" for singlestat and table for tables. Otherwise it doesn't seam to work.

from grafana-prometheus-alertmanager-datasource.

jreineke-nli avatar jreineke-nli commented on May 20, 2024

I just tried it again with a custom label from prometheus:

customer="$customer"

xhrStatus:"complete"
request:Object
method:"GET"
url:"api/datasources/proxy/2/api/v1/alerts?silenced=false&filter=customer%3D%22%24customer%22"
data:Object
timezone:"browser"
panelId:21
range:Object
rangeRaw:Object
interval:"15m"
intervalMs:900000
targets:Array[1]
format:"json"
maxDataPoints:100
scopedVars:Object
cacheTimeout:null
response:Object
status:"success"
data:Array[0]

Default variables like alertname or instance won't work here either.
I think somewhere outside the plugin itself is an entry that causes my problem. I installed the version 0.0.1 and updated manually to 0.0.3 and tryed to reinstalled it without any success.

from grafana-prometheus-alertmanager-datasource.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.