{"action":"created","issue":{"url":"https://api.github.com/repos/grafana/grafana/issues/13728","repository_url":"https://api.github.com/repos/grafana/grafana","labels_url":"https://api.github.com/repos/grafana/grafana/issues/13728/labels{/name}","comments_url":"https://api.github.com/repos/grafana/grafana/issues/13728/comments","events_url":"https://api.github.com/repos/grafana/grafana/issues/13728/events","html_url":"https://github.com/grafana/grafana/issues/13728","id":371391134,"node_id":"MDU6SXNzdWUzNzEzOTExMzQ=","number":13728,"title":"can not import dashboard through http api","user":{"login":"justlooks","id":295168,"node_id":"MDQ6VXNlcjI5NTE2OA==","avatar_url":"https://avatars1.githubusercontent.com/u/295168?v=4","gravatar_id":"","url":"https://api.github.com/users/justlooks","html_url":"https://github.com/justlooks","followers_url":"https://api.github.com/users/justlooks/followers","following_url":"https://api.github.com/users/justlooks/following{/other_user}","gists_url":"https://api.github.com/users/justlooks/gists{/gist_id}","starred_url":"https://api.github.com/users/justlooks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justlooks/subscriptions","organizations_url":"https://api.github.com/users/justlooks/orgs","repos_url":"https://api.github.com/users/justlooks/repos","events_url":"https://api.github.com/users/justlooks/events{/privacy}","received_events_url":"https://api.github.com/users/justlooks/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-10-18T07:14:14Z","updated_at":"2018-12-21T12:04:55Z","closed_at":"2018-10-18T10:36:42Z","author_association":"NONE","body":"i try to import dashboard into my grafana(version is 5.1.4) but get error \r\n\r\n```\r\n# curl  --show-error --request POST \\\r\n> http://admin:admin@192.168.216.173:3000/api/dashboards/import \\\r\n> --header \"Content-Type: application/json\" --data-binary \"@./node-cpu-test.json\"\r\n{\"error\":\"Server Error\",\"message\":\"Internal Server Error - Check the Grafana server logs for the detailed error message.\"}\r\n```\r\n\r\nand i can not understand what grafana log means\r\n\r\n```\r\nt=2018-10-18T07:09:39+0000 lvl=eror msg=\"Request error\" logger=context userId=1 orgId=1 uname=admin error=\"runtime error: invalid memory address or nil pointer dereference\" stack=\"/usr/local/go/src/runtime/panic.go:505 (0x431ed8)\\n/usr/local/go/src/runtime/panic.go:63 (0x430f4d)\\n/usr/local/go/src/runtime/signal_unix.go:388 (0x447e19)\\n/go/src/github.com/grafana/grafana/pkg/components/simplejson/simplejson.go:198 (0x8b5ec3)\\n/go/src/github.com/grafana/grafana/pkg/plugins/dashboard_importer.go:54 (0xa21a74)\\n/go/src/github.com/grafana/grafana/pkg/plugins/dashboard_importer.go:54 (0xa21a74)\\n/go/src/github.com/grafana/grafana/pkg/plugins/dashboard_importer.go:54 (0xa21a74)\\n/usr/local/go/src/runtime/asm_amd64.s:573 (0x45f7aa)\\n/usr/local/go/src/reflect/value.go:447 (0x4bcb68)\\n/usr/local/go/src/reflect/value.go:308 (0x4bc0e3)\\n/go/src/github.com/grafana/grafana/pkg/bus/bus.go:73 (0x7bc020)\\n/go/src/github.com/grafana/grafana/pkg/bus/bus.go:154 (0x7bccd8)\\n/go/src/github.com/grafana/grafana/pkg/api/plugins.go:180 (0xe6e66d)\\n/usr/local/go/src/runtime/asm_amd64.s:575 (0x45f8c1)\\n/usr/local/go/src/reflect/value.go:447 (0x4bcb68)\\n/usr/local/go/src/reflect/value.go:308 (0x4bc0e3)\\n/go/src/github.com/grafana/grafana/vendor/github.com/go-macaron/inject/inject.go:177 (0x7c88e4)\\n/go/src/github.com/grafana/grafana/vendor/github.com/go-macaron/inject/inject.go:137 (0x7c8269)\\n/go/src/github.com/grafana/grafana/pkg/api/common.go:37 (0xe8102b)\\n/usr/local/go/src/runtime/asm_amd64.s:573 (0x45f7aa)\\n/usr/local/go/src/reflect/value.go:447 (0x4bcb68)\\n/usr/local/go/src/reflect/value.go:308 (0x4bc0e3)\\n/go/src/github.com/grafana/grafana/vendor/github.com/go-macaron/inject/inject.go:177 (0x7c88e4)\\n/go/src/github.com/grafana/grafana/vendor/github.com/go-macaron/inject/inject.go:137 (0x7c8269)\\n/go/src/github.com/grafana/grafana/vendor/gopkg.in/macaron.v1/context.go:121 (0x7e3ccd)\\n/go/src/github.com/grafana/grafana/vendor/gopkg.in/macaron.v1/context.go:112 (0x7e3c0e)\\n/go/src/github.com/grafana/grafana/pkg/middleware/request_tracing.go:25 (0xbdfd6f)\\n/usr/local/go/src/runtime/asm_amd64.s:573 (0x45f7aa)\\n/usr/local/go/src/reflect/value.go:447 (0x4bcb68)\\n/usr/local/go/src/reflect/value.go:308 (0x4bc0e3)\\n/go/src/github.com/grafana/grafana/vendor/github.com/go-macaron/inject/inject.go:177 (0x7c88e4)\\n/go/src/github.com/grafana/grafana/vendor/github.com/go-macaron/inject/inject.go:137 (0x7c8269)\\n/go/src/github.com/grafana/grafana/vendor/gopkg.in/macaron.v1/context.go:121 (0x7e3ccd)\\n/go/src/github.com/grafana/grafana/vendor/gopkg.in/macaron.v1/context.go:112 (0x7e3c0e)\\n/go/src/github.com/grafana/grafana/pkg/middleware/request_metrics.go:17 (0xbdf707)\\n/usr/local/go/src/runtime/asm_amd64.s:573 (0x45f7aa)\\n/usr/local/go/src/reflect/value.go:447 (0x4bcb68)\\n/usr/local/go/src/reflect/value.go:308 (0x4bc0e3)\\n/go/src/github.com/grafana/grafana/vendor/github.com/go-macaron/inject/inject.go:177 (0x7c88e4)\\n/go/src/github.com/grafana/grafana/vendor/github.com/go-macaron/inject/inject.go:137 (0x7c8269)\\n/go/src/github.com/grafana/grafana/vendor/gopkg.in/macaron.v1/context.go:121 (0x7e3ccd)\\n/go/src/github.com/grafana/grafana/vendor/gopkg.in/macaron.v1/context.go:112 (0x7e3c0e)\\n/go/src/github.com/grafana/grafana/pkg/middleware/session.go:15 (0xbdff61)\\n/usr/local/go/src/runtime/asm_amd64.s:573 (0x45f7aa)\\n/usr/local/go/src/reflect/value.go:447 (0x4bcb68)\\n/usr/local/go/src/reflect/value.go:308 (0x4bc0e3)\\n/go/src/github.com/grafana/grafana/vendor/github.com/go-macaron/inject/inject.go:177 (0x7c88e4)\\n/go/src/github.com/grafana/grafana/vendor/github.com/go-macaron/inject/inject.go:137 (0x7c8269)\\n/go/src/github.com/grafana/grafana/vendor/gopkg.in/macaron.v1/context.go:121 (0x7e3ccd)\\n/go/src/github.com/grafana/grafana/vendor/gopkg.in/macaron.v1/context.go:112 (0x7e3c0e)\\n/go/src/github.com/grafana/grafana/pkg/middleware/recovery.go:146 (0xbdf620)\\n/go/src/github.com/grafana/grafana/vendor/gopkg.in/macaron.v1/context.go:79 (0x7e3ae0)\\n/go/src/github.com/grafana/grafana/vendor/github.com/go-macaron/inject/inject.go:157 (0x7c85f6)\\n/go/src/github.com/grafana/grafana/vendor/github.com/go-macaron/inject/inject.go:135 (0x7c835a)\\n/go/src/github.com/grafana/grafana/vendor/gopkg.in/macaron.v1/context.go:121 (0x7e3ccd)\\n/go/src/github.com/grafana/grafana/vendor/gopkg.in/macaron.v1/context.go:112 (0x7e3c0e)\\n/go/src/github.com/grafana/grafana/pkg/middleware/logger.go:34 (0xbdcfa1)\\n/usr/local/go/src/runtime/asm_amd64.s:573 (0x45f7aa)\\n/usr/local/go/src/reflect/value.go:447 (0x4bcb68)\\n/usr/local/go/src/reflect/value.go:308 (0x4bc0e3)\\n/go/src/github.com/grafana/grafana/vendor/github.com/go-macaron/inject/inject.go:177 (0x7c88e4)\\n/go/src/github.com/grafana/grafana/vendor/github.com/go-macaron/inject/inject.go:137 (0x7c8269)\\n/go/src/github.com/grafana/grafana/vendor/gopkg.in/macaron.v1/context.go:121 (0x7e3ccd)\\n/go/src/github.com/grafana/grafana/vendor/gopkg.in/macaron.v1/router.go:187 (0x7f4191)\\n/go/src/github.com/grafana/grafana/vendor/gopkg.in/macaron.v1/router.go:294 (0x7eeb24)\\n/go/src/github.com/grafana/grafana/vendor/gopkg.in/macaron.v1/macaron.go:220 (0x7e8104)\\n/usr/local/go/src/net/http/server.go:2694 (0x69515b)\\n/usr/local/go/src/net/http/server.go:1830 (0x691460)\\n/usr/local/go/src/runtime/asm_amd64.s:2361 (0x461f50)\\n\"\r\nt=2018-10-18T07:09:39+0000 lvl=eror msg=\"Request Completed\" logger=context userId=1 orgId=1 uname=admin method=POST path=/api/dashboards/import status=500 remote_addr=192.168.216.158 time_ms=21 size=122 referer=\r\n\r\n```\r\n\r\nhere is my import dashboard json file\r\n```\r\n# cat node-cpu-test.json\r\n{\r\n  \"__inputs\": [\r\n    {\r\n      \"name\": \"DS_TEST_DATASOURCE\",\r\n      \"label\": \"test_datasource\",\r\n      \"description\": \"\",\r\n      \"type\": \"datasource\",\r\n      \"pluginId\": \"prometheus\",\r\n      \"pluginName\": \"Prometheus\"\r\n    }\r\n  ],\r\n  \"__requires\": [\r\n    {\r\n      \"type\": \"grafana\",\r\n      \"id\": \"grafana\",\r\n      \"name\": \"Grafana\",\r\n      \"version\": \"5.1.4\"\r\n    },\r\n    {\r\n      \"type\": \"panel\",\r\n      \"id\": \"graph\",\r\n      \"name\": \"Graph\",\r\n      \"version\": \"5.0.0\"\r\n    },\r\n    {\r\n      \"type\": \"datasource\",\r\n      \"id\": \"prometheus\",\r\n      \"name\": \"Prometheus\",\r\n      \"version\": \"5.0.0\"\r\n    }\r\n  ],\r\n  \"annotations\": {\r\n    \"list\": [\r\n      {\r\n        \"builtIn\": 1,\r\n        \"datasource\": \"-- Grafana --\",\r\n        \"enable\": true,\r\n        \"hide\": true,\r\n        \"iconColor\": \"rgba(0, 211, 255, 1)\",\r\n        \"name\": \"Annotations & Alerts\",\r\n        \"type\": \"dashboard\"\r\n      }\r\n    ]\r\n  },\r\n  \"description\": \"Nearly all default values exported by Prometheus node exporter graphed.\",\r\n  \"editable\": true,\r\n  \"gnetId\": 1860,\r\n  \"graphTooltip\": 0,\r\n  \"id\": null,\r\n  \"iteration\": 1539842629800,\r\n  \"links\": [],\r\n  \"panels\": [\r\n    {\r\n      \"collapsed\": true,\r\n      \"gridPos\": {\r\n        \"h\": 1,\r\n        \"w\": 24,\r\n        \"x\": 0,\r\n        \"y\": 0\r\n      },\r\n      \"id\": 261,\r\n      \"panels\": [],\r\n      \"repeat\": null,\r\n      \"title\": \"Basic CPU  Gauge\",\r\n      \"type\": \"row\"\r\n    },\r\n    {\r\n      \"aliasColors\": {},\r\n      \"bars\": false,\r\n      \"dashLength\": 10,\r\n      \"dashes\": false,\r\n      \"datasource\": \"${DS_TEST_DATASOURCE}\",\r\n      \"fill\": 1,\r\n      \"gridPos\": {\r\n        \"h\": 9,\r\n        \"w\": 24,\r\n        \"x\": 0,\r\n        \"y\": 1\r\n      },\r\n      \"id\": 263,\r\n      \"legend\": {\r\n        \"avg\": false,\r\n        \"current\": false,\r\n        \"max\": false,\r\n        \"min\": false,\r\n        \"show\": true,\r\n        \"total\": false,\r\n        \"values\": false\r\n      },\r\n      \"lines\": true,\r\n      \"linewidth\": 1,\r\n      \"links\": [],\r\n      \"nullPointMode\": \"null\",\r\n      \"percentage\": false,\r\n      \"pointradius\": 5,\r\n      \"points\": false,\r\n      \"renderer\": \"flot\",\r\n      \"seriesOverrides\": [],\r\n      \"spaceLength\": 10,\r\n      \"stack\": false,\r\n      \"steppedLine\": false,\r\n      \"targets\": [\r\n        {\r\n          \"expr\": \"sum by (instance)(rate(node_cpu_seconds_total{mode=\\\"system\\\",instance=~\\\"$hostname:9100\\\"}[5m])) * 100\",\r\n          \"format\": \"time_series\",\r\n          \"intervalFactor\": 1,\r\n          \"legendFormat\": \"Busy System\",\r\n          \"refId\": \"A\"\r\n        },\r\n        {\r\n          \"expr\": \"sum by (instance)(rate(node_cpu_seconds_total{mode=\\\"user\\\",instance=~\\\"$hostname:9100\\\"}[5m])) * 100\",\r\n          \"format\": \"time_series\",\r\n          \"intervalFactor\": 1,\r\n          \"legendFormat\": \"Busy User\",\r\n          \"refId\": \"B\"\r\n        },\r\n        {\r\n          \"expr\": \"sum by (instance)(rate(node_cpu_seconds_total{mode=\\\"iowait\\\",instance=~\\\"$hostname:9100\\\"}[5m])) * 100\",\r\n          \"format\": \"time_series\",\r\n          \"intervalFactor\": 1,\r\n          \"legendFormat\": \"Busy Iowait\",\r\n          \"refId\": \"C\"\r\n        },\r\n        {\r\n          \"expr\": \"sum by (instance)(rate(node_cpu_seconds_total{mode=~\\\".*irq\\\",instance=~\\\"$hostname:9100\\\"}[5m])) * 100\",\r\n          \"format\": \"time_series\",\r\n          \"intervalFactor\": 1,\r\n          \"legendFormat\": \"Busy IRQs\",\r\n          \"refId\": \"D\"\r\n        },\r\n        {\r\n          \"expr\": \"sum (rate(node_cpu_seconds_total{mode!=\\\"idle\\\",mode!=\\\"user\\\",mode!=\\\"system\\\",mode!=\\\"iowait\\\",mode!=\\\"irq\\\",mode!=\\\"softirq\\\",instance=~\\\"$hostname:9100\\\"}[5m])) * 100\",\r\n          \"format\": \"time_series\",\r\n          \"intervalFactor\": 1,\r\n          \"legendFormat\": \"Busy Other\",\r\n          \"refId\": \"E\"\r\n        },\r\n        {\r\n          \"expr\": \"sum by (mode)(rate(node_cpu_seconds_total{mode='idle',instance=~\\\"$hostname:9100\\\"}[5m])) * 100\",\r\n          \"format\": \"time_series\",\r\n          \"intervalFactor\": 1,\r\n          \"legendFormat\": \"Idle\",\r\n          \"refId\": \"F\"\r\n        }\r\n      ],\r\n      \"thresholds\": [],\r\n      \"timeFrom\": null,\r\n      \"timeShift\": null,\r\n      \"title\": \"Basic CPU Info\",\r\n      \"tooltip\": {\r\n        \"shared\": true,\r\n        \"sort\": 0,\r\n        \"value_type\": \"individual\"\r\n      },\r\n      \"type\": \"graph\",\r\n      \"xaxis\": {\r\n        \"buckets\": null,\r\n        \"mode\": \"time\",\r\n        \"name\": null,\r\n        \"show\": true,\r\n        \"values\": []\r\n      },\r\n      \"yaxes\": [\r\n        {\r\n          \"format\": \"short\",\r\n          \"label\": null,\r\n          \"logBase\": 1,\r\n          \"max\": null,\r\n          \"min\": null,\r\n          \"show\": true\r\n        },\r\n        {\r\n          \"format\": \"short\",\r\n          \"label\": null,\r\n          \"logBase\": 1,\r\n          \"max\": null,\r\n          \"min\": null,\r\n          \"show\": true\r\n        }\r\n      ],\r\n      \"yaxis\": {\r\n        \"align\": false,\r\n        \"alignLevel\": null\r\n      }\r\n    }\r\n  ],\r\n  \"refresh\": false,\r\n  \"schemaVersion\": 16,\r\n  \"style\": \"dark\",\r\n  \"tags\": [],\r\n  \"templating\": {\r\n    \"list\": [\r\n      {\r\n        \"allValue\": null,\r\n        \"current\": {},\r\n        \"datasource\": \"${DS_TEST_DATASOURCE}\",\r\n        \"hide\": 0,\r\n        \"includeAll\": false,\r\n        \"label\": \"hostname\",\r\n        \"multi\": false,\r\n        \"name\": \"hostname\",\r\n        \"options\": [],\r\n        \"query\": \"{instance=~\\\"(.+)\\\", job=\\\"node status\\\"}\",\r\n        \"refresh\": 1,\r\n        \"regex\": \"/instance=\\\"([^\\\"]+):9100\\\"/\",\r\n        \"sort\": 1,\r\n        \"tagValuesQuery\": \"\",\r\n        \"tags\": [],\r\n        \"tagsQuery\": \"\",\r\n        \"type\": \"query\",\r\n        \"useTags\": false\r\n      }\r\n    ]\r\n  },\r\n  \"time\": {\r\n    \"from\": \"2018-10-18T04:14:24.465Z\",\r\n    \"to\": \"2018-10-18T06:17:16.208Z\"\r\n  },\r\n  \"timepicker\": {\r\n    \"refresh_intervals\": [\r\n      \"5s\",\r\n      \"10s\",\r\n      \"30s\",\r\n      \"1m\",\r\n      \"5m\",\r\n      \"15m\",\r\n      \"30m\",\r\n      \"1h\",\r\n      \"2h\",\r\n      \"1d\"\r\n    ],\r\n    \"time_options\": [\r\n      \"5m\",\r\n      \"15m\",\r\n      \"1h\",\r\n      \"6h\",\r\n      \"12h\",\r\n      \"24h\",\r\n      \"2d\",\r\n      \"7d\",\r\n      \"30d\"\r\n    ]\r\n  },\r\n  \"timezone\": \"browser\",\r\n  \"title\": \"Node Exporter Full\",\r\n  \"uid\": \"R6loc7xik\",\r\n  \"version\": 6\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/grafana/grafana/issues/comments/449371756","html_url":"https://github.com/grafana/grafana/issues/13728#issuecomment-449371756","issue_url":"https://api.github.com/repos/grafana/grafana/issues/13728","id":449371756,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0OTM3MTc1Ng==","user":{"login":"marefr","id":1668778,"node_id":"MDQ6VXNlcjE2Njg3Nzg=","avatar_url":"https://avatars0.githubusercontent.com/u/1668778?v=4","gravatar_id":"","url":"https://api.github.com/users/marefr","html_url":"https://github.com/marefr","followers_url":"https://api.github.com/users/marefr/followers","following_url":"https://api.github.com/users/marefr/following{/other_user}","gists_url":"https://api.github.com/users/marefr/gists{/gist_id}","starred_url":"https://api.github.com/users/marefr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marefr/subscriptions","organizations_url":"https://api.github.com/users/marefr/orgs","repos_url":"https://api.github.com/users/marefr/repos","events_url":"https://api.github.com/users/marefr/events{/privacy}","received_events_url":"https://api.github.com/users/marefr/received_events","type":"User","site_admin":false},"created_at":"2018-12-21T12:04:55Z","updated_at":"2018-12-21T12:04:55Z","author_association":"MEMBER","body":"@frankscholten you don't seem to have dashboard property in your json, see [http api docs](http://docs.grafana.org/http_api/dashboard/#create-update-dashboard) for reference."}}
{"actor":{"display_login":"marefr"}}