Comments (9)
@itewk The problem lies somewhere with the grafana sdk. I'm currently working on removing it and just sending the raw json (after some validation). That seems to be working and the gauge in your example renders exactly the same operator imported vs. directly imported.
from grafana-operator.
example dashboard I can reproduce with
{
"__inputs": [
{
"name": "DS_OPENSHIFT_PROMETHEUS",
"label": "openshift-prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
],
"__requires": [
{
"type": "panel",
"id": "gauge",
"name": "Gauge",
"version": ""
},
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "6.5.2"
},
{
"type": "datasource",
"id": "prometheus",
"name": "Prometheus",
"version": "1.0.0"
}
],
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"id": null,
"iteration": 1576850855482,
"links": [],
"panels": [
{
"datasource": "${DS_OPENSHIFT_PROMETHEUS}",
"gridPos": {
"h": 5,
"w": 24,
"x": 0,
"y": 0
},
"id": 2,
"options": {
"fieldOptions": {
"calcs": [
"lastNotNull"
],
"defaults": {
"links": [],
"mappings": [
{
"from": "",
"id": 1,
"operator": "",
"text": "",
"to": "",
"type": 1,
"value": ""
}
],
"max": 1,
"min": 0,
"thresholds": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 0.85
}
],
"title": "",
"unit": "percentunit"
},
"override": {},
"values": false
},
"orientation": "horizontal",
"showThresholdLabels": false,
"showThresholdMarkers": false
},
"pluginVersion": "6.5.2",
"targets": [
{
"expr": "(sum by (hostname) ( heketi_device_used_bytes {job = \"$job\"} )) / (sum by (hostname) ( heketi_device_size_bytes {job = \"$job\"} ))",
"format": "time_series",
"instant": false,
"intervalFactor": 1,
"legendFormat": "{{hostname}}",
"refId": "A"
}
],
"timeFrom": null,
"timeShift": null,
"title": "Storage Devices Capacity Used",
"type": "gauge"
}
],
"schemaVersion": 21,
"style": "dark",
"tags": [],
"templating": {
"list": [
{
"current": {
"text": "openshift-prometheus",
"value": "openshift-prometheus"
},
"hide": 0,
"includeAll": false,
"label": "Datasource",
"multi": false,
"name": "DS_OPENSHIFT_PROMETHEUS",
"options": [],
"query": "prometheus",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"type": "datasource"
},
{
"allValue": null,
"current": {},
"datasource": "$DS_OPENSHIFT_PROMETHEUS",
"definition": "label_values(heketi_up,job)",
"hide": 0,
"includeAll": false,
"label": "Job",
"multi": false,
"name": "job",
"options": [],
"query": "label_values(heketi_up,job)",
"refresh": 2,
"regex": "",
"skipUrlSync": false,
"sort": 1,
"tagValuesQuery": "",
"tags": [],
"tagsQuery": "",
"type": "query",
"useTags": false
}
]
},
"time": {
"from": "now-24h",
"to": "now"
},
"timepicker": {
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
]
},
"timezone": "",
"title": "TEST"
}
from grafana-operator.
I'm assuming it has to do with the grafana-sdk library that we use to parse the dashboard json. I'll investigate further.
from grafana-operator.
Yeah. I tried to trace through the operator code to see how dashboard gets imported to see if I could isolate to whether it was something operator was doing or Grafana but I lost the thread when it called the grafana sdk.
from grafana-operator.
@itewk This should be fixed now in this PR: #95 I've created a tag with those change import-datasources
: https://quay.io/repository/integreatly/grafana-operator?tab=tags
Would you mind giving it a try?
Please note that since your dashboard has inputs (depends on a datasource to be present) you will have to specify it in the dashboard CR with:
spec:
datasources:
inputName: "DS_OPENSHIFT_PROMETHEUS"
datasourceName: <name of the corresponding datasource in your instance>
Docs for this are in the works: https://github.com/integr8ly/grafana-operator/pull/95/files#diff-87206ddedd4460f8733d5d3074b725adR90
from grafana-operator.
@pb82 tested the import-datasources
image tag and it works great, fixes this issue. Thank you.
from grafana-operator.
@pb82 I also confirm that the import-datasources
image tag resolves problems that were caused by the use of the grafana sdk.
Do you know when this version will be released please ? (github release and latest
image tag)
By the way, when is the latest
image tag pushed in your release workflow ?
from grafana-operator.
@yogeek I'll aim for a release around the 10th of January. Unfortunately there is currently no automation for creating the latest
tag. Travis currently only creates tags for releases and branches. That's probably something we should automate. I'll update latest
manually today.
from grafana-operator.
The latest tag is up to date with master now.
from grafana-operator.
Related Issues (20)
- Make the grafana operator able to create grafana service accounts and tokens from yaml HOT 3
- Documentation: PVC and Volumes example HOT 6
- Auto-enable app plugins via operator. HOT 4
- Installing custom plugin HOT 5
- Port NotificationChannel CRD from operator v4 to v5 HOT 3
- Prometheus data source for "Azure Monitor for Prometheus" with workload identity does not work HOT 5
- [Bug] grafana operator 5.6.0 -> 5.6.1 upgrade issues openshift HOT 28
- [Bug] instanceSelector.matchExpressions not working for GrafanaDatasource HOT 1
- Dashboard from configmap using selector HOT 4
- Grafana deployment with a Persistent Volume HOT 4
- Service account automountServiceAccountToken should be set to false HOT 3
- Service Account for grafana instance does not get annotations HOT 2
- [Bug] Unable to set custom secrets without defining grafana container image HOT 6
- watch namespaces using a label selector
- [Bug] Unable to upgrade from v5.6.0 on OpenShift HOT 10
- [doc] Grafana deployment with a Persistent Volume HOT 6
- Unable to limit which Grafana can use which dashboards (v5 operator) HOT 4
- Add make it possible to disable editing of a dashboard from a grafanadashboard CRD HOT 9
- ArgoCD healthcheck and GrafanaDashboard HOT 5
- Apply the default Grafana Version to the CR spec HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grafana-operator.