* Fixes Time Range Controls formatting #19339
Image was updated to reflect the latest UI but after reading the
documentation README it looks like someone else will have to upload it.
Thanks for your amazing tool Grafana team!
* Update docs/sources/reference/timerange.md
Co-Authored-By: Marcus Olsson <olsson.e.marcus@gmail.com>
* Update docs/sources/reference/timerange.md
Co-Authored-By: Marcus Olsson <olsson.e.marcus@gmail.com>
* Convert Azure Application Insights datasource to Go
Allows for alerting of Application Insights data source
Closes: #15153
* Fix timeGrainReset
* Default time interval for querys for alerts
* Fix a few rename related bugs
* Update readme to indicate App Insights alerting
* Fix typo and add tests to ensure migration is happening
* Address code review feedback (mostly typos and unintended changes)
* Docs: Add information regarding the LDAP Debug View
* Add instructions to compress image when adding them to the documentation
* Add a troubleshooting section to the docs documentation
* API: Add `createdAt` and `updatedAt` to api/users/lookup
In the past, we have added both `updatedAt` (#19004) and `createdAt` (#19475) to /api/users/:id
Turns out, api/users/lookup uses the same DTO for both. This fixes the serialization of both `createdAt` and `updatedAt`for this endpoint.
Also, adds a test to ensure no further regressions.
* Updated API documentation
* 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)
Adds a new "Image Rendering" page in Administration section.
Updates configuration page with rendering settings and also
default.ini and sample.ini.
Updates and cleanup pages that referencing image rendering.
Ref #18914
Don't update total stats metrics if reporting is disabled.
New setting disable_total_stats for turning off update
of total stats (stat_totals_*) metrics.
Ref #19137
* Graph: constant series as override
- ability to define a series override that takes the first value of a
timeseries and produces constant series from it.
* Moved constant series override logic to grafana-ui
* Added docs for instant queries and constant series override
Adds a new requirements page to the installation docs.
Wanted/needed some place to document known browser
issues and thought that adding this missing page together
with OS, hardware, database and browser requirements
would be a good thing.
Fix: move 6.4 section in upgrade notes further down.
Fixes#16487
Ref #18690
* POC: trying to see if there is a way to support objects in template interpolations
* Added support for nested objects, and arrays
* Added accessor cache
* fixed unit tests
* First take
* Use links supplier in graph
* Add field's index to cache items
* Get field index from field cache
* CHange FiledCacheItem to FieldWithIndex
* Add refId to TimeSeries class
* Make field link supplier work with _series, _field and _value vars
* use field link supplier in graph
* Fix yaxis settings
* Update dashboard schema version and add migration for data links variables
* Update snapshots
* Update build in data link variables
* FieldCache - idx -> index
* Add current query results to panel editor
* WIP Updated data links dropdown to display new variables
* Fix build
* Update variables syntac in field display, update migration
* Field links supplier: review updates
* Add data frame view and field name to TimeSeries for later inspection
* Retrieve data frame from TimeSeries when clicking on plot graph
* Use data frame's index instead of view
* Retrieve data frame by index instead of view on TimeSeries
* Update data links prism regex
* Fix typecheck
* Add value variables to suggestions list
* UI update
* Rename field to config in DisplayProcessorOptions
* Proces single value of a field instead of entire data frame
* Updated font size from 10px to 12px for auto complete
* Replace fieldName with fieldIndex in TimeSeries
* Don't use .entries() for iterating in field cache
* Don't use FieldCache when retrieving field for datalinks in graph
* Add value calculation variable to data links (#19031)
* Add support for labels with dots in the name (#19033)
* Docs update
* Use field name instead of removed series.fieldName
* Add test dashboard
* Typos fix
* Make visualization tab subscribe to query results
* Added tags to dashboard so it shows up in lists
* minor docs fix
* Update singlestat-ish variables suggestions to contain series variables
* Decrease suggestions update debounce
* Enable whitespace characters(new line, space) in links and strip them when processing the data link
* minor data links UI update
* DataLinks: Add __from and __to variables suggestions to data links (#19093)
* Add from and to variables suggestions to data links
* Update docs
* UI update and added info text
* Change ESC global bind to bind (doesn't capture ESC on input)
* Close datalinks suggestions on ESC
* Remove unnecessary fragment
* API Tutorial: Improve content and readability
- Simplified the introductory paragraphs.
- Rewrote the descriptions and steps to improve readability.
* Updated topic as discussed in the PR
- Corrected the typo from "Graphana" to "Grafana".
- Rewritten the note as suggested by reviewers and to avoid passive voice.
Please review and share your thoughts.
* SQLite migrations
* cleanup
* migrate end times
* switch to update with a query
* real migration
* anno migrations
* remove old docs
* set isRegion from time changes
* use <> for is not
* add comment and fix index decleration
* single validation place
* add test
* fix test
* add upgrading docs
* use AnnotationEvent
* fix import
* remove regionId from typescript
Existing /api/alert-notifications now requires at least editor access.
Existing /api/alert-notifiers now requires at least editor access.
New /api/alert-notifications/lookup returns less information than
/api/alert-notifications and can be access by any authenticated user.
Existing /api/org/users now requires org admin role.
New /api/org/users/lookup returns less information than
/api/org/users and can be access by users that are org admins,
admin in any folder or admin of any team.
UserPicker component now uses /api/org/users/lookup instead
of /api/org/users.
Fixes#17318
This commit addresses half of #13749 by making sure GetMetricData
works for alerting. Math Expressions (compound metrics) will still not
work for alerting, this would require a bigger refactoring of Grafana's
alerting service. However, with this commit at least alerting for basic
metrics with non empty query Id will work.
Fixes half of #13749
* added alert rule tags in webhook notifications
* fix: don't include whole list of Tag objects but only key/value pairs in Webhook JSON
* marked webhook alerts to support alert rule tags
* 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
* Update defaults.ini and sample.ini with the SAML assertion mapping
fields
* Document Grafana's ability to map ACS attributes while a Grafana user is created
Running the command as given in the current doc throws the error:
```
sudo wget -q -O - https://packages.grafana.com/gpg.key | apt-key add -
ERROR: This command can only be used by root.
```
The proposed change fixes this issue.
* Reapply MetricNamespace support
* Fixing tests
* refactor: move metricnamespace param to backend
* refactor: remove unused function
* azuremonitor: migration for new metric namespace field
* azuremonitor: add template query for metric namespace with a sub
* docs: template queries for azure monitor
Adds new lines for the metricnamespace template function and fixes
some messed up lines
* docs: Link to SAML docs and document configuration options
- Document configuration options `defaults.ini` and `sample.ini`
- Add the SAML documentation
- Link to the SAML documentation from "what's new in 6.3"
* Docs: First draft of whats new in 6.3
* Docs: Updated whats new article
* Docs: typos
* docs: fix broken link, add links and update docs index
* Docs: whats new in enterprise
* Docs: Documents new features available with Loki data source in Explore
Closes#17898
* Docs: Formats note as a quote and adds additional detail regarding live tailing
* LDAP:Docs: `active_sync_enabled` setting
Mention `active_sync_enabled` setting and enable it by default
* LDAP: move "disableExternalUser" method
Idea behind new design of the LDAP module is to minimise conflation
between other parts of the system, so it would decoupled as much as
possible from stuff like database, HTTP transport and etc.
Following "Do One Thing and Do It Well" Unix philosophy principal, other things
could be better fitted on the consumer side of things.
Which what this commit trying to archive
* LDAP: correct user/admin binding
The second binding was not happening, so if the admin login/password
in LDAP configuration was correct, anyone could had login as anyone using
incorrect password
* OAuth: github team sync POC
* OAuth: minor refactor of github module
* OAuth: able to use team shorthands for github team sync
* support passing a list of groups via auth-proxy header
Elasticsearch v7.0 changed the behavior of max concurrent shard
requests and the default to 5. v5.6 and before 7.0 the default
is 256. This adds some additional behavior given certain
version is selected when configure the datasource to set
default max concurrent shard requests.
Changing from a version pre-v7.0+ to v7.0+ sets max
concurrent shard requests to 5.
Changing from a version v7.0+ to a pre-v7.0 sets max
concurrent shard requests to 256.
Fixes#17454
Adds version note for alert rule tags.
Adds version note for graph data links.
Adds information about secret_key and encryption format in use
Fixes#17815Fixes#17803
* Modify backend to allow expiration of API Keys
* Add middleware test for expired api keys
* Modify frontend to enable expiration of API Keys
* Fix frontend tests
* Fix migration and add index for `expires` field
* Add api key tests for database access
* Substitude time.Now() by a mock for test usage
* Front-end modifications
* Change input label to `Time to live`
* Change input behavior to comply with the other similar
* Add tooltip
* Modify AddApiKey api call response
Expiration should be *time.Time instead of string
* Present expiration date in the selected timezone
* Use kbn for transforming intervals to seconds
* Use `assert` library for tests
* Frontend fixes
Add checks for empty/undefined/null values
* Change expires column from datetime to integer
* Restrict api key duration input
It should be interval not number
* AddApiKey must complain if SecondsToLive is negative
* Declare ErrInvalidApiKeyExpiration
* Move configuration to auth section
* Update docs
* Eliminate alias for models in modified files
* Omit expiration from api response if empty
* Eliminate Goconvey from test file
* Fix test
Do not sleep, use mocked timeNow() instead
* Remove index for expires from api_key table
The index should be anyway on both org_id and expires fields.
However this commit eliminates completely the index for now
since not many rows are expected to be in this table.
* Use getTimeZone function
* Minor change in api key listing
The frontend should display a message instead of empty string
if the key does not expire.
* WIP: initial panel links editor
* WIP: Added dashboard migration to new panel drilldown link schema
* Make link_srv interpolate new variables
* Fix failing tests
* Drilldown: Add context menu to graph viz (#17284)
* Add simple context menu for adding graph annotations and showing drilldown links
* Close graph context menu when user start scrolling
* Move context menu component to grafana/ui
* Make graph context menu appear on click, use cmd/ctrl click for quick annotations
* Move graph context menu controller to separate file
* Drilldown: datapoint variables interpolation (#17328)
* Add simple context menu for adding graph annotations and showing drilldown links
* Close graph context menu when user start scrolling
* Move context menu component to grafana/ui
* Make graph context menu appear on click, use cmd/ctrl click for quick annotations
* Add util for absolute time range transformation
* Add series name and datapoint timestamp interpolation
* Rename drilldown link variables tot snake case, use const values instead of strings in tests
* Bring LinkSrv.getPanelLinkAnchorInfo for compatibility reasons and add deprecation warning
* Rename seriesLabel to seriesName
* Drilldown: use separate editors for panel and series links (#17355)
* Use correct target ini context menu links
* Rename PanelLinksEditor to DrilldownLinksEditor and mote it to grafana/ui
* Expose DrilldownLinksEditor as an angular directive
* Enable visualization specifix drilldown links
* Props interfaces rename
* Drilldown: Add variables suggestion and syntax highlighting for drilldown link editor (#17391)
* Add variables suggestion in drilldown link editor
* Enable prism
* Fix backspace not working
* Move slate value helpers to grafana/ui
* Add syntax higlighting for links input
* Rename drilldown link components to data links
* Add template variabe suggestions
* Bugfix
* Fix regexp not working in Firefox
* Display correct links in panel header corner
* bugfix
* bugfix
* Bugfix
* Context menu UI tweaks
* Use data link terminology instead of drilldown
* DataLinks: changed autocomplete syntax
* Use singular form for data link
* Use the same syntax higlighting for built-in and template variables in data links editor
* UI improvements to context menu
* UI review tweaks
* Tweak layout of data link editor
* Fix vertical spacing
* Remove data link header in context menu
* Remove pointer cursor from series label in context menu
* Fix variable selection on click
* DataLinks: migrations for old links
* Update docs about data links
* Use value time instead of time range when interpolating datapoint timestamp
* Remove not used util
* Update docs
* Moved icon a bit more down
* Interpolate value ts only when using __value_time variable
* Bring href property back to LinkModel
* Add any type annotations
* Fix TS error on slate's Value type
* minor changes
* Feature: Introduce a grafana-cli wrapper
When our users install the *nix packed version of grafana, tendency is to use the services and scripts installed as part of the package for grafana-server. These leverage the default configuration options by specifying the several default paths.
This introduces a similar approach for the grafana-cli binary. We exposed it through a wrapper to ensure a proper configuration is in place. To enable that, we add the .real suffix to the original binary (grafana-cli.real) and then use a bash script named grafana-cli as the wrapper.
* Make the config and homepath flags global
* Introduce `configOverrides` as a global flag
This flag allows us to pass configuration overrides as a string.
The string follows the convention of configuration arguments separated by a space e.g. "cfg:default.paths.data=/dev/nullX cfg:default.paths.logs=/dev/nullX"
Also, it is backwards compatible with similar the previous configuration method through tailing arguments. Tailing arguments take presedence over the configuration options string.
* Only log configuration information in debug mode
* Move the grafana-cli binary to $GRAFANA_HOME/bin
As part of the package install process, we copy all the release files and
directories into the grafana home directory. This includes the /bin folder
from where we copied the binaries into their respective destinations.
After that, the /bin folder gets deleted as we don't want to keep
duplicates of the binaries around.
As part of this commit, we moved the re-creation of /bin within
grafana-home and the copy of the original binary (again) after the
folder gets deleted.
* x_xss_protection
* strict_transport_security (HSTS)
* x_content_type_options
these are currently defaulted to false (off) until the next minor release.
fixes#17509
* Fix: Upgrade hugo wip
* Chore: Rename index to _index for latest hugo
* Chore: Use relative refs, no starting slash
* Feat: Add possibility to mount layouts from grafana.org project
* Add scaling toggle to Singlestat panel
This toggle allows a user to choose between auto scaling or
zero-based scaling.
* Update Singlestat docs to include Zero Scale option
* Add min/max config to Singlestat sparklines y axis
* Feature: Parse user agent string in user auth token api response (#16222)
* Adding UA Parser Go modules attempt (#16222)
* Bring user agent vals up per req
* fix tests
* doc update
* update to flatten, no maps
* update doc
* Fix: change and to and so not clashing with grafana vars (#16365)
* Fix: change and to and so not clashing with grafana vars (#16365)
* Fix: update now to datetime (#16365)
* Fix: test should look for datetime instead of now (#16365)
* Fix: _az suffix to datasource convention (#16365)
* Fix: convert vars to macro, update doc (#16365)
* Fix: convert vars to macro, update doc (#16365)
* Fix: remove support for time vars (#16365)
* Fix: confilct from master
* add migration on editor open
* fix migration var name
Adds a new [server] setting `serve_from_sub_path`. By enabling
this setting and using a subpath in `root_url` setting, e.g.
`root_url = http://localhost:3000/grafana`, Grafana will be accessible
on `http://localhost:3000/grafana`. By default it is set to `false`
for compatibility reasons.
Closes#16623
* AzureMonitor: docs for multiple subscriptions
Also, links to images in Grafana.org instead of the images
in the plugin GitHub repo.
* Update docs/sources/features/datasources/azuremonitor.md
Co-Authored-By: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* Update docs/sources/features/datasources/azuremonitor.md
Co-Authored-By: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* docs: fix auto format errors
VS code automatically escapes the dollar sign.
This adds support for using templated/dynamic urls in routes.
* refactor interpolateString into utils and add interpolation support for app plugin routes.
* cleanup and add error check for url parse failure
* add docs for interpolated route urls
Closes#16835
When allow_embedding is false (default) the Grafana backend
will set the http header `X-Frame-Options: deny` in all responses
to non-static content which will instruct browser to not allow
Grafana to be embedded in `<frame>`, `<iframe>`,
`<embed>` or `<object>`.
Closes#14189
A new parameter `queryMode` is added to the InfluxDB datasource to provide a way to use POST instead of GET when querying the database. This prevents to get any error when querying the database with a heavy request.
Default configuration is kept to GET for backward compatibility. Tests and documentation have been added for this new behaviour.
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
* Add api to reaload provisioning
* Refactor and simplify the polling code
* Add test for the provisioning service
* Fix provider initialization and move some code to file reader
* Simplify the code and move initialization
* Remove unused code
* Update comment
* Add comment
* Change error messages
* Add DashboardProvisionerFactory type
* Update imports
* Use new assert lib
* Use mutext for synchronizing the reloading
* Fix typo
Co-Authored-By: aocenas <mr.ocenas@gmail.com>
* Add docs about the new api
* Add value types with custom unmarshalling logic
* Add env support for notifications config
* Use env vars in json data tests for values
* Add some more complexities to value tests
* Update comment with example usage
* Set env directly in the tests, removing patching
* Update documentation
* Add env var to the file reader tests
* Add raw value
* Post merge fixes
* Add comment
* add folderUid to DashbaordsAsConfig structs and DashbardProviderConfigs struct, set these values in mapping func
look for new folderUid values in config_reader tests
set dashboard folder Uid explicitly in file_reader, which has no affect when not given
* formatting and docstrings
* add folderUid to DashbaordsAsConfig structs and DashbardProviderConfigs struct, set these values in mapping func
look for new folderUid values in config_reader tests
set dashboard folder Uid explicitly in file_reader, which has no affect when not given
* formatting and docstrings
* add folderUid option, as well as documentation for the rest of the fields
* add blank folderUid in devenv example.
* add folderUid to provisioning sample yaml
* instead of just warning, return error if unmarshalling dashboard provisioning file fails
* Removing the error handling and adding comment
* Add duplicity check for folder Uids
Co-authored-by: swtch1 <joshua.thornton@protonmail.com>
* Chore: remove session storage references
* Small refactoring of the settings module
* Update docs - remove references for the session storage
* Update config files (sample and default configs)
* Add tests for warning during the config load on defined storage cache
* Remove all references to session storage
* Remove macaron session dependency
* Remove leftovers
* Fix: address review comments
* Fix: remove old deps
* Fix: add skipStaticRootValidation = true to tests
* Fix: improve the docs and warning message
As per discussion in here - https://github.com/grafana/grafana/pull/16445/files#r273026255
* Chore: make linter happy
Fixes#16148
Ref #16114
* Search: Fixes search limits and adds a page parameter
This adds a page parameter to search api without adding
any major breaking change.
It does at an api validation error when trying to use
a limit beyond 5000. This is a breaking change. We could
remove this and have it only in the docs and describe that this
is a limit that grafana will apply silently.
Fixes#16049
* Fix: Corrected wrong array slice change
* Docs: minor docs fix
* Search: fixed folder tests
* Fixed: Moved limit to correct inner query
* Search: moving limit check and page check
* Search: limit in handler is no longer needed
* Store passwords in secureJsonData
* Revert unnecessary refactors
* Fix for nil jsonSecureData value
* Remove copied encryption code from migration
* Fix wrong field reference
* Remove migration and provisioning changes
* Use password getters in datasource proxy
* Refactor password handling in datasource configs
* Add provisioning warnings
* Update documentation
* Remove migration command, moved to separate PR
* Remove unused code
* Set the upgrade version
* Remove unused code
* Remove double reference
* app pages
* app pages
* workign example
* started alpha support
* remove app stuff
* show warning on alpha/beta panels
* put app back on plugin file
* fix go
* add enum for PluginType and PluginIncludeType
* Refactoring and moving settings to plugins section
fixes#16529
Fixes#16507
Markdown formatting in VS Code converts from asterisks to underscores but this can be incorrect
in a case like _label_names()_. This fix escapes the underscores that should be kept.
Adds new alert settings for configuring timeouts and retries named
evaluation_timeout_seconds, notification_timeout_seconds
and max_attempts.
Closes#16240
Now returns uid in response to get notification channel by id.
Adds GET/PUT/DELETE support for notification channel by uid,
/api/alert-notifications/uid/:uid.
Break apart alerting and alert notification http api docs in two
pages and update documentation to make it up to date
with current implementation.
Fixes#16012
- future alignment cause issues with rate charts and the display of last
values
- this change modifies the alignment to use the last available aligned
end date and no longer possibly requests data from the future
A datasource plugin must return a list of tags in the 'tags' field of
the annotationQuery result. A string 'test' would otherwise result in
4 tags in Grafana: 't','e','s','t'.