Comments (3)
Looks like we might be able to debug it a bit with #127. Handful of additional questions:
- Has it worked previously or is this a new install?
- Can you confirm that you can open
<your grafana host>/api/search?type=dash-db
from the bot host?
# If you have an API key
curl -H "Authorization: bearer <your token>" "<your grafana host>/api/search?type=dash-db"
# If you do not have an API token
curl "<your grafana host>/api/search?type=dash-db"
The JSON parsing error is because it received some other content instead of JSON, which is usually caused by an HTML page coming over instead. The linked PR aims to improve debugging to find this out sooner, but I'm not a fan of the way it requires changing every method call in order to echo back to the user.
from hubot-grafana.
Looks like we might be able to debug it a bit with #127. Handful of additional questions:
- Has it worked previously or is this a new install?
- Can you confirm that you can open
<your grafana host>/api/search?type=dash-db
from the bot host?# If you have an API key curl -H "Authorization: bearer <your token>" "<your grafana host>/api/search?type=dash-db" # If you do not have an API token curl "<your grafana host>/api/search?type=dash-db"The JSON parsing error is because it received some other content instead of JSON, which is usually caused by an HTML page coming over instead. The linked PR aims to improve debugging to find this out sooner, but I'm not a fan of the way it requires changing every method call in order to echo back to the user.
Hi @stephenyeargin ,
Sorry for the late response. Answers for 2 questions ;
- Yes . this is fresh installation.
- Yes, I can open
<your grafana host>/api/search?type=dash-db
from the bot host
from hubot-grafana.
Let's try using the debug branch to get a better look at it. In your package.json
, change to:
"hubot-grafana": "stephenyeargin/hubot-grafana#improve-error-handling",
Then, in your environment settings, set HUBOT_LOG_LEVEL=debug
.
Here's an example of it encountering a redirect:
Hubot> !graf list
Hubot> [Sat Jan 09 2021 22:32:04 GMT-0600 (Central Standard Time)] DEBUG Message '!graf list' matched regex //^\s*[@]?(?:Hubot[:,]?|![:,]?)\s*(?:(?:grafana|graph|graf) list\s?(.+)?)/i/; listener.options = { id: null }
[Sat Jan 09 2021 22:32:04 GMT-0600 (Central Standard Time)] DEBUG Executing listener callback for Message '!graf list'
[Sat Jan 09 2021 22:32:04 GMT-0600 (Central Standard Time)] DEBUG <html>
<head><title>308 Permanent Redirect</title></head>
<body>
<center><h1>308 Permanent Redirect</h1></center>
<hr><center>nginx/1.15.10</center>
</body>
</html>
[Sat Jan 09 2021 22:32:04 GMT-0600 (Central Standard Time)] ERROR An error ocurred calling the Grafana API on <http://play.grafana.org>. See logs for details.
[Sat Jan 09 2021 22:32:04 GMT-0600 (Central Standard Time)] DEBUG false
[Sat Jan 09 2021 22:32:04 GMT-0600 (Central Standard Time)] DEBUG false
An error ocurred calling the Grafana API on <http://play.grafana.org>. See logs for details.
from hubot-grafana.
Related Issues (20)
- graf db nginx-lua Why is the grafana homepage returned? HOT 8
- TimeZone support HOT 2
- Grafana 7: Full screen leads to localhost:3000 redirect HOT 4
- hubot-grafana does not work for Grafana 8 HOT 7
- Upgrade from 2.5.2 to 3.0.1: dashboards can't be accessed by slug anymore HOT 5
- Can only receive 1 image by each query which queries all panels in the dashboard HOT 2
- Allow the bot to respond in a thread HOT 2
- S3 Region breaks existing setup HOT 2
- Support for @hubot-friends/hubot-slack
- feat: clean the NPM package to make its footprint smaller
- Getting rid of the obsolete request dependency
- Tests are too slow or timing out HOT 2
- Refactor platform specific actions to adapters? HOT 3
- Download method needs API key in header HOT 3
- [Windows] Unable to run `npm test` HOT 4
- Let's do some big refactoring
- Typings
- Bot will respond multiple times when Grafana is a bit slow
- Slack upload fails with `TypeError: this.robot.adapter.client.web.files.uploadV2 is not a function`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hubot-grafana.