Comments (2)
Workaround:
Enable plugin:
curl -v --basic -XPOST "admin:admin@localhost:3000/api/plugins/grafana-kubernetes-app/settings?enabled=true"
Configure datasource:
curl -v --basic -XPOST "admin:admin@localhost:3000/api/datasources" -d '{"type":"grafana-kubernetes-datasource","name":"k8s.dev.io","url":"https://api.k8s.dev.io","access":"proxy","jsonData":{"keepCookies":[],"ds":"prometheus","tlsSkipVerify":true},"basicAuth":true,"basicAuthUser":"admin","basicAuthPassword":"admin"}' -H "Content-Type: application/json"
Ansible example:
- name: Install grafana plugins
grafana_plugin:
name: "{{ item }}"
version: latest
state: present
with_items: "{{ grafana_plugins }}"
notify: restart grafana
ignore_errors: true
- name: Enable grafana kubernetes plugin
uri:
url: "http://{{ grafana_local_ip }}:{{ grafana_port }}/api/plugins/grafana-kubernetes-app/settings?enabled=true"
method: POST
user: "{{ grafana_user }}"
password: "{{ grafana_password }}"
body: ''
body_format: json
force_basic_auth: yes
headers:
Content-Type: "application/json"
- name: Configure grafana kubernetes plugin datasource
uri:
url: "http://{{ grafana_local_ip }}:{{ grafana_port }}/api/datasources"
method: POST
user: "{{ grafana_user }}"
password: "{{ grafana_password }}"
body: '{"type":"grafana-kubernetes-datasource","name":"k8s.dev.shedul.io","url":"https://api.k8s.dev.shedul.io","access":"proxy","jsonData":{"keepCookies":[],"ds":"prometheus","tlsSkipVerify":true},"basicAuth":true,"basicAuthUser":"admin","basicAuthPassword":"7GPfUrkCobA98nGWxL8liTyXYCXUFejN"}'
body_format: json
force_basic_auth: yes
status_code: 200,409
headers:
Content-Type: "application/json"
from kubernetes-app.
I get this,
* Trying 100.66.212.213...
* Connected to grafana-service (100.66.212.213) port 80 (#0)
* Server auth using Basic with user 'admin'
> POST /api/plugins/grafana-kubernetes-app/settings?enabled=true HTTP/1.1
> Authorization: Basic xxxxxxxxxxxxxxxxxxx
> User-Agent: curl/7.29.0
> Host: grafana-service
> Accept: */*
>
< HTTP/1.1 415 Unsupported Media Type
< Cache-Control: no-cache
< Content-Type: application/json; charset=utf-8
< Expires: -1
< Pragma: no-cache
< X-Frame-Options: deny
< Date: Tue, 04 Jun 2019 07:54:21 GMT
< Content-Length: 70
<
{ [data not shown]
100 70 100 70 0 0 222 0 --:--:-- --:--:-- --:--:-- 222
* Connection #0 to host grafana-service left intact
[{"classification":"ContentTypeError","message":"Empty Content-Type"}]
from kubernetes-app.
Related Issues (20)
- InfluxDB/Telegraf Support
- Panel Plugin missing for grafana-kubernetes-app plugin HOT 2
- node_filesystem variable outdate HOT 1
- Adding datasource prometheus in grafana HTTP Error Not Found
- Error while initializing promtheus configmap, Node Exporter and Kube-State Metrics via Grafana
- New version of kube-state-metrics shows deprecations upcoming which are used in k8s-cluster dashboard
- Install command is wrong in https://grafana.com/grafana/plugins/grafana-kubernetes-app HOT 1
- public/plugins/grafana-kubernetes-datasource/img/logo.svg not found
- No Data Points Collected After Successful Deployment? HOT 3
- Memory Metrics are doubled Grafana HOT 1
- Is this app abandoned? HOT 5
- Why does this plugin ask me for user/passwd (basic auth)?
- Add a new cluster only gives Basic auth option HOT 1
- How to configure kubernetes cluster HOT 5
- Datasource is hardcoded for `v1beta1` api HOT 3
- invalid documentation
- Grafana not showing Pod/Container name in dashboard
- Connecting to K8s cluster HOT 1
- Pod filtering panel broken HOT 1
- Unsigned external plugin HOT 1
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 kubernetes-app.