我正在尝试将一个Grafana仪表盘导入到Grafana中。
我正在使用以下模块:
- name: Export dashboard
grafana_dashboard:
grafana_url: "http://{{ inventory_hostname }}:3000"
grafana_user: "user"
grafana_password: "password"
org_id: "1"
state: present
slug: "node-exporter"
overwrite: yes
path: "/tmp/test/node_exporter.json"
我有node_exporter.json文件,在本地机器和远程机器上都有。但是当我运行ansible playbook时,它会抛出以下错误:
fatal: [172.16.8.231]: FAILED! => {"changed": false, "msg": "error : Unable to create the new dashboard node-exporter-test : 404 - {'body': '{\"message\":\"Dashboard not found\",\"status\":\"not-found\"}', 'status': 404, 'content-length': '54', 'url': 'http://172.16.8.231:3000/api/dashboards/db', 'msg': 'HTTP Error 404: Not Found', 'connection': 'close', 'date': 'Wed, 10 Apr 2019 14:52:58 GMT', 'content-type': 'application/json'}."}
我在本地和远程机器上都看到了“dashboard not found”的提示,是否有配置步骤被忽略了?