我正在尝试将导入的 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
,但在本地和远程机器上。我是否跳过任何需要的配置?