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
ying-jeanne c57047a420
Postgres: allow providing TLS/SSL certificates as text in addition to file paths (#30353)
* postgres SSL certification

* add back the UI to configure SSL Authentication files by file path

* add backend logic

* correct unittest

* mini changes

* Update public/app/plugins/datasource/postgres/config_ctrl.ts

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Update public/app/plugins/datasource/postgres/partials/config.html

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* mutex

* check file exist before remove

* change permission

* change default configuremethod to file-path

* Update public/app/plugins/datasource/postgres/partials/config.html

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

* Update public/app/plugins/datasource/postgres/partials/config.html

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

* Update public/app/plugins/datasource/postgres/partials/config.html

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

* Update public/app/plugins/datasource/postgres/partials/config.html

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

* rename sslconfiguremethod to sslconfigurationmethod

* frontend update

* solve comments

* Postgres: Convert tests to stdlib

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Postgres: Be consistent about TLS/SSL terminology

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* fix init inconsistancy

* Fix tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* naming convention

* Fix tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Undo change

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix TLS issue

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* change permissions

* Fix data source field names

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Clean up HTML

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Improve popover text

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix SSL input bug

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Undo unnecessary change

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Clean up backend code

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix build

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* More consistent naming

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Clean up code

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Enforce certificate file permissions

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* add settings

* Undo changes

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* fix windows file path

* PostgresDataSource: Fix mutex usage

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Update pkg/tsdb/postgres/postgres.go

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

* Apply suggestions from code review

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

* fix compilation

* fix unittest

* Apply suggestions from code review

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

* Apply suggestions from code review

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

* mock function

* change kmutex package

* add kmutex into middleware

* lock connection file per datasource

* add unittest regarding concurrency

* version should be equal

* adding unittest

* fix the loop

* fix unitest

* fix postgres unittst

* remove comments

* move dataPath from arg to tlsManager struct field

* Use DecryptedValues method

Use cached decrypted values instead of
using secure json data decrypt which will
decrypt unchanged values over and over again.

* remove unneeded mutex in tests and cleanup tests

* fix the lint

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-02-23 22:10:55 +01:00
.circleci Circle: Remove release pipeline (#28474) 2020-10-22 16:22:48 +02:00
.github add hg team as migrations code owners (#31420) 2021-02-23 16:58:33 +01:00
conf Usage stats: Adds source/distributor setting (#31039) 2021-02-10 10:07:32 +01:00
contribute Docs: updated developer guide (#29978) 2021-02-05 09:35:21 +01:00
dashboard-schemas DashboardSchemas: OpenAPI Schema Generation (#30242) 2021-01-19 18:25:00 +01:00
devenv Devenv: Add gdev-influxdb2 data source (#31250) 2021-02-23 16:30:35 +01:00
docs remove squadcast details from docs (#31413) 2021-02-23 09:17:40 -05:00
e2e Devenv: Remove old-versioned loki blocks and update prometheus2 block (#31282) 2021-02-19 18:06:09 +01:00
emails Prettier: Upgrade to 2 (#30387) 2021-01-20 07:59:48 +01:00
grafana-mixin reduce severity level to warning (#28939) 2020-11-20 10:30:51 +01:00
packages Postgres: allow providing TLS/SSL certificates as text in addition to file paths (#30353) 2021-02-23 22:10:55 +01:00
packaging Docker: use root group in the custom Dockerfile (#28639) 2020-10-29 15:02:09 +01:00
pkg Postgres: allow providing TLS/SSL certificates as text in addition to file paths (#30353) 2021-02-23 22:10:55 +01:00
plugins-bundled Eslint: no-duplicate-imports rule (bump grafana-eslint-config) (#30989) 2021-02-11 13:45:25 +01:00
public Postgres: allow providing TLS/SSL certificates as text in addition to file paths (#30353) 2021-02-23 22:10:55 +01:00
scripts Remove tidy-check script (#31423) 2021-02-23 17:53:30 +02:00
tools Image Rendering: Remove PhantomJS support (#23460) 2020-04-15 22:17:41 +02:00
.babelrc Performance/Webpack: Introduces more aggressive code-splitting and other perf improvements (#18544) 2019-09-03 09:29:02 +01:00
.bra.toml Chore: Upgrade to Go 1.14 (#23371) 2020-04-08 14:13:05 +02:00
.browserslistrc Fix: Autoprefixer is now working (#16351) 2019-04-02 18:15:30 +02:00
.dockerignore remove duplicated /tmp entry in .dockerignore 2018-08-09 09:10:53 +02:00
.drone.star Drone: Add version branch pipeline (#28490) 2020-10-23 10:16:17 +02:00
.drone.yml Remove tidy-check script (#31423) 2021-02-23 17:53:30 +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 Chore: Lint all files for no-only-tests (#30364) 2021-01-19 11:06:27 +01:00
.gitattributes CRLF (#28822) 2020-11-05 17:20:40 +01:00
.gitignore Add menu.yaml to .gitignore (#30743) 2021-01-29 10:42:53 -05:00
.prettierignore Prettier: ignore build and devenv dirs (#30501) 2021-01-21 11:11:43 -08: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 Grunt: Removes grunt dependency and replaces some of its usage (#29461) 2020-12-01 10:32:12 +01: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 7.4.2 (#31313) 2021-02-21 08:06:25 +01:00
CODE_OF_CONDUCT.md Docs: Refactor inconsistent unordered lists (#27826) 2020-10-02 11:02:11 -07:00
CONTRIBUTING.md IssueTriage: Needs more info automation and messages (#28137) 2020-10-16 16:49:55 +02:00
Dockerfile Make build docker full fix (#29570) 2020-12-03 14:17:40 +01:00
Dockerfile.ubuntu Make build docker full fix (#29570) 2020-12-03 14:17:40 +01:00
go.mod Chore: Remove gotest.tools dependency (#31391) 2021-02-22 11:53:15 +01:00
go.sum Chore(deps): Bump github.com/prometheus/common from 0.15.0 to 0.17.0 (#31387) 2021-02-22 10:57:56 +01:00
GOVERNANCE.md Add Alex Khomenko as member (#28032) 2020-10-05 15:08:16 +03:00
ISSUE_TRIAGE.md GrafanaBot: Update labels and commands and adds docs (#28950) 2020-11-09 21:45:18 +01:00
jest.config.js Chore: Bump storybook to v6 (#28926) 2020-11-24 10:38:41 +01:00
latest.json update latest release version (#31296) 2021-02-17 19:20:04 +01:00
lerna.json AlertingNG: List saved Alert definitions in Alert Rule list (#30603) 2021-01-26 12:12:41 +01:00
LICENSE Small license correction 2019-03-21 16:36:24 +01:00
MAINTAINERS.md Docs: Refactor inconsistent unordered lists (#27826) 2020-10-02 11:02:11 -07:00
Makefile Remove tidy-check script (#31423) 2021-02-23 17:53:30 +02:00
NOTICE.md Update NOTICE.md 2021-01-06 08:16:50 +01:00
package.json Chore: Upgrade eslint packages (#31408) 2021-02-23 10:02:07 +01:00
PLUGIN_DEV.md Update PLUGIN_DEV.md (#19387) 2019-09-26 12:40:47 +02:00
README.md Fix titles case and add missing punctuation marks (#28713) 2020-11-05 09:17:08 -05: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 Docs: Fix note format for documentation (#27940) 2020-09-30 12:45:07 -07:00
WORKFLOW.md Docs: Minor docs update 2020-11-10 12:14:02 +01:00
yarn.lock Chore: Upgrade eslint packages (#31408) 2021-02-23 10:02:07 +01:00

Grafana

The open-source platform for monitoring and observability.

License Circle CI 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 the Apache 2.0 License.