* Solving two of the code scanning fails
Removes new lines from user input that is logged. Fixes CWE-117 from CodeQL
* remove newlines from request headers
* mask cookie value in header
* comment out logging of headers to solve CWE-117
Instructions added on uncommenting the log statement and on rebuilding the docker container
* use fixed_interval in date_histogram
* Add 8.0 to available versions in datasource settings
* Remove moving_avg from available metric aggregations
* Add ES8 devenv
* Update public/app/plugins/datasource/elasticsearch/components/QueryEditor/MetricAggregationsEditor/utils.ts
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
* Add FE tests
* Add BE test
* fix FE test
* fix BE test
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
* Update to golang 1.17
* Further updates
* Run go mod tidy on go 1.17
* Apply suggestions from code review
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* Use build-container:1.4.2
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* Elasticsearch: add first version of rate aggregation
* Add test for rate aggreation settings editor
* Fix unit
* Add default value for mode for rate agg
* Add todo
* Revert "Add default value for mode for rate agg"
This reverts commit a44c985d8b.
* Fix width when select is empty
* Add rate aggregation to elasticsearch models
* Remove rate aggregation from extended stats
* Move elastic2 docker block & add elastic (latest)
* Add versionRange to rate aggregation
* add 7.10 elasticsearch version option
* Set supportsInlineScript to true for rate aggregation
* Remove fixed width from select
* Change seconds label for rate aggregation unit options dropdown
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
Co-authored-by: Elfo404 <me@giordanoricci.com>
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
Uses new httpclient package from grafana-plugin-sdk-go introduced
via grafana/grafana-plugin-sdk-go#328.
Replaces the GetHTTPClient, GetTransport, GetTLSConfig methods defined
on DataSource model.
Longer-term the goal is to migrate core HTTP backend data sources to use the
SDK contracts and using httpclient.Provider for creating HTTP clients and such.
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Devenv: add block for es 5.0, provisioned datasource & dashboard
* Trasnsform script property based on running ES version
* Handle different scripts format in BE
* FrontendMetrics: Adds new backend api that frontend can use to push frontend measurements and counters to prometheus
* FrontendMetrics: Adds new backend api that frontend can use to push frontend measurements and counters to prometheus
* Fix naming
* change to histogram
* Fixed go lint
Fix encoded characters in URL path should be proxied as encoded in the data proxy.
Fixes#26870Fixes#31438
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Remove very old-versioned loki blocks
* Update prometheus block from 2.7.2 to latest
* Remove data sources in Grafana
* Fix e2e test not to intercept the whole url
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
* Add dev env block for influx2
* Add http settings to influx config
* Update devenv/docker/blocks/influxdb2/docker-compose.yaml
Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
* Add support for Sensu Go notification channel
Similar to current support for the older "Core" version of
Sensu, this commit add support for the newer version.
Closes#19908
Signed-off-by: Todd Campbell <todd@sensu.io>
* fix linter errors
Signed-off-by: Todd Campbell <todd@sensu.io>
* Apply suggestions from code review
PR review suggestions
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix no new variables error
* Replace convey testing with testify
Signed-off-by: Todd Campbell <todd@sensu.io>
* Wording suggestions
Signed-off-by: Todd Campbell <todd@sensu.io>
* Add docker compose environment for testing/maintenance
Signed-off-by: Todd Campbell <todd@sensu.io>
* Renamed and fixed docker-compose.yaml to work in devenv
Signed-off-by: Todd Campbell <todd@sensu.io>
* Change sensugo web UI port to 3080 so as not to conflict with grafana
Signed-off-by: Todd Campbell <todd@sensu.io>
* Apply suggestions from code review
Set the API key as a secure value.
Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
* Add Sensu Go information to notifications doc
Signed-off-by: Todd Campbell <todd@sensu.io>
* Update pkg/services/alerting/notifiers/sensugo.go
Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
* change assert to require for Error/NoError tests
Signed-off-by: Todd Campbell <todd@sensu.io>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
* Add loadtest which authenticates with API key
- Edit load tests to assign the orgId in the default function, as the setup function is only called once for all VUs and therefore the change is not persisted to each VU.
- Remove side effect from orgId setup function and explicitly set orgId in setup client
* sort semicolons, whitespace
* Fix lint error in types.ts
* Bump eslint and its deps to latest
* Add eslintignore and remove not needed eslintrcs
* Change webpack configs eslint config
* Update package.jsons and removed unused eslintrc files
* Chore yarn lint --fix 💅
* Add devenv to eslintignore
* Remove eslint disable comments for rules that are not used
* Remaining eslint fixes 💅
* Bump grafana/eslint-config 💥
* Modify package.json
No need for duplicate checks.
* Modify eslintignore to ignore data and dist folders
* Revert removing .eslintrc to make sure not to use certain packages
* Modify package.json to remove not needed command
* Use gitignore for ignoring paths
* First pass solution
* Refactor solution
* Add test coverage, update tests
* Fix behaviour for multiple labels, add test for this
* Add recordin rules to devenv prometheus
* Update devenv/prometheus2 instead of devenv/prometheus
* Add newlines
* Fix label matching if labels include comma, add test coverage
* Refactor
* Refactor, simplify
* Chore: Upgrade to Go 1.14
* Chore: Bump version of grafana/grafana-ci-deploy Docker image
* Chore: Fix/bump version of grafana/build-container Docker image
* CircleCI: Upgrade build Docker images
Drop indices and create new ones and rewrites annotation find query
to address performance issues when querying annotation table and
there is a large amount of rows.
Fixes#21902
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: Kyle Brandt <kyle@kbrandt.com>
By rotating the auth tokens at the end of the request we ensure
that there is minimum delay between a new token being generated
and the client receiving it.
Adds auth token slow load test which uses random latency for all
tsdb queries..
Cleans up datasource proxy response handling.
DefaultHandler in middleware tests should write a response, the
responseWriter BeforeFuncs wont get executed unless a response
is written.
Fixes#18644
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* Fix integration of postgres and fake-data-gen containers
This fix introduces the following modifications:
- Upgrades to 2.1 docker-compose file format
- Adds a health check for determining that postgrestest service is healthy
- Modifies the fake-postgres-data service to wait for postgrestest to be
"healthy" before starting.
- Renames postgrestest to postgres
* Docker blocks: Add loki blocks for loki releases
- Loki did major API changes between 0.3 and 0.4
- Adding blocks to simplify Grafana datasource testing for different
versions
- keeing `loki` block pointing at loki master
- Run all versions in parallel:
```
./create_docker_compose.sh loki0.3 loki0.4 loki
```
- all versions have different hostnames and ports internally
- datasource url depends on version so you can set them up as separate
datasources:
- master: http://localhost:3100/
- 0.3.0: http://localhost:3103/
- 0.4.0: http://localhost:3104/
* Add loki minor version datasources
* AuthProxy: Can now login with auth proxy and get a login token
* added unit tests
* renamed setting and updated docs
* AuthProxy: minor tweak
* Fixed tests and namings
* spellfix
* fix
* remove unused setting, probably from merge conflict
* fix
* Update README.md
Capitalized the G and S in "Getting Started," and moved "guide" to match the section title in the docs.
* Fixed sentence structure. Changed "download" to "grafana.com/get" and changed "get" to "download".
* Docs: Replace "datasources" with "data sources" (#19111)
* Docs: Replace "datasources" with "data sources" (#19111)
* Docs: Replace "datasources" with "data sources" (#19111)
* Docs: Replace "datasources" with "data sources" (#19111)
* Docs: Replace "datasources" with "data sources" (#19111)
* Docs: Replace "datasources" with "data sources" (#19111)
* Docs: Replace "datasources" with "data sources" (#19111)
* Docs: Replace "datasources" with "data sources" (#19111)
* Docs: Replace "datasources" with "data sources" (#19111)
* Docs: Replace "datasources" with "data sources" (#19111)
* Docs: Replace "datasources" with "data sources" (#19111)
* Docs: Replace "datasources" with "data sources" (#19111)
* LDAP: improve POSIX support
* Correctly abtain DN attributes result
* Allow more flexibility with comparison mapping between POSIX group & user
* Add devenv for POSIX LDAP server
* Correct the docs
Fixes#18140
* Build: allow dynamically change docker image
Right now, only for couple DBs.
With the 2.1, you can do `${TAG:-5.6}` without needing the `.env` file, but
it seems it would be better for back-compat to support `.env` right now.
Fixes#17891
* Build: add prefix for removal process
* Docs: mention makefile command instead of the bash
Since we are moving to makefile for things and make command
simplifies some of the actions you have to perform to work with
different environments
* Docs: mention dynamic tags in the docs
* Docs: avoid name collision
Fixes#16107
* Add LDAP config instead sed use
* Add container name
* Add SizeLimit option to client and to server.
Probably useless at this point, but it's better to have it then otherwise
With the previous configuration `docker-compose build` was always failing.
This moves the dockerfiles in the parent dir and changes paths as a result.
Ref moby/moby#2745
* Feature: provide multildap server configuration
* Add multildap server configuration for devenv
* Change some of the notes for openldap devenv configuration
* Change the maintainer label for *main* dockerfile and of the devenv one
Re-checked the multildap logic - everything seems to be working fine
* Feature: add cron setting for the ldap settings
* Move ldap configuration read to special function
* Introduce cron setting (no docs for it yet, pending approval)
* Chore: address code review comments
Adds a new version option 7.0+ (70 internally).
Version 7.0+ doesn't include document types in index mappings
so support for handling this have been added.
Version 7.0+ returns number of hits in a different way so
support for handling this have been added.
Version 7.0+ doesn't support sending
max_concurrent_shard_requests in multisearch header so
support for sending this in query string have been added.
Update elastic6 docker block and dashboards (devenv) to use
6.7.1 images, filebeat index name is now filebeat-YYYY.MM.DD
and dashboard include correct tags and links.
Add elastic7 docker block and provisioning (devenv).
Updates documentation regarding new version.
Closes#15622
Adds filebeat (log collector) to elasticsearch v6 docker block that
collects Grafana logs.
Also adds a new elasticsearch v6 datasource and test dashboard
thru provisioning.
better ha setup for many mysql connections
prometheus now scrapes mysql metrics in ha setup
ha setup provisions mysql dashboard
adds configurable virtual users for load test run script