grafana上的脚本仪表板

时间:2014-08-25 21:11:27

标签: javascript json graphite grafana

我使用grafana处理石墨数据,但是当我尝试解析它时,我收到错误。这是因为服务器没有给我一个JSON。

我尝试使用脚本式仪表板,我使用的脚本是:https://gist.github.com/anatolijd/73b1360c9780c0d161b1

function expand_filter_valuesvar obj = JSON.parse(req.responseText);上,显然response.text不是JSON对象,而是带有此内容的html:

< !-- Copyright 2008 Orbitz WorldWide

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. -- >



< html><br>
    < head><br>
    < title>Graphite Browser< /title><br>
  < /head>


< frameset rows="60,*" frameborder="1" border="1">
  < frame src="/browser/header/" name="Header" id='header' scrolling="no" noresize="true" />

  < frame src="/composer/?query=myhost.xxx.%2A" name="content" id="composerFrame"/>

  < /frameset>
< /html>

请帮帮我吗?

1 个答案:

答案 0 :(得分:0)

石墨地址错了,我改变了,一切正常。