ezienecker / grafana-sidecar-folder-sample Goto Github PK
View Code? Open in Web Editor NEWInstalls the web dashboarding system Grafana with sidecar support. Additionally add dashboards from configmaps to specific folders in grafana.
Installs the web dashboarding system Grafana with sidecar support. Additionally add dashboards from configmaps to specific folders in grafana.
hi,
thanks for the guide,
I still have a problem maybe you will know how to fix
I add the config like you wrote
dashboardProviders:
dashboardproviders.yaml:
apiVersion: 1
providers:
- name: "Inventory Summary"
orgId: 1
folder: "edge"
type: file
disableDeletion: false
editable: false
options:
path: /tmp/dashboards/inventory
and add the anotatin to the cm
apiVersion: v1
kind: ConfigMap
metadata:
name: inventory-dashboards
labels:
grafana_dashboard: "1"
annotations:
k8s-sidecar-target-directory: "/tmp/dashboards/inventory"
data:
{{ (.Files.Glob "custom-dashboards/inventory/*.json" ).AsConfig | indent 2 }}
and the logs seem right
Working on configmap staging/inventory-dashboards
Found a folder override annotation, placing the inventory-dashboards in: /tmp/dashboards/inventory
File in configmap Inventory_Summary.json ADDED
but when I go to the UI I see only empty folders (except the general)
what can it be that I am missing?
Hi
I tried it this way, but I'm struggling a bit.
This is my config map:
https://github.com/tuxpeople/k8s-homelab/blob/master/cluster/apps/media/plex-exporter/grafana-dashboard.yaml
And this my Grafana deployment:
https://github.com/tuxpeople/k8s-homelab/blob/master/cluster/apps/monitoring/grafana/helm-release.yaml
I'm ending up with this error, saying me that grafana has not sufficient permissions on a folder Grafana created itself:
$ kubectl logs -n monitoring grafana-c6df564f9-ks4mr -c grafana-sc-dashboard
[...]
[2021-10-25 11:49:41] Working on ADDED configmap media/plex-exporter-dashboard
[2021-10-25 11:49:41] Found a folder override annotation, placing the plex-exporter-dashboard in: /var/lib/grafana/dashboards/fun
[2021-10-25 11:49:41] Error: insufficient privileges to create /var/lib/grafana/dashboards/fun. Skipping plex-exporter-dashboard.json.
[2021-10-25 11:49:41] Received unknown exception: unsupported operand type(s) for |=: 'bool' and 'NoneType'
Traceback (most recent call last):
File "/app/resources.py", line 237, in _watch_resource_loop
_watch_resource_iterator(*args)
File "/app/resources.py", line 216, in _watch_resource_iterator
files_changed |= _process_config_map(dest_folder, item, resource, unique_filenames, enable_5xx,
File "/app/resources.py", line 126, in _process_config_map
files_changed |= _iterate_data(
File "/app/resources.py", line 153, in _iterate_data
files_changed |= _update_file(
TypeError: unsupported operand type(s) for |=: 'bool' and 'NoneType'
[...]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.