The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
Go to file
Piotr Jamróz 9ace8686a1
Datasources: Improve error handling for testing data sources (#35120)
* Improve error handling for error messages

The error message will be read from error object from the following properties in the following order:
- message
- data.message
- statusText

* Convert api/ds/query errors to TestingStatus

SQL datasources (mysql, mssql, postgres) and CloudWatch use api/ds/query to test the data source, but previously didn't handle errors returned by this endpoint. If the error cannot be handled it's re-thrown to be handled in public/app/features/datasources/state/actions.ts

* Use async/await instead of Promises

* Remove incorrect type import

TestingStatus is in app/types. Should be pulled down to grafana/data but it depends on HealthCheckResultDetails that is public and lives in grafana/runtime. Ideally TestingStatus should live in grafana/data but I'm not sure if HealthCheckResultDetails can be move there too (?)

* Update packages/grafana-data/src/types/datasource.ts

Co-authored-by: Erik Sundell <erik.sundell@grafana.com>

* Handle errors with no details in toTestingStatus instead of re-throwing

* Update packages/grafana-data/src/types/datasource.ts

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

Co-authored-by: Erik Sundell <erik.sundell@grafana.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-07-08 14:32:27 +02:00
.circleci Chore: Add Circle CI empty config (#35020) 2021-06-01 11:56:11 +02:00
.github Update CODEOWNERS (#35287) 2021-06-04 21:19:30 +02:00
.vscode Dev: include vscode launcher / debugger (#36360) 2021-07-07 00:05:30 -07:00
conf HTTP Client: Introduce dataproxy_max_idle_connections config variable (#35864) 2021-07-07 13:13:53 +03:00
contribute Docs: added an accessibility section in the pull request guide (#36454) 2021-07-08 12:04:56 +02:00
cue remove feature toggle + add libraryPaneldefinition (#34488) 2021-05-27 11:14:58 +02:00
cue.mod Introduce "scuemata" system for CUE-based specification of Grafana objects (#32527) 2021-04-08 01:11:11 -07:00
devenv TimeSeries: Support coloring series and line by thresholds or gradient color scales (#35910) 2021-07-07 12:40:40 +02:00
docs Image Renderer: update env variable in docs and custom Docker files (#36501) 2021-07-07 18:05:55 +02:00
e2e Chore: Upgrades Cypress to 7.5.0 (#35517) 2021-06-16 14:34:56 +02:00
emails Alerting: update email template (#34205) 2021-05-19 18:58:31 +02:00
grafana-mixin reduce severity level to warning (#28939) 2020-11-20 10:30:51 +01:00
packages Datasources: Improve error handling for testing data sources (#35120) 2021-07-08 14:32:27 +02:00
packaging Image Renderer: update env variable in docs and custom Docker files (#36501) 2021-07-07 18:05:55 +02:00
pkg Gradually remove Macaron web framework (#36325) 2021-07-08 14:19:40 +02:00
plugins-bundled feat(plugin-admin-app): show message prompting user to refresh browser when installing panel plugin (#35271) 2021-06-04 19:20:06 +02:00
public Datasources: Improve error handling for testing data sources (#35120) 2021-07-08 14:32:27 +02:00
scripts Bump babel to 7.14.x for typescript 4.3 support (#36465) 2021-07-07 10:43:17 +02:00
tools Image Rendering: Remove PhantomJS support (#23460) 2020-04-15 22:17:41 +02:00
.bra.toml Chore: Upgrade to Go 1.14 (#23371) 2020-04-08 14:13:05 +02:00
.browserslistrc Babel: Target more modern browsers, updates browserlistrc (#32573) 2021-04-01 10:32:00 +02:00
.dockerignore remove duplicated /tmp entry in .dockerignore 2018-08-09 09:10:53 +02:00
.drone.star 33369: Add pipeline step with trivy scan for latest on grafana/grafan… (#34660) 2021-05-26 14:27:40 +02:00
.drone.yml CI: Depend on frontend build before triggering frontend metrics (#36253) 2021-06-29 10:29:34 +02:00
.editorconfig Chore: Enable PR testing in Drone (#26189) 2020-07-10 16:09:21 +02:00
.eslintignore Chore: Lint all files for no-only-tests (#30364) 2021-01-19 11:06:27 +01:00
.eslintrc Performance: Standardize lodash imports to use destructured members (#33040) 2021-04-21 09:38:00 +02:00
.gitattributes CRLF (#28822) 2020-11-05 17:20:40 +01:00
.gitignore Dev: ignore vscode folder except launch.json (#36517) 2021-07-07 17:03:10 +02:00
.prettierignore Theming: Updates to select styles and theme model progress (#32797) 2021-04-12 14:23:00 +02:00
.prettierrc.js Prettier: Add prettier config that imports prettier from toolkit (#23729) 2020-04-21 17:23:49 +02:00
api-extractor.json Docs: added code comments for everything in the @grafana/runtime package. (#23456) 2020-04-15 10:46:51 +02:00
build.go remove GO111MODULE (#36235) 2021-06-29 10:01:21 +02:00
CHANGELOG_ARCHIVE.md Automation: Adds new changelog actions (#29142) 2020-11-16 21:34:19 +01:00
CHANGELOG.md ReleaseNotes: Updated changelog and release notes for 8.0.4 (#36347) 2021-07-01 15:59:46 +02:00
CODE_OF_CONDUCT.md Docs: Refactor inconsistent unordered lists (#27826) 2020-10-02 11:02:11 -07:00
CONTRIBUTING.md Chore: Move from master to main branch (#33693) 2021-05-06 16:29:29 +02:00
Dockerfile AccessControl: Add provisioning folder to the packaging process (#34398) 2021-05-20 09:41:39 +02:00
Dockerfile.ubuntu AccessControl: Add provisioning folder to the packaging process (#34398) 2021-05-20 09:41:39 +02:00
embed.go Introduce "scuemata" system for CUE-based specification of Grafana objects (#32527) 2021-04-08 01:11:11 -07:00
go.mod Gradually remove Macaron web framework (#36325) 2021-07-08 14:19:40 +02:00
go.sum update backend-sdk to v0.106.0 (#36543) 2021-07-08 16:51:48 +08:00
GOVERNANCE.md Update GOVERNANCE.md (#36223) 2021-06-28 17:55:25 +02:00
ISSUE_TRIAGE.md Chore: Move from master to main branch (#33693) 2021-05-06 16:29:29 +02:00
jest.config.js Temporarily extend default jest timeout to alliviate stress on drone (#34369) 2021-05-19 12:40:10 +02:00
latest.json chore: update latest.json to 8.0.4 (#36357) 2021-07-01 16:33:48 +02:00
lerna.json Update packages version (#34064) 2021-05-13 16:02:18 +02:00
LICENSE Re-license Grafana to AGPLv3 (#33184) 2021-04-20 19:03:30 +02:00
LICENSING.md Put vendored code under their upstream licenses explicitly (#36442) 2021-07-05 21:33:01 +02:00
MAINTAINERS.md Docs: Refactor inconsistent unordered lists (#27826) 2020-10-02 11:02:11 -07:00
Makefile remove GO111MODULE (#36235) 2021-06-29 10:01:21 +02:00
metadata.md Docs: Document plugin authentication in metadata schema (#32703) 2021-04-08 18:13:18 +02:00
NOTICE.md Update NOTICE.md 2021-01-06 08:16:50 +01:00
package.json Bump babel to 7.14.x for typescript 4.3 support (#36465) 2021-07-07 10:43:17 +02:00
PLUGIN_DEV.md Chore: Move from master to main branch (#33693) 2021-05-06 16:29:29 +02:00
README.md 33507_drone_badge: Replace CircleCI badge in readme with drone badge (#33649) 2021-05-04 17:59:52 +08:00
ROADMAP.md Update ROADMAP.md (#19384) 2019-09-25 07:18:35 +02:00
SECURITY.md Docs: Fix broken link (#25664) 2020-06-18 14:08:26 +02:00
SUPPORT.md Update SUPPORT.md (#19383) 2019-09-25 07:17:01 +02:00
tsconfig.json Tests: Adds expects for observables (#28929) 2020-11-18 15:18:55 +01:00
UPGRADING_DEPENDENCIES.md remove GO111MODULE (#36235) 2021-06-29 10:01:21 +02:00
WORKFLOW.md Chore: Move from master to main branch (#33693) 2021-05-06 16:29:29 +02:00
yarn.lock Bump babel to 7.14.x for typescript 4.3 support (#36465) 2021-07-07 10:43:17 +02:00

Grafana

The open-source platform for monitoring and observability.

License Drone Go Report Card

Grafana allows you to query, visualize, alert on and understand your metrics no matter where they are stored. Create, explore, and share dashboards with your team and foster a data driven culture:

  • Visualize: Fast and flexible client side graphs with a multitude of options. Panel plugins offer many different ways to visualize metrics and logs.
  • Dynamic Dashboards: Create dynamic & reusable dashboards with template variables that appear as dropdowns at the top of the dashboard.
  • Explore Metrics: Explore your data through ad-hoc queries and dynamic drilldown. Split view and compare different time ranges, queries and data sources side by side.
  • Explore Logs: Experience the magic of switching from metrics to logs with preserved label filters. Quickly search through all your logs or streaming them live.
  • Alerting: Visually define alert rules for your most important metrics. Grafana will continuously evaluate and send notifications to systems like Slack, PagerDuty, VictorOps, OpsGenie.
  • Mixed Data Sources: Mix different data sources in the same graph! You can specify a data source on a per-query basis. This works for even custom datasources.

Get started

Unsure if Grafana is for you? Watch Grafana in action on play.grafana.org!

Documentation

The Grafana documentation is available at grafana.com/docs.

Contributing

If you're interested in contributing to the Grafana project:

Get involved

License

Grafana is distributed under AGPL-3.0-only. For Apache-2.0 exceptions, see LICENSING.md.