-
Notifications
You must be signed in to change notification settings - Fork 307
import grafana dashboards failed #77
Comments
|
Thanks for reporting this issue. Could you comment-out this line and run your playbook again? If it still doesn't work could you paste error message (just remove your credentials from output): ansible-grafana/tasks/dashboards.yml Line 75 in cd0d607
|
|
I got the exact same issue, no matter which dashboard you try to take, it's ending the same way. Moreover, grafana's url looks wrongly defined (http://0.0.0.0:3000/api/dashboards/db) but even with something relevant defined here, it's still not working |
I experienced the same issue. Appears to be invalid
See details below.
Somehow the file is being downloaded without the closing I was able to workaround this by manually replacing the broken EDIT: It's also possible that Set the correct data source name in the dashboard causes this issue. |
I also noticed that
|
It looks like I have similar issue, could anybody advice how can I enable |
@wmluke Yes, role doesn't clean this dir. We should probably start using automatic directory generation with As for this issue. I cannot reproduce it, we have a daily deploy for demo.cloudalchemy.org which downloads dashboards from grafana.com and it doesn't report this issue. @zonArt grafana api address is defined by ansible-grafana/defaults/main.yml Line 17 in 69d16c5
@kagarlickij |
Just a question, is this setting supposed to work only with hosted dashboards via URL or can I use it to import custom, local dashboard .json files? |
@vspedr It should import every custom dashboard with This is done by copying dashboards to ansible-grafana/tasks/dashboards.yml Line 70 in 69d16c5
|
I've noticed that dashboard 2030 is always installed successfully, but 5566 always fails, maybe it will help with finding issue root cause.. |
I have notice similar error on others dashboards, the root cause seem to be a truncate/malformed json file, may be caused by some erroneous regex? For example dashboard 704 ends with: "refresh": false,
"schemaVersion": 12,
"version": 38,
"links": [],
"gnetId": 704
} but when downloaded in "refresh": false,
"schemaVersion": 12,
"version": 38,
"links": [],
"gnetId": 704 Similar error for dashboard 6239, original: "timezone": "",
"title": "Mysql - Prometheus",
"uid": "6-kPlS7ik",
"version": 16,
"description": "Basic Mysql dashboard for the prometheus exporter "
} downloaded: "timezone": "",
"title": "Mysql - Prometheus",
"uid": "6-kPlS7ik",
"version": 16,
"description": "Basic Mysql dashboard for the prometheus expo |
@Amygos we are modifying dashboard files after download in this task: ansible-grafana/tasks/dashboards.yml Line 58 in 69d16c5
Could you check if when this task is disabled (commented/deleted), dashboard files have proper ending? |
I have commented that task and nothing is changed, i have also commented all tasks after: ansible-grafana/tasks/dashboards.yml Line 11 in 69d16c5
with the same result. Before all tests i have deleted the directory /tmp/dashboards/ .
|
Downloading the dashboard with
But not if retrieved via grafana or Firefox. 🤔 |
So it seems that dashboards are so big that they don't fit into some cache used by |
On the second thought it might be that dashboards are chunked and |
Also I found that downloading dashboard with |
Could someone check if solution from #92 works? |
I have check and it works for dashboard 6239 and fails for dashboard 704:
but i think is a different issue. |
Seems like grafana couldn't handle uploading 704. It might be worth adding |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
TASK [cloudalchemy.grafana : import grafana dashboards] **********************************************
task path: /usr/share/ansible/roles/cloudalchemy.grafana/tasks/dashboards.yml:66
Using module file /usr/lib/python2.7/site-packages/ansible/modules/net_tools/basics/uri.py
ESTABLISH LOCAL CONNECTION FOR USER: devops
EXEC /bin/sh -c 'echo ~ && sleep 0'
EXEC /bin/sh -c '( umask 77 && mkdir -p "
echo /home/devops/.ansible/tmp/ansible-tmp-1532592377.55-113906658255373
" && echo ansible-tmp-1532592377.55-113906658255373="echo /home/devops/.ansible/tmp/ansible-tmp-1532592377.55-113906658255373
" ) && sleep 0'PUT /tmp/tmpzaS9f_ TO /home/devops/.ansible/tmp/ansible-tmp-1532592377.55-113906658255373/uri.py
EXEC /bin/sh -c 'chmod u+x /home/devops/.ansible/tmp/ansible-tmp-1532592377.55-113906658255373/ /home/devops/.ansible/tmp/ansible-tmp-1532592377.55-113906658255373/uri.py && sleep 0'
EXEC /bin/sh -c 'sudo -H -S -n -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-dohzkqlqtjtbwmxbnvdmwlvldbhsmcta; /usr/bin/python /home/devops/.ansible/tmp/ansible-tmp-1532592377.55-113906658255373/uri.py; rm -rf "/home/devops/.ansible/tmp/ansible-tmp-1532592377.55-113906658255373/" > /dev/null 2>&1'"'"' && sleep 0'
failed: [lo] (item=None) => {
"censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result"
}
to retry, use: --limit @/home/devops/ansible/playbook/install-grafana.retry
The text was updated successfully, but these errors were encountered: