I am trying to import a Grafana dashboard(JSON) to Grafana. Following is the ansible playbook
---
- name: task to parameterise grafana template
hosts: localhost
become: true
user: root
tasks:
- name: Import Grafana dashboard
grafana_dashboard:
grafana_url: http://<host-ip>:3000
state: present
message: Updated by ansible
uid: edO3sTlipu
overwrite: yes
path: "/home/centos/Kubernetes_cluster_monitoring.json"
And i am getting error below.
fatal: [localhost]: FAILED! => {"changed": false, "msg": "error : Unable to create the new dashboard None : 404 - {'status': 404, 'body': '{\"message\":\"Dashboard not found\",\"status\":\"not-found\"}', 'content-length': '54', 'url': 'http://<IP>:3000/api/dashboards/db', 'expires': '-1', 'msg': 'HTTP Error 404: Not Found', 'connection': 'close', 'pragma': 'no-cache', 'cache-control': 'no-cache', 'date': 'Wed, 08 Jan 2020 12:19:31 GMT', 'x-frame-options': 'deny', 'content-type': 'application/json'}."}
can you help please