Skip to content
This repository has been archived by the owner on May 31, 2023. It is now read-only.

import grafana dashboards failed #77

Closed
doboqopo opened this issue Jul 26, 2018 · 22 comments
Closed

import grafana dashboards failed #77

doboqopo opened this issue Jul 26, 2018 · 22 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@doboqopo
Copy link

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

@doboqopo
Copy link
Author

# hosts
[Master]
lo ansible_connection=local

# install-grafana.yml
- name: Installing Grafana on hosted machine
  hosts: Master
  become: yes
  roles:
    - cloudalchemy.grafana
  vars:
    grafana_security:
      admin_user: "admin"
      admin_password: "testad"
    grafana_datasources:
      - name: prometheus
        type: prometheus
        access: proxy
        url: 'http://localhost:9090'
        basicAuth: false
    grafana_dashboards:
      - dashboard_id: 704
        revision_id: 1
        datasource: prometheus

@paulfantom
Copy link
Member

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):

@paulfantom paulfantom added the bug Something isn't working label Jul 26, 2018
@doboqopo
Copy link
Author

The full traceback is:
  File "/tmp/ansible_00oyQc/ansible_module_uri.py", line 468, in main
    uresp['location'] = absolute_location(url, uresp['location'])

failed: [lo] (item=/tmp/dashboards/704.json) => {
    "changed": false,
    "connection": "close",
    "content": "[{\"classification\":\"DeserializationError\",\"message\":\"unexpected EOF\"},{\"fieldNames\":[\"Dashboard\"],\"classification\":\"RequiredError\",\"message\":\"Required\"}]",
    "content_length": "153",
    "content_type": "application/json; charset=utf-8",
    "date": "Thu, 26 Jul 2018 08:15:23 GMT",
    "invocation": {
        "module_args": {
            "attributes": null,
            "backup": null,
            "body": "{ \"dashboard\": {\n  \"__inputs\": [\n    {\n      \"name\": \"prometheus\",\n      \"label\": \"Prometheus\",\n      \"description\": \"\",\n      \"type\": \"datasource\",\n      \"pluginId\": \"prometheus\",\n      \"pluginName\": \"Prometheus\"\n    }\n  ],\n  \"__requires\": [\n    {\n      \"type\": \"panel\",\n      \"id\": \"singlestat\",\n      \"name\": \"Singlestat\",\n      \"version\": \"\"\n    },\n    {\n      \"type\": \"panel\",\n      \"id\": \"graph\",\n      \"name\": \"Graph\",\n      \"version\": \"\"\n    },\n    {\n      \"type\": \"panel\",\n      \"id\": \"table\",\n      \"name\": \"Table\",\n      \"version\": \"\"\n    },\n    {\n      \"type\": \"grafana\",\n      \"id\": \"grafana\",\n      \"name\": \"Grafana\",\n      \"version\": \"3.1.1\"\n    },\n    {\n      \"type\": \"datasource\",\n      \"id\": \"prometheus\",\n      \"name\": \"Prometheus\",\n      \"version\": \"1.0.0\"\n    }\n  ],\n  \"id\": null,\n  \"title\": \"Node exporter server stats\",\n  \"description\": \"Dashboard to get an overview of one server\",\n  \"tags\": [\n    \"prometheus\"\n  ],\n  \"style\": \"dark\",\n  \"timezone\": \"browser\",\n  \"editable\": true,\n  \"hideControls\": false,\n  \"sharedCrosshair\": false,\n  \"rows\": [\n    {\n      \"collapse\": false,\n      \"editable\": true,\n      \"height\": \"100px\",\n      \"panels\": [\n        {\n          \"cacheTimeout\": null,\n          \"colorBackground\": false,\n          \"colorValue\": false,\n          \"colors\": [\n            \"rgba(245, 54, 54, 0.9)\",\n            \"rgba(237, 129, 40, 0.89)\",\n            \"rgba(50, 172, 45, 0.97)\"\n          ],\n          \"datasource\": \"prometheus\",\n          \"editable\": true,\n          \"error\": false,\n          \"format\": \"none\",\n          \"gauge\": {\n            \"maxValue\": 100,\n            \"minValue\": 0,\n            \"show\": false,\n            \"thresholdLabels\": false,\n            \"thresholdMarkers\": true\n          },\n          \"id\": 12,\n          \"interval\": null,\n          \"isNew\": true,\n          \"links\": [],\n          \"mappingType\": 1,\n          \"mappingTypes\": [\n            {\n              \"name\": \"value to text\",\n              \"value\": 1\n            },\n            {\n              \"name\": \"range to text\",\n              \"value\": 2\n            }\n          ],\n          \"maxDataPoints\": 100,\n          \"nullPointMode\": \"connected\",\n          \"nullText\": null,\n          \"postfix\": \"\",\n          \"postfixFontSize\": \"50%\",\n          \"prefix\": \"\",\n          \"prefixFontSize\": \"50%\",\n          \"rangeMaps\": [\n            {\n              \"from\": \"null\",\n              \"text\": \"N/A\",\n              \"to\": \"null\"\n            }\n          ],\n          \"span\": 2,\n          \"sparkline\": {\n            \"fillColor\": \"rgba(31, 118, 189, 0.18)\",\n            \"full\": false,\n            \"lineColor\": \"rgb(31, 120, 193)\",\n            \"show\": false\n          },\n          \"targets\": [\n            {\n              \"expr\": \"count(count by(cpu)(node_cpu{instance=~\\\"$server:.*\\\"}))\",\n              \"intervalFactor\": 2,\n              \"refId\": \"A\",\n              \"step\": 240\n            }\n          ],\n          \"thresholds\": \"\",\n          \"title\": \"Cores\",\n          \"type\": \"singlestat\",\n          \"valueFontSize\": \"80%\",\n          \"valueMaps\": [\n            {\n              \"op\": \"=\",\n              \"text\": \"N/A\",\n              \"value\": \"null\"\n            }\n          ],\n          \"valueName\": \"avg\"\n        },\n        {\n          \"cacheTimeout\": null,\n          \"colorBackground\": false,\n          \"colorValue\": false,\n          \"colors\": [\n            \"rgba(245, 54, 54, 0.9)\",\n            \"rgba(237, 129, 40, 0.89)\",\n            \"rgba(50, 172, 45, 0.97)\"\n          ],\n          \"datasource\": \"prometheus\",\n          \"editable\": true,\n          \"error\": false,\n          \"format\": \"bytes\",\n          \"gauge\": {\n            \"maxValue\": 100,\n            \"minValue\": 0,\n            \"show\": false,\n            \"thresholdLabels\": false,\n            \"thresholdMarkers\": true\n          },\n          \"id\": 14,\n          \"interval\": null,\n          \"isNew\": true,\n          \"links\": [],\n          \"mappingType\": 1,\n          \"mappingTypes\": [\n            {\n              \"name\": \"value to text\",\n              \"value\": 1\n            },\n            {\n              \"name\": \"range to text\",\n              \"value\": 2\n            }\n          ],\n          \"maxDataPoints\": 100,\n          \"nullPointMode\": \"connected\",\n          \"nullText\": null,\n          \"postfix\": \"\",\n          \"postfixFontSize\": \"50%\",\n          \"prefix\": \"\",\n          \"prefixFontSize\": \"50%\",\n          \"rangeMaps\": [\n            {\n              \"from\": \"null\",\n              \"text\": \"N/A\",\n              \"to\": \"null\"\n            }\n          ],\n          \"span\": 2,\n          \"sparkline\": {\n            \"fillColor\": \"rgba(31, 118, 189, 0.18)\",\n            \"full\": false,\n            \"lineColor\": \"rgb(31, 120, 193)\",\n            \"show\": false\n          },\n          \"targets\": [\n            {\n              \"expr\": \"sum(node_filesystem_size{instance=~\\\"$server:.*\\\", device=~\\\"/dev/.*\\\"})\",\n              \"intervalFactor\": 1,\n              \"refId\": \"A\",\n              \"step\": 120\n            }\n          ],\n          \"thresholds\": \"\",\n          \"title\": \"Disk Total\",\n          \"type\": \"singlestat\",\n          \"valueFontSize\": \"80%\",\n          \"valueMaps\": [\n            {\n              \"op\": \"=\",\n              \"text\": \"N/A\",\n              \"value\": \"null\"\n            }\n          ],\n          \"valueName\": \"avg\"\n        },\n        {\n          \"cacheTimeout\": null,\n          \"colorBackground\": false,\n          \"colorValue\": false,\n          \"colors\": [\n            \"rgba(245, 54, 54, 0.9)\",\n            \"rgba(237, 129, 40, 0.89)\",\n            \"rgba(50, 172, 45, 0.97)\"\n          ],\n          \"datasource\": \"prometheus\",\n          \"editable\": true,\n          \"error\": false,\n          \"format\": \"bytes\",\n          \"gauge\": {\n            \"maxValue\": 100,\n            \"minValue\": 0,\n            \"show\": false,\n            \"thresholdLabels\": false,\n            \"thresholdMarkers\": true\n          },\n          \"id\": 13,\n          \"interval\": null,\n          \"isNew\": true,\n          \"links\": [],\n          \"mappingType\": 1,\n          \"mappingTypes\": [\n            {\n              \"name\": \"value to text\",\n              \"value\": 1\n            },\n            {\n              \"name\": \"range to text\",\n              \"value\": 2\n            }\n          ],\n          \"maxDataPoints\": 100,\n          \"nullPointMode\": \"connected\",\n          \"nullText\": null,\n          \"postfix\": \"\",\n          \"postfixFontSize\": \"50%\",\n          \"prefix\": \"\",\n          \"prefixFontSize\": \"50%\",\n          \"rangeMaps\": [\n            {\n              \"from\": \"null\",\n              \"text\": \"N/A\",\n              \"to\": \"null\"\n            }\n          ],\n          \"span\": 2,\n          \"sparkline\": {\n            \"fillColor\": \"rgba(31, 118, 189, 0.18)\",\n            \"full\": false,\n            \"lineColor\": \"rgb(31, 120, 193)\",\n            \"show\": false\n          },\n          \"targets\": [\n            {\n              \"expr\": \"node_memory_MemTotal{instance=~\\\"$server:.*\\\"}\",\n              \"intervalFactor\": 1,\n              \"refId\": \"A\",\n              \"step\": 120\n            }\n          ],\n          \"thresholds\": \"\",\n          \"title\": \"Total Memory\",\n          \"type\": \"singlestat\",\n          \"valueFontSize\": \"80%\",\n          \"valueMaps\": [\n            {\n              \"op\": \"=\",\n              \"text\": \"N/A\",\n              \"value\": \"null\"\n            }\n          ],\n          \"valueName\": \"avg\"\n        },\n        {\n          \"cacheTimeout\": null,\n          \"colorBackground\": false,\n          \"colorValue\": true,\n          \"colors\": [\n            \"rgba(50, 172, 45, 0.97)\",\n            \"rgba(237, 129, 40, 0.89)\",\n            \"rgba(245, 54, 54, 0.9)\"\n          ],\n          \"datasource\": \"prometheus\",\n          \"editable\": true,\n          \"error\": false,\n          \"format\": \"percentunit\",\n          \"gauge\": {\n            \"maxValue\": 100,\n            \"minValue\": 0,\n            \"show\": false,\n            \"thresholdLabels\": false,\n            \"thresholdMarkers\": true\n          },\n          \"id\": 11,\n          \"interval\": null,\n          \"isNew\": true,\n          \"links\": [],\n          \"mappingType\": 1,\n          \"mappingTypes\": [\n            {\n              \"name\": \"value to text\",\n              \"value\": 1\n            },\n            {\n              \"name\": \"range to text\",\n              \"value\": 2\n            }\n          ],\n          \"maxDataPoints\": 100,\n          \"nullPointMode\": \"connected\",\n          \"nullText\": null,\n          \"postfix\": \"\",\n          \"postfixFontSize\": \"50%\",\n          \"prefix\": \"\",\n          \"prefixFontSize\": \"50%\",\n          \"rangeMaps\": [\n            {\n              \"from\": \"null\",\n              \"text\": \"N/A\",\n              \"to\": \"null\"\n            }\n          ],\n          \"span\": 2,\n          \"sparkline\": {\n            \"fillColor\": \"rgba(31, 118, 189, 0.18)\",\n            \"full\": false,\n            \"lineColor\": \"rgb(31, 120, 193)\",\n            \"show\": true\n          },\n          \"targets\": [\n            {\n              \"expr\": \"node_load1{instance=~\\\"$server:.*\\\"} / count by(job, instance)(count by(job, instance, cpu)(node_cpu{instance=~\\\"$server:.*\\\"}))\",\n              \"intervalFactor\": 2,\n              \"legendFormat\": \"\",\n              \"refId\": \"A\",\n              \"step\": 240\n            }\n          ],\n          \"thresholds\": \"0.8,0.9\",\n          \"title\": \"Load\",\n          \"type\": \"singlestat\",\n          \"valueFontSize\": \"80%\",\n          \"valueMaps\": [\n            {\n              \"op\": \"=\",\n              \"text\": \"N/A\",\n              \"value\": \"null\"\n            }\n          ],\n          \"valueName\": \"current\"\n        },\n        {\n          \"cacheTimeout\": null,\n          \"colorBackground\": false,\n          \"colorValue\": false,\n          \"colors\": [\n            \"rgba(245, 54, 54, 0.9)\",\n            \"rgba(237, 129, 40, 0.89)\",\n            \"rgba(50, 172, 45, 0.97)\"\n          ],\n          \"datasource\": \"prometheus\",\n          \"decimals\": 1,\n          \"editable\": true,\n          \"error\": false,\n          \"format\": \"s\",\n          \"gauge\": {\n            \"maxValue\": 100,\n            \"minValue\": 0,\n            \"show\": false,\n            \"thresholdLabels\": false,\n            \"thresholdMarkers\": true\n          },\n          \"id\": 15,\n          \"interval\": null,\n          \"isNew\": true,\n          \"links\": [],\n          \"mappingType\": 1,\n          \"mappingTypes\": [\n            {\n              \"name\": \"value to text\",\n              \"value\": 1\n            },\n            {\n              \"name\": \"range to text\",\n              \"value\": 2\n            }\n          ],\n          \"maxDataPoints\": 100,\n          \"nullPointMode\": \"connected\",\n          \"nullText\": null,\n          \"postfix\": \"\",\n          \"postfixFontSize\": \"50%\",\n          \"prefix\": \"\",\n          \"prefixFontSize\": \"50%\",\n          \"rangeMaps\": [\n            {\n              \"from\": \"null\",\n              \"text\": \"N/A\",\n              \"to\": \"null\"\n            }\n          ],\n          \"span\": 2,\n          \"sparkline\": {\n            \"fillColor\": \"rgba(31, 118, 189, 0.18)\",\n            \"full\": false,\n            \"lineColor\": \"rgb(31, 120, 193)\",\n            \"show\": false\n          },\n          \"targets\": [\n            {\n              \"expr\": \"time() - node_boot_time{instance=~\\\"$server:.*\\\"}\",\n              \"intervalFactor\": 1,\n              \"refId\": \"A\",\n              \"step\": 120\n            }\n          ],\n          \"thresholds\": \"\",\n          \"title\": \"Uptime\",\n          \"type\": \"singlestat\",\n          \"valueFontSize\": \"80%\",\n          \"valueMaps\": [\n            {\n              \"op\": \"=\",\n              \"text\": \"N/A\",\n              \"value\": \"null\"\n            }\n          ],\n          \"valueName\": \"avg\"\n        },\n        {\n          \"cacheTimeout\": null,\n          \"colorBackground\": false,\n          \"colorValue\": false,\n          \"colors\": [\n            \"rgba(245, 54, 54, 0.9)\",\n            \"rgba(237, 129, 40, 0.89)\",\n            \"rgba(50, 172, 45, 0.97)\"\n          ],\n          \"datasource\": \"prometheus\",\n          \"decimals\": 2,\n          \"editable\": true,\n          \"error\": false,\n          \"format\": \"percentunit\",\n          \"gauge\": {\n            \"maxValue\": 100,\n            \"minValue\": 0,\n            \"show\": false,\n            \"thresholdLabels\": false,\n            \"thresholdMarkers\": true\n          },\n          \"id\": 17,\n          \"interval\": null,\n          \"isNew\": true,\n          \"links\": [],\n          \"mappingType\": 1,\n          \"mappingTypes\": [\n            {\n              \"name\": \"value to text\",\n              \"value\": 1\n            },\n            {\n              \"name\": \"range to text\",\n              \"value\": 2\n            }\n          ],\n          \"maxDataPoints\": 100,\n          \"nullPointMode\": \"connected\",\n          \"nullText\": null,\n          \"postfix\": \"\",\n          \"postfixFontSize\": \"50%\",\n          \"prefix\": \"\",\n          \"prefixFontSize\": \"50%\",\n          \"rangeMaps\": [\n            {\n              \"from\": \"null\",\n              \"text\": \"N/A\",\n              \"to\": \"null\"\n            }\n          ],\n          \"span\": 2,\n          \"sparkline\": {\n            \"fillColor\": \"rgba(31, 118, 189, 0.18)\",\n            \"full\": false,\n            \"lineColor\": \"rgb(31, 120, 193)\",\n            \"show\": true\n          },\n          \"targets\": [\n            {\n              \"expr\": \"sum(irate(node_exporter_scrape_duration_seconds_sum{instance=~\\\"$server:.*\\\"}[5m]))\",\n              \"intervalFactor\": 2,\n              \"refId\": \"A\",\n              \"step\": 240\n            }\n          ],\n          \"thresholds\": \"\",\n          \"title\": \"Scrape CPU use\",\n          \"type\": \"singlestat\",\n          \"valueFontSize\": \"80%\",\n          \"valueMaps\": [\n            {\n              \"op\": \"=\",\n              \"text\": \"N/A\",\n              \"value\": \"null\"\n            }\n          ],\n          \"valueName\": \"avg\"\n        }\n      ],\n      \"title\": \"New row\"\n    },\n    {\n      \"collapse\": false,\n      \"editable\": true,\n      \"height\": \"150px\",\n      \"panels\": [\n        {\n          \"alert\": {\n            \"crit\": {\n              \"op\": \">\"\n            },\n            \"warn\": {\n              \"op\": \">\"\n            }\n          },\n          \"alerting\": {},\n          \"aliasColors\": {},\n          \"bars\": false,\n          \"datasource\": \"prometheus\",\n          \"editable\": true,\n          \"error\": false,\n          \"fill\": 3,\n          \"grid\": {\n            \"threshold1\": null,\n            \"threshold1Color\": \"rgba(216, 200, 27, 0.27)\",\n            \"threshold2\": null,\n            \"threshold2Color\": \"rgba(234, 112, 112, 0.22)\"\n          },\n          \"id\": 9,\n          \"isNew\": true,\n          \"legend\": {\n            \"alignAsTable\": false,\n            \"avg\": false,\n            \"current\": false,\n            \"hideZero\": true,\n            \"max\": false,\n            \"min\": false,\n            \"rightSide\": false,\n            \"show\": true,\n            \"total\": false,\n            \"values\": false\n          },\n          \"lines\": true,\n          \"linewidth\": 1,\n          \"links\": [],\n          \"nullPointMode\": \"connected\",\n          \"percentage\": false,\n          \"pointradius\": 5,\n          \"points\": false,\n          \"renderer\": \"flot\",\n          \"seriesOverrides\": [],\n          \"span\": 5,\n          \"stack\": true,\n          \"steppedLine\": false,\n          \"targets\": [\n            {\n              \"expr\": \"irate(node_cpu{instance=~\\\"$server:.*\\\", mode!=\\\"idle\\\"}[5m])\",\n              \"intervalFactor\": 2,\n              \"legendFormat\": \"{{mode}}\",\n              \"refId\": \"A\",\n              \"step\": 40,\n              \"target\": \"\"\n            }\n          ],\n          \"thresholds\": [],\n          \"timeFrom\": null,\n          \"timeShift\": null,\n          \"title\": \"CPU Usage\",\n          \"tooltip\": {\n            \"msResolution\": false,\n            \"shared\": true,\n            \"sort\": 2,\n            \"value_type\": \"individual\"\n          },\n          \"type\": \"graph\",\n          \"xaxis\": {\n            \"show\": true\n          },\n          \"yaxes\": [\n            {\n              \"format\": \"percentunit\",\n              \"label\": null,\n              \"logBase\": 1,\n              \"max\": 1,\n              \"min\": 0,\n              \"show\": true\n            },\n            {\n              \"format\": \"short\",\n              \"label\": null,\n              \"logBase\": 1,\n              \"max\": null,\n              \"min\": null,\n              \"show\": false\n            }\n          ]\n        },\n        {\n          \"alert\": {\n            \"crit\": {\n              \"op\": \">\"\n            },\n            \"warn\": {\n              \"op\": \">\"\n            }\n          },\n          \"alerting\": {},\n          \"aliasColors\": {},\n          \"bars\": false,\n          \"datasource\": \"prometheus\",\n          \"editable\": true,\n          \"error\": false,\n          \"fill\": 1,\n          \"grid\": {\n            \"threshold1\": null,\n            \"threshold1Color\": \"rgba(216, 200, 27, 0.27)\",\n            \"threshold2\": null,\n            \"threshold2Color\": \"rgba(234, 112, 112, 0.22)\"\n          },\n          \"id\": 4,\n          \"isNew\": true,\n          \"legend\": {\n            \"avg\": false,\n            \"current\": false,\n            \"max\": false,\n            \"min\": false,\n            \"show\": true,\n            \"total\": false,\n            \"values\": false\n          },\n          \"lines\": true,\n          \"linewidth\": 2,\n          \"links\": [],\n          \"nullPointMode\": \"connected\",\n          \"percentage\": false,\n          \"pointradius\": 5,\n          \"points\": false,\n          \"renderer\": \"flot\",\n          \"seriesOverrides\": [\n            {\n              \"alias\": \"Free\",\n              \"zindex\": 3\n            }\n          ],\n          \"span\": 5,\n          \"stack\": true,\n          \"steppedLine\": false,\n          \"targets\": [\n            {\n              \"expr\": \"node_memory_MemTotal{instance=~\\\"$server:.*\\\"} - node_memory_MemFree{instance=~\\\"$server:.*\\\"} - node_memory_Cached{instance=~\\\"$server:.*\\\"} - node_memory_Buffers{instance=~\\\"$server:.*\\\"} - node_memory_Slab{instance=~\\\"$server:.*\\\"}\",\n              \"intervalFactor\": 2,\n              \"legendFormat\": \"Used\",\n              \"metric\": \"memo\",\n              \"refId\": \"A\",\n              \"step\": 40,\n              \"target\": \"\"\n            },\n            {\n              \"expr\": \"node_memory_Buffers{instance=~\\\"$server:.*\\\"}\",\n              \"intervalFactor\": 2,\n              \"legendFormat\": \"Buffers\",\n              \"refId\": \"C\",\n              \"step\": 40\n            },\n            {\n              \"expr\": \"node_memory_Cached{instance=~\\\"$server:.*\\\"} + node_memory_Slab{instance=~\\\"$server:.*\\\"}\",\n              \"intervalFactor\": 2,\n              \"legendFormat\": \"Cached\",\n              \"refId\": \"D\",\n              \"step\": 40\n            },\n            {\n              \"expr\": \"node_memory_MemFree{instance=~\\\"$server:.*\\\"}\",\n              \"hide\": false,\n              \"intervalFactor\": 2,\n              \"legendFormat\": \"Free\",\n              \"refId\": \"B\",\n              \"step\": 40\n            }\n          ],\n          \"thresholds\": [],\n          \"timeFrom\": null,\n          \"timeShift\": null,\n          \"title\": \"Memory usage\",\n          \"tooltip\": {\n            \"msResolution\": false,\n            \"shared\": true,\n            \"sort\": 0,\n            \"value_type\": \"individual\"\n          },\n          \"type\": \"graph\",\n          \"xaxis\": {\n            \"show\": true\n          },\n          \"yaxes\": [\n            {\n              \"format\": \"bytes\",\n              \"label\": null,\n              \"logBase\": 1,\n              \"max\": null,\n              \"min\": null,\n              \"show\": true\n            },\n            {\n              \"format\": \"short\",\n              \"label\": null,\n              \"logBase\": 1,\n              \"max\": null,\n              \"min\": null,\n              \"show\": true\n            }\n          ]\n        },\n        {\n          \"cacheTimeout\": null,\n          \"colorBackground\": false,\n          \"colorValue\": false,\n          \"colors\": [\n            \"rgba(245, 54, 54, 0.9)\",\n            \"rgba(237, 129, 40, 0.89)\",\n            \"rgba(50, 172, 45, 0.97)\"\n          ],\n          \"datasource\": \"prometheus\",\n          \"editable\": true,\n          \"error\": false,\n          \"format\": \"percent\",\n          \"gauge\": {\n            \"maxValue\": 100,\n            \"minValue\": 0,\n            \"show\": true,\n            \"thresholdLabels\": false,\n            \"thresholdMarkers\": true\n          },\n          \"id\": 5,\n          \"interval\": null,\n          \"isNew\": true,\n          \"links\": [],\n          \"mappingType\": 1,\n          \"mappingTypes\": [\n            {\n              \"name\": \"value to text\",\n              \"value\": 1\n            },\n            {\n              \"name\": \"range to text\",\n              \"value\": 2\n            }\n          ],\n          \"maxDataPoints\": 100,\n          \"nullPointMode\": \"connected\",\n          \"nullText\": null,\n          \"postfix\": \"\",\n          \"postfixFontSize\": \"50%\",\n          \"prefix\": \"\",\n          \"prefixFontSize\": \"50%\",\n          \"rangeMaps\": [\n            {\n              \"from\": \"null\",\n              \"text\": \"N/A\",\n              \"to\": \"null\"\n            }\n          ],\n          \"span\": 2,\n          \"sparkline\": {\n            \"fillColor\": \"rgba(31, 118, 189, 0.18)\",\n            \"full\": false,\n            \"lineColor\": \"rgb(31, 120, 193)\",\n            \"show\": false\n          },\n          \"targets\": [\n            {\n              \"expr\": \"(node_memory_MemAvailable{instance=~\\\"$server:.*\\\"} / node_memory_MemTotal{instance=~\\\"$server:.*\\\"}) * 100\",\n              \"intervalFactor\": 2,\n              \"refId\": \"A\",\n              \"step\": 240,\n              \"target\": \"\"\n            }\n          ],\n          \"thresholds\": \"10, 20\",\n          \"title\": \"Available memory\",\n          \"type\": \"singlestat\",\n          \"valueFontSize\": \"80%\",\n          \"valueMaps\": [\n            {\n              \"op\": \"=\",\n              \"text\": \"N/A\",\n              \"value\": \"null\"\n            }\n          ],\n          \"valueName\": \"avg\"\n        }\n      ],\n      \"title\": \"New row\"\n    },\n    {\n      \"collapse\": false,\n      \"editable\": true,\n      \"height\": \"150px\",\n      \"panels\": [\n        {\n          \"aliasColors\": {},\n          \"bars\": false,\n          \"datasource\": \"prometheus\",\n          \"editable\": true,\n          \"error\": false,\n          \"fill\": 1,\n          \"grid\": {\n            \"threshold1\": null,\n            \"threshold1Color\": \"rgba(216, 200, 27, 0.27)\",\n            \"threshold2\": null,\n            \"threshold2Color\": \"rgba(234, 112, 112, 0.22)\"\n          },\n          \"id\": 18,\n          \"isNew\": true,\n          \"legend\": {\n            \"avg\": false,\n            \"current\": false,\n            \"max\": false,\n            \"min\": false,\n            \"show\": true,\n            \"total\": false,\n            \"values\": false\n          },\n          \"lines\": true,\n          \"linewidth\": 2,\n          \"links\": [],\n          \"nullPointMode\": \"connected\",\n          \"percentage\": false,\n          \"pointradius\": 5,\n          \"points\": false,\n          \"renderer\": \"flot\",\n          \"seriesOverrides\": [\n            {\n              \"alias\": \"Swap Out\",\n              \"transform\": \"negative-Y\"\n            }\n          ],\n          \"span\": 5,\n          \"stack\": false,\n          \"steppedLine\": false,\n          \"targets\": [\n            {\n              \"expr\": \"node_vmstat_pswpin{instance=~\\\"$server:.*\\\"}\",\n              \"intervalFactor\": 2,\n              \"legendFormat\": \"Swap In\",\n              \"refId\": \"A\",\n              \"step\": 40\n            },\n            {\n              \"expr\": \"node_vmstat_pswpout{instance=~\\\"$server:.*\\\"}\",\n              \"intervalFactor\": 2,\n              \"legendFormat\": \"Swap Out\",\n              \"refId\": \"B\",\n              \"step\": 40\n            }\n          ],\n          \"timeFrom\": null,\n          \"timeShift\": null,\n          \"title\": \"Swap Activity\",\n          \"tooltip\": {\n            \"msResolution\": false,\n            \"shared\": true,\n            \"sort\": 0,\n            \"value_type\": \"cumulative\"\n          },\n          \"type\": \"graph\",\n          \"xaxis\": {\n            \"show\": true\n          },\n          \"yaxes\": [\n            {\n              \"format\": \"short\",\n              \"label\": null,\n              \"logBase\": 1,\n              \"max\": null,\n              \"min\": null,\n              \"show\": true\n            },\n            {\n              \"format\": \"short\",\n              \"label\": null,\n              \"logBase\": 1,\n              \"max\": null,\n              \"min\": null,\n              \"show\": true\n            }\n          ]\n        },\n        {\n          \"aliasColors\": {},\n          \"bars\": false,\n          \"datasource\": \"prometheus\",\n          \"editable\": true,\n          \"error\": false,\n          \"fill\": 1,\n          \"grid\": {\n            \"threshold1\": null,\n            \"threshold1Color\": \"rgba(216, 200, 27, 0.27)\",\n            \"threshold2\": null,\n            \"threshold2Color\": \"rgba(234, 112, 112, 0.22)\"\n          },\n          \"id\": 16,\n          \"isNew\": true,\n          \"legend\": {\n            \"avg\": false,\n            \"current\": false,\n            \"max\": false,\n            \"min\": false,\n            \"show\": true,\n            \"total\": false,\n            \"values\": false\n          },\n          \"lines\": true,\n          \"linewidth\": 2,\n          \"links\": [],\n          \"nullPointMode\": \"connected\",\n          \"percentage\": false,\n          \"pointradius\": 5,\n          \"points\": false,\n          \"renderer\": \"flot\",\n          \"seriesOverrides\": [\n            {\n              \"alias\": \"/.*outbound/\",\n              \"transform\": \"negative-Y\"\n            }\n          ],\n          \"span\": 5,\n          \"stack\": false,\n          \"steppedLine\": false,\n          \"targets\": [\n            {\n              \"expr\": \"irate(node_network_transmit_bytes{instance=~\\\"$server:.*\\\", device!~\\\"lo|bond[0-9]|cbr[0-9]|veth.*\\\"}[5m]) > 0\",\n              \"intervalFactor\": 2,\n              \"legendFormat\": \"{{device}} outbound\",\n              \"refId\": \"A\",\n              \"step\": 40\n            },\n            {\n              \"expr\": \"irate(node_network_receive_bytes{instance=~\\\"$server:.*\\\", device!~\\\"lo|bond[0-9]|cbr[0-9]|veth.*\\\"}[5m]) > 0\",\n              \"intervalFactor\": 2,\n              \"legendFormat\": \"{{device}} inbound\",\n              \"refId\": \"B\",\n              \"step\": 40\n            }\n          ],\n          \"timeFrom\": null,\n          \"timeShift\": null,\n          \"title\": \"Network Usage\",\n          \"tooltip\": {\n            \"msResolution\": false,\n            \"shared\": true,\n            \"sort\": 0,\n            \"value_type\": \"cumulative\"\n          },\n          \"type\": \"graph\",\n          \"xaxis\": {\n            \"show\": true\n          },\n          \"yaxes\": [\n            {\n              \"format\": \"Bps\",\n              \"label\": null,\n              \"logBase\": 1,\n              \"max\": null,\n              \"min\": null,\n              \"show\": true\n            },\n            {\n              \"format\": \"short\",\n              \"label\": null,\n              \"logBase\": 1,\n              \"max\": null,\n              \"min\": null,\n              \"show\": false\n            }\n          ]\n        },\n        {\n          \"cacheTimeout\": null,\n          \"colorBackground\": false,\n          \"colorValue\": false,\n          \"colors\": [\n            \"rgba(245, 54, 54, 0.9)\",\n            \"rgba(237, 129, 40, 0.89)\",\n            \"rgba(50, 172, 45, 0.97)\"\n          ],\n          \"datasource\": \"prometheus\",\n          \"editable\": true,\n          \"error\": false,\n          \"format\": \"percentunit\",\n          \"gauge\": {\n            \"maxValue\": 1,\n            \"minValue\": 0,\n            \"show\": true,\n            \"thresholdLabels\": false,\n            \"thresholdMarkers\": true\n          },\n          \"id\": 7,\n          \"interval\": null,\n          \"isNew\": true,\n          \"links\": [],\n          \"mappingType\": 1,\n          \"mappingTypes\": [\n            {\n              \"name\": \"value to text\",\n              \"value\": 1\n            },\n            {\n              \"name\": \"range to text\",\n              \"value\": 2\n            }\n          ],\n          \"maxDataPoints\": 100,\n          \"nullPointMode\": \"connected\",\n          \"nullText\": null,\n          \"postfix\": \"\",\n          \"postfixFontSize\": \"50%\",\n          \"prefix\": \"\",\n          \"prefixFontSize\": \"50%\",\n          \"rangeMaps\": [\n            {\n              \"from\": \"null\",\n              \"text\": \"N/A\",\n              \"to\": \"null\"\n            }\n          ],\n          \"span\": 2,\n          \"sparkline\": {\n            \"fillColor\": \"rgba(31, 118, 189, 0.18)\",\n            \"full\": false,\n            \"lineColor\": \"rgb(31, 120, 193)\",\n            \"show\": false\n          },\n          \"targets\": [\n            {\n              \"expr\": \"min(node_filesystem_free{fstype=~\\\"xfs|ext4\\\",instance=~\\\"$server:.*\\\"} / node_filesystem_size{fstype=~\\\"xfs|ext4\\\",instance=~\\\"$server:.*\\\"})\",\n              \"intervalFactor\": 2,\n              \"legendFormat\": \"\",\n              \"refId\": \"A\",\n              \"step\": 240,\n              \"target\": \"\"\n            }\n          ],\n          \"thresholds\": \"0.10, 0.25\",\n          \"title\": \"Free Filesystem Space (Lowest)\",\n          \"type\": \"singlestat\",\n          \"valueFontSize\": \"80%\",\n          \"valueMaps\": [\n            {\n              \"op\": \"=\",\n              \"text\": \"N/A\",\n              \"value\": \"null\"\n            }\n          ],\n          \"valueName\": \"current\"\n        }\n      ],\n      \"title\": \"New row\"\n    },\n    {\n      \"collapse\": false,\n      \"editable\": true,\n      \"height\": \"250px\",\n      \"panels\": [\n        {\n          \"aliasColors\": {},\n          \"bars\": false,\n          \"datasource\": \"prometheus\",\n          \"editable\": true,\n          \"error\": false,\n          \"fill\": 0,\n          \"grid\": {\n            \"threshold1\": null,\n            \"threshold1Color\": \"rgba(216, 200, 27, 0.27)\",\n            \"threshold2\": null,\n            \"threshold2Color\": \"rgba(234, 112, 112, 0.22)\"\n          },\n          \"id\": 19,\n          \"isNew\": true,\n          \"legend\": {\n            \"avg\": false,\n            \"current\": false,\n            \"max\": false,\n            \"min\": false,\n            \"show\": true,\n            \"total\": false,\n            \"values\": false\n          },\n          \"lines\": true,\n          \"linewidth\": 2,\n          \"links\": [],\n          \"nullPointMode\": \"connected\",\n          \"percentage\": false,\n          \"pointradius\": 5,\n          \"points\": false,\n          \"renderer\": \"flot\",\n          \"seriesOverrides\": [],\n          \"span\": 5,\n          \"stack\": false,\n          \"steppedLine\": false,\n          \"targets\": [\n            {\n              \"expr\": \"topk(5, 100 - (node_filesystem_free{instance=~\\\"$server:.*\\\",fstype=~\\\"xfs|ext4\\\"} / node_filesystem_size{instance=~\\\"$server:.*\\\",fstype=~\\\"xfs|ext4\\\"} * 100))\",\n              \"intervalFactor\": 2,\n              \"legendFormat\": \"{{mountpoint}}\",\n              \"refId\": \"A\",\n              \"step\": 40\n            }\n          ],\n          \"timeFrom\": null,\n          \"timeShift\": null,\n          \"title\": \"5 most used filesystems\",\n          \"tooltip\": {\n            \"msResolution\": false,\n            \"shared\": true,\n            \"sort\": 2,\n            \"value_type\": \"cumulative\"\n          },\n          \"type\": \"graph\",\n          \"xaxis\": {\n            \"show\": true\n          },\n          \"yaxes\": [\n            {\n              \"format\": \"percent\",\n              \"label\": null,\n              \"logBase\": 1,\n              \"max\": 100,\n              \"min\": 0,\n              \"show\": true\n            },\n            {\n              \"format\": \"short\",\n              \"label\": null,\n              \"logBase\": 1,\n              \"max\": null,\n              \"min\": null,\n              \"show\": false\n            }\n          ]\n        },\n        {\n          \"columns\": [\n            {\n              \"text\": \"Current\",\n              \"value\": \"current\"\n            },\n            {\n              \"text\": \"Max\",\n              \"value\": \"max\"\n            }\n          ],\n          \"editable\": true,\n          \"error\": false,\n          \"fontSize\": \"80%\",\n          \"id\": 20,\n          \"isNew\": true,\n          \"links\": [],\n          \"pageSize\": null,\n          \"scroll\": true,\n          \"showHeader\": true,\n          \"sort\": {\n            \"col\": 1,\n            \"desc\": true\n          },\n          \"span\": 4,\n          \"styles\": [\n            {\n              \"dateFormat\": \"YYYY-MM-DD HH:mm:ss\",\n              \"pattern\": \"Time\",\n              \"type\": \"date\"\n            },\n            {\n              \"colorMode\": null,\n              \"colors\": [\n                \"rgba(245, 54, 54, 0.9)\",\n                \"rgba(237, 129, 40, 0.89)\",\n                \"rgba(50, 172, 45, 0.97)\"\n              ],\n              \"decimals\": 2,\n              \"pattern\": \"Current|Max\",\n              \"thresholds\": [],\n              \"type\": \"number\",\n              \"unit\": \"percent\"\n            },\n            {\n              \"colorMode\": null,\n              \"colors\": [\n                \"rgba(245, 54, 54, 0.9)\",\n                \"rgba(237, 129, 40, 0.89)\",\n                \"rgba(50, 172, 45, 0.97)\"\n              ],\n              \"dateFormat\": \"YYYY-MM-DD HH:mm:ss\",\n              \"decimals\": 2,\n              \"pattern\": \"/.*/\",\n              \"thresholds\": [],\n              \"type\": \"number\",\n              \"unit\": \"short\"\n            }\n          ],\n          \"targets\": [\n            {\n              \"expr\": \"100 - (node_filesystem_free{instance=~\\\"$server:.*\\\",fstype=~\\\"xfs|ext4\\\"} / node_filesystem_size{instance=~\\\"$server:.*\\\",fstype=~\\\"xfs|ext4\\\"} * 100)\",\n              \"intervalFactor\": 2,\n              \"legendFormat\": \"{{mountpoint}}\",\n              \"refId\": \"A\",\n              \"step\": 40\n            }\n          ],\n          \"title\": \"Uso de Filesystem\",\n          \"transform\": \"timeseries_aggregations\",\n          \"type\": \"table\"\n        },\n        {\n          \"columns\": [\n            {\n              \"text\": \"Current\",\n              \"value\": \"current\"\n            }\n          ],\n          \"editable\": true,\n          \"error\": false,\n          \"fontSize\": \"80%\",\n          \"id\": 21,\n          \"isNew\": true,\n          \"links\": [],\n          \"pageSize\": null,\n          \"scroll\": true,\n          \"showHeader\": true,\n          \"sort\": {\n            \"col\": 1,\n            \"desc\": true\n          },\n          \"span\": 3,\n          \"styles\": [\n            {\n              \"dateFormat\": \"YYYY-MM-DD HH:mm:ss\",\n              \"pattern\": \"Time\",\n              \"type\": \"date\"\n            },\n            {\n              \"colorMode\": null,\n              \"colors\": [\n                \"rgba(245, 54, 54, 0.9)\",\n                \"rgba(237, 129, 40, 0.89)\",\n                \"rgba(50, 172, 45, 0.97)\"\n              ],\n              \"decimals\": 0,\n              \"pattern\": \"Current\",\n              \"thresholds\": [],\n              \"type\": \"number\",\n              \"unit\": \"bytes\"\n            },\n            {\n              \"colorMode\": null,\n              \"colors\": [\n                \"rgba(245, 54, 54, 0.9)\",\n                \"rgba(237, 129, 40, 0.89)\",\n                \"rgba(50, 172, 45, 0.97)\"\n              ],\n              \"dateFormat\": \"YYYY-MM-DD HH:mm:ss\",\n              \"decimals\": 2,\n              \"pattern\": \"/.*/\",\n              \"thresholds\": [],\n              \"type\": \"number\",\n              \"unit\": \"short\"\n            }\n          ],\n          \"targets\": [\n            {\n              \"expr\": \"node_filesystem_size{instance=~\\\"$server:.*\\\",fstype=~\\\"xfs|ext4\\\"}\",\n              \"intervalFactor\": 2,\n              \"legendFormat\": \"{{mountpoint}}\",\n              \"refId\": \"A\",\n              \"step\": 60\n            }\n          ],\n          \"title\": \"Tamaño de Filesystem\",\n          \"transform\": \"timeseries_aggregations\",\n          \"type\": \"table\"\n        }\n      ],\n      \"title\": \"New row\"\n    },\n    {\n      \"collapse\": false,\n      \"editable\": true,\n      \"height\": \"200px\",\n      \"panels\": [\n        {\n          \"alert\": {\n            \"crit\": {\n              \"op\": \">\"\n            },\n            \"warn\": {\n              \"op\": \">\"\n            }\n          },\n          \"alerting\": {},\n          \"aliasColors\": {},\n          \"bars\": false,\n          \"datasource\": \"prometheus\",\n          \"editable\": true,\n          \"error\": false,\n          \"fill\": 1,\n          \"grid\": {\n            \"threshold1\": null,\n            \"threshold1Color\": \"rgba(216, 200, 27, 0.27)\",\n            \"threshold2\": null,\n            \"threshold2Color\": \"rgba(234, 112, 112, 0.22)\"\n          },\n          \"id\": 6,\n          \"isNew\": true,\n          \"legend\": {\n            \"avg\": false,\n            \"current\": false,\n            \"max\": false,\n            \"min\": false,\n            \"show\": true,\n            \"total\": false,\n            \"values\": false\n          },\n          \"lines\": true,\n          \"linewidth\": 2,\n          \"links\": [],\n          \"nullPointMode\": \"connected\",\n          \"percentage\": false,\n          \"pointradius\": 5,\n          \"points\": false,\n          \"renderer\": \"flot\",\n          \"seriesOverrides\": [\n            {\n              \"alias\": \"read\",\n              \"yaxis\": 1\n            },\n            {\n              \"alias\": \"{instance=\\\"172.17.0.1:9100\\\"}\",\n              \"yaxis\": 2\n            },\n            {\n              \"alias\": \"io time\",\n              \"yaxis\": 2\n            }\n          ],\n          \"span\": 6,\n          \"stack\": false,\n          \"steppedLine\": false,\n          \"targets\": [\n            {\n              \"expr\": \"sum by (instance) (irate(node_disk_reads_completed{instance=~\\\"$server:.*\\\"}[5m]))\",\n              \"hide\": false,\n              \"intervalFactor\": 4,\n              \"legendFormat\": \"reads per second\",\n              \"refId\": \"A\",\n              \"step\": 60,\n              \"target\": \"\"\n            },\n            {\n              \"expr\": \"sum by (instance) (irate(node_disk_writes_completed{instance=~\\\"$server:.*\\\"}[5m]))\",\n              \"intervalFactor\": 4,\n              \"legendFormat\": \"writes per second\",\n              \"refId\": \"B\",\n              \"step\": 60\n            },\n            {\n              \"expr\": \"sum by (instance) (irate(node_disk_io_time_ms{instance=~\\\"$server:.*\\\"}[5m]))\",\n              \"intervalFactor\": 4,\n              \"legendFormat\": \"io time\",\n              \"refId\": \"C\",\n              \"step\": 60\n            },\n            {\n              \"expr\": \"sum by (instance) (irate(node_disk_reads_completed{instance=~\\\"$server:.*\\\"}[5m])) + sum by (instance) (irate(node_disk_writes_completed{instance=~\\\"$server:.*\\\"}[5m]))\",\n              \"intervalFactor\": 2,\n              \"legendFormat\": \"IOPS\",\n              \"refId\": \"D\",\n              \"step\": 30\n            }\n          ],\n          \"thresholds\": [],\n          \"timeFrom\": null,\n          \"timeShift\": null,\n          \"title\": \"IOPs\",\n          \"tooltip\": {\n            \"msResolution\": false,\n            \"shared\": true,\n            \"sort\": 0,\n            \"value_type\": \"cumulative\"\n          },\n          \"type\": \"graph\",\n          \"xaxis\": {\n            \"show\": true\n          },\n          \"yaxes\": [\n            {\n              \"format\": \"none\",\n              \"label\": null,\n              \"logBase\": 1,\n              \"max\": null,\n              \"min\": null,\n              \"show\": true\n            },\n            {\n              \"format\": \"ms\",\n              \"label\": null,\n              \"logBase\": 1,\n              \"max\": null,\n              \"min\": null,\n              \"show\": true\n            }\n          ]\n        },\n        {\n          \"aliasColors\": {},\n          \"bars\": false,\n          \"datasource\": \"prometheus\",\n          \"editable\": true,\n          \"error\": false,\n          \"fill\": 1,\n          \"grid\": {\n            \"threshold1\": null,\n            \"threshold1Color\": \"rgba(216, 200, 27, 0.27)\",\n            \"threshold2\": null,\n            \"threshold2Color\": \"rgba(234, 112, 112, 0.22)\"\n          },\n          \"id\": 22,\n          \"isNew\": true,\n          \"legend\": {\n            \"alignAsTable\": false,\n            \"avg\": false,\n            \"current\": false,\n            \"hideZero\": true,\n            \"max\": false,\n            \"min\": false,\n            \"rightSide\": false,\n            \"show\": true,\n            \"total\": false,\n            \"values\": false\n          },\n          \"lines\": true,\n          \"linewidth\": 1,\n          \"links\": [],\n          \"nullPointMode\": \"connected\",\n          \"percentage\": false,\n          \"pointradius\": 5,\n          \"points\": false,\n          \"renderer\": \"flot\",\n          \"seriesOverrides\": [],\n          \"span\": 6,\n          \"stack\": false,\n          \"steppedLine\": false,\n          \"targets\": [\n            {\n              \"expr\": \"rate(node_disk_io_time_ms{instance=~\\\"$server:.*\\\"}[5m])\",\n              \"intervalFactor\": 2,\n              \"legendFormat\": \"{{device}}\",\n              \"refId\": \"A\",\n              \"step\": 30\n            }\n          ],\n          \"timeFrom\": null,\n          \"timeShift\": null,\n          \"title\": \"Tiempo de IO por device (ms/s)\",\n          \"tooltip\": {\n            \"msResolution\": false,\n            \"shared\": true,\n            \"sort\": 2,\n            \"value_type\": \"cumulative\"\n          },\n          \"type\": \"graph\",\n          \"xaxis\": {\n            \"show\": true\n          },\n          \"yaxes\": [\n            {\n              \"format\": \"ms\",\n              \"label\": null,\n              \"logBase\": 1,\n              \"max\": null,\n              \"min\": null,\n              \"show\": true\n            },\n            {\n              \"format\": \"short\",\n              \"label\": null,\n              \"logBase\": 1,\n              \"max\": null,\n              \"min\": null,\n              \"show\": false\n            }\n          ]\n        }\n      ],\n      \"title\": \"New row\"\n    }\n  ],\n  \"time\": {\n    \"from\": \"now-3h\",\n    \"to\": \"now\"\n  },\n  \"timepicker\": {\n    \"refresh_intervals\": [\n      \"5s\",\n      \"10s\",\n      \"30s\",\n      \"1m\",\n      \"5m\",\n      \"15m\",\n      \"30m\",\n      \"1h\",\n      \"2h\",\n      \"1d\"\n    ],\n    \"time_options\": [\n      \"5m\",\n      \"15m\",\n      \"1h\",\n      \"6h\",\n      \"12h\",\n      \"24h\",\n      \"2d\",\n      \"7d\",\n      \"30d\"\n    ]\n  },\n  \"templating\": {\n    \"list\": [\n      {\n        \"current\": {},\n        \"datasource\": \"prometheus\",\n        \"hide\": 1,\n        \"includeAll\": false,\n        \"label\": \"Node\",\n        \"multi\": false,\n        \"name\": \"server\",\n        \"options\": [],\n        \"query\": \"label_values(node_boot_time, instance)\",\n        \"refresh\": 1,\n        \"regex\": \"/([^:]+):.*/\",\n        \"type\": \"query\"\n      }\n    ]\n  },\n  \"annotations\": {\n    \"list\": []\n  },\n  \"refresh\": false,\n  \"schemaVersion\": 12,\n  \"version\": 38,\n  \"links\": [],\n  \"gnetId\": 704, \"overwrite\": true }",
            "body_format": "json",
            "client_cert": null,
            "client_key": null,
            "content": null,
            "creates": null,
            "delimiter": null,
            "dest": null,
            "directory_mode": null,
            "follow": false,
            "follow_redirects": "safe",
            "force": false,
            "force_basic_auth": true,
            "group": null,
            "headers": {
                "Authorization": "Basic YWRtaW46MTIzNDU2",
                "Content-Type": "application/json"
            },
            "http_agent": "ansible-httpget",
            "method": "POST",
            "mode": null,
            "owner": null,
            "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "regexp": null,
            "remote_src": null,
            "removes": null,
            "return_content": false,
            "selevel": null,
            "serole": null,
            "setype": null,
            "seuser": null,
            "src": null,
            "status_code": [
                200
            ],
            "timeout": 30,
            "unsafe_writes": null,
            "url": "http://0.0.0.0:3000/api/dashboards/db",
            "url_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "url_username": "admin",
            "use_proxy": true,
            "user": "admin",
            "validate_certs": true
        }
    },
    "item": "/tmp/dashboards/704.json",
    "json": [
        {
            "classification": "DeserializationError",
            "message": "unexpected EOF"
        },
        {
            "classification": "RequiredError",
            "fieldNames": [
                "Dashboard"
            ],
            "message": "Required"
        }
    ],
    "msg": "Status code was not [200]: HTTP Error 400: Bad Request",
    "redirected": false,
    "status": 400,
    "url": "http://0.0.0.0:3000/api/dashboards/db"
}
	to retry, use: --limit @/home/devops/ansible/playbook/install-grafana.retry

@zonArt
Copy link

zonArt commented Aug 16, 2018

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

@nikosmeds
Copy link
Contributor

nikosmeds commented Aug 16, 2018

I experienced the same issue. Appears to be invalid .json file downloaded to /tmp/dashboards/.

TASK [cloudalchemy.grafana : import grafana dashboards] *******************************************************************************
failed: [10.100.100.102] (item=/tmp/dashboards/159.json) => {"changed": false, "connection": "close", "content": "[{\"classification\":\"DeserializationError\",\"message\":\"unexpected EOF\"},{\"fieldNames\":[\"Dashboard\"],\"classification\":\"RequiredError\",\"message\":\"Required\"}]", "content_length": "153", "content_type": "application/json; charset=utf-8", "date": "Thu, 16 Aug 2018 18:57:57 GMT", "item": "/tmp/dashboards/159.json", "json": [{"classification": "DeserializationError", "message": "unexpected EOF"}, {"classification": "RequiredError", "fieldNames": ["Dashboard"], "message": "Required"}], "msg": "Status code was 400 and not [200]: HTTP Error 400: Bad Request", "redirected": false, "status": 400, "url": "http://10.100.100.102:3000/api/dashboards/db"}

See details below.

$ cat /tmp/dashboards/159.json | jq .
parse error: Unfinished JSON term at EOF at line 2121, column 14
$ tail /tmp/dashboards/159.json
      "2d",
      "7d",
      "30d"
    ],
    "type": "timepicker"
  },
  "timezone": "browser",
  "title": "Prometheus system",
  "uid": "000000001",
  "version": 4

Somehow the file is being downloaded without the closing }.

I was able to workaround this by manually replacing the broken /tmp/dashboards/159.json file with one from https://grafana.com/dashboards/159 and re-running Ansible.

EDIT: It's also possible that Set the correct data source name in the dashboard causes this issue.

@wmluke
Copy link

wmluke commented Aug 17, 2018

I also noticed that /tmp/dashboards/ is not cleaned up, so I had to manually delete it; otherwise, the with_fileglob in import grafana dashboards may grab old dashboards

  with_fileglob:
    - "/tmp/dashboards/*"

@kagarlickij
Copy link

It looks like I have similar issue, could anybody advice how can I enable no_log: true in ansible-grafana/tasks/dashboards.yml please?

@paulfantom
Copy link
Member

@wmluke Yes, role doesn't clean this dir. We should probably start using automatic directory generation with tempfile for /tmp/dashboards directory. I don't want to have cleaning task for that, since it will cause role to be harder to debug. I started #90 to address this.

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 grafana_api_url variable:

grafana_api_url: "{{ grafana_url }}"

@kagarlickij no_log: true is enabled, I think you want no_log: false. Instruction on how you can do it is in one of my comments above.

@paulfantom paulfantom added the help wanted Extra attention is needed label Aug 21, 2018
@vspedr
Copy link

vspedr commented Aug 21, 2018

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?

@paulfantom
Copy link
Member

paulfantom commented Aug 21, 2018

@vspedr It should import every custom dashboard with .json extension located in directory defined by {{ grafana_dashboards_dir }}

This is done by copying dashboards to /tmp/dashboards on localhost. This task does it:

- name: copy local grafana dashboards

@kagarlickij
Copy link

I've noticed that dashboard 2030 is always installed successfully, but 5566 always fails, maybe it will help with finding issue root cause..

@Amygos
Copy link

Amygos commented Aug 23, 2018

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 /tmp/dashboards/ the resulting json file:

  "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

@paulfantom
Copy link
Member

@Amygos we are modifying dashboard files after download in this task:

- name: Set the correct data source name in the dashboard

Could you check if when this task is disabled (commented/deleted), dashboard files have proper ending?

@Amygos
Copy link

Amygos commented Aug 23, 2018

I have commented that task and nothing is changed, i have also commented all tasks after:

- name: download grafana dashboard from grafana.net to local folder

with the same result.
Before all tests i have deleted the directory /tmp/dashboards/.

@Amygos
Copy link

Amygos commented Aug 23, 2018

Downloading the dashboard with curl the resulting json is truncated:

[amygos@Ono-sendai ~]$ curl https://grafana.com/api/dashboards/6239/revisions/1/download | tail
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 24726  100 24726    0     0  35525      0 --:--:-- --:--:-- --:--:-- 35474
      "2d",
      "7d",
      "30d"
    ]
  },
  "timezone": "",
  "title": "Mysql - Prometheus",
  "uid": "6-kPlS7ik",
  "version": 16,
  "description": "Basic Mysql dashboard for the prometheus expo[amygos@Ono-sendai ~]$ 

But not if retrieved via grafana or Firefox. 🤔

@paulfantom
Copy link
Member

So it seems that dashboards are so big that they don't fit into some cache used by get_url module.

@paulfantom
Copy link
Member

On the second thought it might be that dashboards are chunked and get_url, curl, and wget cannot handle it.

@paulfantom
Copy link
Member

Also I found that downloading dashboard with curl --compressed works.

@paulfantom
Copy link
Member

Could someone check if solution from #92 works?

@Amygos
Copy link

Amygos commented Aug 24, 2018

I have check and it works for dashboard 6239 and fails for dashboard 704:

failed: [prometheus] (item=/tmp/dashboards/704.json) => {"changed": false, "connection": "close", "content": "{\"message\":\"Invalid alert data. Cannot save dashboard\"}", "content_length": "55", "content_type": "application/json", "date": "Fri, 24 Aug 2018 14:00:04 GMT", "item": "/tmp/dashboards/704.json", "json": {"message": "Invalid alert data. Cannot save dashboard"}, "msg": "Status code was 500 and not [200]: HTTP Error 500: Internal Server Error", "redirected": false, "status": 500, "url": "http://0.0.0.0:3000/api/dashboards/db"}

but i think is a different issue.

@paulfantom
Copy link
Member

Seems like grafana couldn't handle uploading 704. It might be worth adding retry and until if this error persists.

@lock
Copy link

lock bot commented Mar 24, 2019

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.

@lock lock bot locked and limited conversation to collaborators Mar 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

8 participants