* Support delete endpoint for folders
* Include authorizer
* Add test for delete verb
* Add delete command to delete options
* Pass query string to context to admission
* Dont support nested folder deletion for now
* Skip test if feature flag is present
* Add test case
* Remove comment
* Only rely on the storage type config to run alerting tests
* Dont change legacy subpath
* Remove unised function
* Add test case when an editor can delete alert rules
* Lint
* created config doc, made initial changes
* initial draft of config doc completed
* additional edits
* moved config doc into directory, renamed
* made additional updates
* template variables updates/cleanup
* cleaned up intro page, some more minor edits
* edited and re-formatted configure the data source doc
* final edits
* more edits
* minor changes prior to PR
* fix typo
* Update docs/sources/datasources/influxdb/_index.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Update docs/sources/datasources/influxdb/_index.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Update docs/sources/datasources/influxdb/_index.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Update docs/sources/datasources/influxdb/_index.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Update docs/sources/datasources/influxdb/_index.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Update docs/sources/datasources/influxdb/query-editor/index.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Update docs/sources/datasources/influxdb/query-editor/index.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Update docs/sources/datasources/influxdb/template-variables/index.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Update docs/sources/datasources/influxdb/query-editor/index.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Update docs/sources/datasources/influxdb/configure-influxdb-data-source/_index.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Update docs/sources/datasources/influxdb/query-editor/index.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* updates based on feedback
* ran prettier
---------
Co-authored-by: Irene Rodríguez <irene.rodriguez@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Merge in default threshold base if exists
* Fix tests to not expect default threshold
* Add config from query example to gdev
* Add a test around the merging of thresholds
* Revert "Add config from query example to gdev"
This reverts commit a239224ebb.
* update gdev
* Add note about keeping the base threshold
* Update public/app/features/transformers/docs/content.ts
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
* Merge in generated code
---------
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
* test: add skeleton for initial unit tests
* test: add basic tests for DataTrailsHome
* test-wip: add tests for recent metrics functionality, but need to move from DataTrailsHome.test to DataTrailsRecentMetrics.test
* wip: tests for DataTrailBookmarks
* test: add tests for recent metrics; refactor: make DataTrailsRecentMetrics accept onSelect as prop rather than whole trail; test: add tests for DataTrailCard (WIP)
* test: add test for truncates long list of labels after 3 lines in recent explorations
* refactor: make DataTrailBookmarks take in onSelect and onDelete as props rather than a whole trail and onDelete; test: add tests for bookmarks (WIP)
* remove deprecated style
* fix import issues
* fix getTrailForBookmark tests by returning a trail, clean up tests
* chore: delete notes to self
---------
Co-authored-by: Brendan O'Handley <brendan.ohandley@grafana.com>
* Add github app token generation in pipelines that use GITHUB_TOKEN
* ci?
* clone gh repo using x-access-token user
* address linting issues
* use mounted volume for exporting token
* remove unused github_token env var swagger gen step
* replace pat on release_pr pipepline
* cleanup GH PAT references
* linting
* Update scripts/drone/steps/lib.star
* make drone
---------
Co-authored-by: Matheus Macabu <macabu.matheus@gmail.com>
* add new option for multi variables to lock value list wip
* WIP - lock option list
* tests
* fix
* fixes + canary scenes
* wip
* wip
* fix snapshot
* bump scenes
* Dashboards: Add possibility to lock adhoc variables options list (#96077)
* Lock list of options flag for ad hoc
* refactor
* fix snapshot
* Refactor OAuthToken service
* introduce user.SessionAwareIdentityRequester
* replace login.UserAuth parameters with user.SessionAwareIdentityRequester
* Add nosec G101 to fake ID tokens
* Opt 2, min changes
* Revert a change to the current version
This patch marks ID tokens as not required when initalising a gRPC
Authenticator to be used in `cloud` mode. ID Tokens are still enabled in
`cloud` mode, but the `Required` option is set to `false`.
This is needed for MT services like Cloud API Server to authenticate
against gRPC services like Resource Store with only an Access Token.
Signed-off-by: Prem Kumar <prem.saraswat@grafana.com>
* Update existing property once we save the new rule data and stay in the same page
* prettier
* use cache invalidation for updating the existing property
* fix cloud usecase
* add group mapping UID returned mapped roles
* request mapped roles from the frontend, but don't attempt to update mapped roles
* lock mapped roles and show a pop-up message about why a role is locked
* update role selectors to not allow deselecting a mapped role
* swagger gen
* simplify and set mapped as bool instead of mapping UID array
* swagger gen
* Dashboard: Panel edit and support for more layout items
* It's working
* Fix discard issue
* remove unused file
* Update
* Editing for responsive grid items now work
* Update
* Update
* Review fix
* optimize tokens count from service accounts query
* add unit tests for tokens count
* skip broken test
* fix lint error
* rename Tokens to TokenCount
* Move TraceQL metrics queries to backend
* Add tests for TransformMetricsResponse
* Add tests for createMetricsQuery
* Refactor, detect metric queries and throw error for search queries
* Remove unneeded types
* Don't add start and end if they are 0. Return on err
* lint
* Fix pre-alloc of frames
* Address PR comments
* Explore: store displayedFields in URL state
* Displayed fields: reset when queries change
* Add test
* LogRowMessageDisplayedFields: pass logRowMenuIcons props to component
* LogsMetaRow: use primary outline for reset button
* Logs: clear displayedFields from URL
* fix pseudo locale and add simple e2e test
* add comment
* update test and add comments
* fix unit test
* try 5 instead of 6?
* clear input
* only check pseudo in dev mode
* don't check pseudo in CI
* don't test pseudo locale
* isolate language changes
* move waits around
* only wait for preferences on first visit
* add proper loading state
* bit of tidy up
* hook up ids correctly
* use disabled/isLoading instead of skeleton
* set props on Field
* Support undefined value
* Check truthiness of value instead
* check falsy
* Conditional typing for clearing value
* Less restrictive default typing
* simplify props
* Add tests for autosizing
* Write failing test case
* Add list of falsy values
* Check if nullish
* Check nullish in itemToString
* Nvm, it doesn't matter here
* Add support for autoFocus
* Pick from InputProps
* Move docstring
* Solve type issues in Storybook
* Fix failing story
feat: inject server-timing header to match initial loads with client-side telemetry
Faro Web SDK can read the server-timing info and
correlate the initial request with the client side telemetry gather from navigation timings.
* Rename method applyTemplateVariables so it used by backend
* Zipkin: Move query running to backend
* Fix error source
* Hndle invalid query and return error response
* create a new state and set at the end
* propagate labels datasource_uid and ref_id from current state if it's error
* copy the state when apply to all
* add note that support for Auth0 audience feature is not available
* Update docs/sources/setup-grafana/configure-security/configure-authentication/generic-oauth/index.md
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
---------
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
Certain combinations of KeepLast state transition annotations exceed the current
limit of 25 characters. This increases the column size limit to be able to
handle the longest combination (27) with some extra space for comfort.
* Fix toDTO
* Remove conversion function for folder dto
* Convert toDTO to a standalone function
---------
Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
* rewriting installation docs and including info about airgapped environments
* Changing example to lokieexplore app
* run prettier
* adding corrections
* running prettier
---------
Co-authored-by: Irene Rodriguez <irene.rodriguez@grafana.com>
* Remove reducer when using a non complex query that is instant
* remove reducer when changing data source
* Fix whenField
* use DataSourceType instead of string literal
* add reducer when using range
* add tests
* use an object for SimpleCondition refids identifiers
* fix threshold expression to point to B after switching back to range
* address pr review comments
* refactor: extract reducer optimization to the reducer
* fix tests
* fix snapshot
* rename constants
* add a warning for components when they exceed the recommended options amount
* Update packages/grafana-ui/src/components/Combobox/Combobox.tsx
Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
* Update packages/grafana-ui/src/components/Combobox/Combobox.tsx
Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
* log faro
* log once with flag
* log in setItems
* move logOptions to utils and write tests
* import function, update betterer for combobox
* Fix lint errors
* log once without the try
* fix tests
---------
Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
Co-authored-by: joshhunt <josh@trtr.co>
* initial passwordless client
* passwordless login page
* Working basic e2e flow
* Add todo comments
* Improve the passwordless login flow
* improved passwordless login, backend for passwordless signup
* add expiration to emails
* update email templates & render username & name fields on signup
* improve email templates
* change login page text while awaiting passwordless code
* fix merge conflicts
* use claims.TypeUser
* add initial passwordless tests
* better error messages
* simplified error name
* remove completed TODOs
* linting & minor test improvements & rename passwordless routes
* more linting fixes
* move code generation to its own func, use locationService to get query params
* fix ampersand in email templates & use passwordless api routes in LoginCtrl
* txt emails more closely match html email copy
* move passwordless auth behind experimental feature toggle
* fix PasswordlessLogin property failing typecheck
* make update-workspace
* user correct placeholder
* Update emails/templates/passwordless_verify_existing_user.txt
Co-authored-by: Dan Cech <dcech@grafana.com>
* Update emails/templates/passwordless_verify_existing_user.mjml
Co-authored-by: Dan Cech <dcech@grafana.com>
* Update emails/templates/passwordless_verify_new_user.txt
Co-authored-by: Dan Cech <dcech@grafana.com>
* Update emails/templates/passwordless_verify_new_user.txt
Co-authored-by: Dan Cech <dcech@grafana.com>
* Update emails/templates/passwordless_verify_new_user.mjml
Co-authored-by: Dan Cech <dcech@grafana.com>
* use & in email templates
* Update emails/templates/passwordless_verify_existing_user.txt
Co-authored-by: Dan Cech <dcech@grafana.com>
* remove IP address validation
* struct for passwordless settings
* revert go.work.sum changes
* mock locationService.getSearch in failing test
---------
Co-authored-by: Mihaly Gyongyosi <mgyongyosi@users.noreply.github.com>
Co-authored-by: Dan Cech <dcech@grafana.com>
* Set CoreServices as codeowners for SQL Expressions
* Set CoreServices as CodeOwners for ALL SSEs
Don't limit to SQL Expressions alone, but take all of the
Server Side Expressions
* updated kiosk behaviour
* Removed TV mode and updated Normal mode
* Updated kiosk mode and other small edits
* Removed dashboard controls from playlist controls section and reformatted
* Added playlist controls behaviour in kiosk mode
* Updated Use dashboards image and descriptions
* Docs: Clean up basic auth, anonymous access and main pages for auth configuration
* Fix the typo
* Prettier should fix this
* fix minor typo
* Update docs/sources/setup-grafana/configure-security/configure-authentication/_index.md
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
---------
Co-authored-by: Irene Rodríguez <irene.rodriguez@grafana.com>
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
* Move the configuration options to the bottom and extend it
* Improve assertion mapping docs for Okta
* fix typo
* Update index.md
---------
Co-authored-by: Irene Rodríguez <irene.rodriguez@grafana.com>
* Use 0 for window functions if value does not exist
* Simplify logic, add test
* Fix tests, have first value count as 0 if null as well
* evaluate entire array instead of individual values
* Adjust logic, move prior results back
* add docs describing what GAS is and how it can be configured
* Update configure-group-attribute-sync.md
* Update configure-group-attribute-sync.md
---------
Co-authored-by: Aaron Godin <aaron.godin@grafana.com>
* Postgresql: Support tables from non-default schema
- Add support for schema-qualified table names.
- Partially resolve an issue where the column type of a table from the
wrong schema with the same table name was incorrectly used. Now
limited to tables of schemas within the search_path.
* Support schema in raw query editor
---------
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
* Rename from AllowedKubernetesNamespace to Namespace
* Use a sync hook to always set namespace for Identity.
* format
* Don't set uid when authenticating as user
* Refactor basic usage with stateReducer
This is a combination of 3 commits.
This is the 1st commit message:
more wip
This is the commit message #2:
even more wip
This is the commit message #3:
got basic usage working well with stateReducer
remove unrelated change
todo tests
* fix behaviour for async
* clean up dev stuff
* story
* Fix options being cleared for non-async combobox
* Fill out tests!
* put story back
* clean up metriccombobox test
* show selected value as placeholder while menu is open
* properly fallback placeholder to the prop
* Hide `Instances` field in RuleDetails view for recording rules
* Alerting UI: add `helpLink` to Recording Rules docs
* Make the Metric input placeholder more explicit for recording rules
* adding ignoreUrls param to EchoSrvTransport
* adding test for ignore urls
* linting
* cleaning up
* adding a new error message to the list of ignored errors
* check error for source and check http status for source
* refactor
* add source to health check status code as well
* remove error where it will be nil
* Use different threshold x/y coordinates depending on orientation
* invert wording / semantics
---------
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
* Move server init into server package
* map store name to id
* refactor model loading
* pass namespace into reconcilers and collectors
* refactor
* Extend authz server with Read and Write methods
* use new read/write in reconciler
* implement server side read and write
* Sync permissions for every org
* handle namespace in check and list
* split read and write
* provide conditions
* Fix client implementation
* fix nil conditions
* remove unused client code
* use lock for store access
* move type translators to common package
* fix folder collector
* fix store creation
* remove unused AuthorizationModelId
* fix server tests
* fix linter
* Remove collectors
* Remove zanzana search check, we need to rewrite that part to the new schema
* Only use generic resource schema and cleanup code we don't want to keep / need to re-write
* useRef instead of create ref for functional components, pass function to close popper if needed
* Cleanup, hide on save as well
* add comment about when hidePopper is available to content
* try to enable cache on golangci linter
* bump version
* exclude G115
* reduce timeout
* remove deprecated linter
* bump linter version in bingo
* try a different syntax for workspace modules
* try another command
* add apps to linter path
* try disabling cue codegen
* skip some linting in devenv
* exclude dirs and try again
* try workaround for pkg
* try path instead of dir
* make it one line
* replace package prefix
* exclude xorm
* exclude wire
* file-based aproach to nolint in workspaces
* missing quote
* simplify command line
* change ownership
* Zipkin: Run health check through backend
* Mark some errors as downstream
* Update pkg/tsdb/zipkin/zipkin.go
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
* Use errors.New where error formatting is not needed
* Remove executable in plugin.json
* Fix joining the path
* Keep logger as global and then create from context
* Close the res body
---------
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
* Intro: simplify `Architecture`. Add a new guideline
* Define `Notification policies` as an advanced option
* Intro: include about "Notification messages"
* Minor copy changes
* Check if sidecar is used
* Update packages/grafana-runtime/src/services/SidecarService_EXPERIMENTAL.ts
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
---------
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
* WIP - build tenant indexes concurrently
* adds local dev seeders and readme for indexer
* update logging and adds locking in getShard()
* update logs
* Adds Namespaces func. Initializes index after ResourceServer is created.
* fixes Count() and updates test lint issues
* Initialize index separately. Don't do it when creating the resource server. Makes testing really awkward.
* fix lint error
* handles error when getting namespaces
* updates test and index helper funcs
* handle regex matchers with flags
* add test in alertmanager.test.ts
* refactor to use the same matching functions
* lint
* lint again
* move matchers functions to matchers.ts
---------
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
* Prometheus: Fix escaping of quotation marks for non-regex variables
* Prometheus: Fix escaping of double quotation marks for regex variables
* Prometheus: Add escaping for adhoc filter label queries
* initial logs integration
* rename back to Integrations
* remove comments
* connect related logs in metrics with logsIntegration service
* rename
* remove comments
* feat: related logs with loki expr
* fix: layout & var updates
* refactor: prefer scene state to context
* fix: limit DS select to relevant loki DSes
* refactor: use existing utils
* refactor: types
* fix: tests and types
* refactor: simplify
* refactor: prefer precise data updates
* refactor: prefer variable for key
* refactor: simplify panel search
* refactor: remove unnecessary short-circuit
* fix: ensure single network request for logs
* fix: add missing limit to fetched log lines
* refactor: add clarity
* refactor: organize imports
* feat: messaging for No Related Logs case
* fix: add missing space
* chore: add `exploreMetricsRelatedLogs` feature toggle
* feat: link to Explore Logs app
* fix: i18n
* fix: use sentence case consistent with design system
* style: avoid competing with metricscene buttons
* fix: capitalization for names
* fix: a11y
* refactor: clean up and document utils
* fix: formatting
* chore: run `make i18n-extract`
* test: improve coverage
* test: fix module resolution side-effects
* extract only the first rule
refactor: organize imports
* remove unnecessary test files
---------
Co-authored-by: Nick Richmond <nick.richmond@grafana.com>
* Alerting docs: Update `Create alert rules from panels`
* Remove screenshots except when the panel displays alert status
* Further changes sync with Brenda
* minor changes
* Relocate admonition
* Specify `dashboardUId` and `panelId` must be set together
* Update docs/sources/alerting/alerting-rules/link-alert-rules-to-dashboards.md
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
* change title
* change URL
* fix spell error
---------
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
* refactor breakdown scene
* refactor BreakdownScene along with LayoutSwitcher
* rename
* don't pass default layout
* better type handling
* betterer
* add @bsull/augurs
* implement LabelBreakdownScene
* integrate SortByScene in LabelBreakdownScene
* move to new directory
* introduce BreakdownSearchScene
* integrate searchScene
* cleaning
* initialize @bsull/augurs
* add interaction
* use new breakdown scene
* resolve merge conflicts
* ugrade @bsull/augurs
* update import
* update css
* update tooltip text
* refine sorting
* fix unit test
* fix
* implement outlier detector
* support wasm
* jest testing fix
* localization fix
* use unknown instead of any
* update i18n
* update betterer
* fix locales
* update test
* fix tests maybe
* prettier
* chore: update jest config
* chore: create mock for @bsull/augurs (#92156)
chore: create mock for bsull/augurs
@bsull/augurs assumes it will be running as an ESM, not
a CommonJS module, so can't be loaded by Jest (specifically
because it contains a reference to import.meta.url).
This PR provides a mock implementation which gets tests passing
again.
Ideally we'd be able to load the actual @bsull/augurs module
in tests so this is just a stopgap really, until a better
solution appears.
* fix unit tests
* remove unused BreakdownScene.tsx
* set outliers as undefined if an error occurs
* Add labels
* betterer
* reset event implemented
* fix controls positioning
* update augurs
* betterer
* i18n
* conflict fixes
* update texts
---------
Co-authored-by: Matias Chomicki <matyax@gmail.com>
Co-authored-by: Ben Sully <ben.sully@grafana.com>
* Alerting: Keep state manager cache during cache warm-up
Instead of overwriting the state manager cache during warm-up,
we update the data in the cache if it is not there yet. If the cache
already contains a state entry with the same key, we do not overwrite it.
* indexer integration tests WIP
* make protobuf
* Adds a few more integration test cases to cover the basics. Use Limit instead of Size param from SearchRequest.
* skip if testing.Short()
* adds test comments
* Scan direction: add experimental badge
* Logs model: keep data when the response contains errors
* SupplementaryResultError: extend behaviors
* LogsVolumePanel: add custom message for partial shard data
* SupplementaryResultError: add size prop
* SupplementaryResultError: remove size prop and adjust sizes
* Infinite scroll: disable when direction is scan
* Fix lint issues
* logsModel: add logs volume test
* chore: unfocus test
* modifyQuery: add function to add drop statement to queries
* Shard query splitting: split metric queries
* Shard query splitting: drop stream shard from metric queries
* Fix tests
* logsModel: skip coverage data when the direction is scan
* Add getter to FolderAPIBuilder so that we can access it in admission
* Remove deprecated return
* Fix test
* Update pkg/registry/apis/folders/register_test.go
Co-authored-by: maicon <maiconscosta@gmail.com>
* Fix maxNested folder test
* Remove log
---------
Co-authored-by: maicon <maiconscosta@gmail.com>
* Uses Combobox in Prometheus for the metrics select, behind feature toggle
* switch to new async combobox api
* clean up MetricCombobox, add in dev slowness
* wip
* reset combobox changes to other pr https://github.com/grafana/grafana/pull/95191
* restore placeholder
* wip
* tests :)
* remove history comment
* use main import
* add new otel grouping variables
* add call for resource attributes for a metric
* add function to update variables for otel join
* interpolate metric in match param
* update group left when starting trail
* process the group left before setting the metric and showing the metric scene
* add attributes to metric overview list
* change label name to attributes because it contains resource attributes and metric attributes
* add resource attributes to label breakdown select
* add otel resource attribute to filters from label breakdown
* add otel flag for rudderstack event when breakdown label selected
* for translations
* add test for new variable in datatrail spec
* add test for filtering otel resource attributes
* update documentation
* add tests for updating the join query with group left resource attributes
* use Nick and Ismail's suggestions, return early, space and no type needed for timerange
* remove unused import
* wip: homepage (new user)
* fix: spacing between button and text; wip refactor: separating bookmarks and recent metrics from home page
* feat: new user homepage; wip: need to clean up code
* fix: change rocket icon to svg
* wip feat: rendering recent metrics
* chore: add comments to understand code, will need to delete / cleanup later / pare down into documentation comments
* wip: new recent metric card design
* wip: display recent metrics cards in rows of 3 (height still incorrect)
* feat: apply conditional styling to remainder recent metrics exploration cards (any cards that are not a complete row of 3)
* fix: render new recent metrics explorations without refresh
* style: render recent metrics explorations in rows of 3 using grid instead of flex; fix: remove remainder card styling
* fix: remove delete button from recent metrics exp cards
* style: make background color for each card take up the entire card/grid space; make height of cards for each row the tallest card
* chore: clean up code
* fix: fix eslint errors
* style: implement recent metrics card header styling
* style: in recent metrics exp cards, format datasource line
* fix: add initial value for _lastModified to fix eslint err
* style: format date correctly; chore: clean up code; wip: get date to render properly on bottom left
* style: make inner card height match outer card height; style: add date footer; style: wrap last metric name; style: wrap labels
* style: adjust font for label name and label value
* style: truncate singular label if value is greater than 35 characters
* style: truncate singular long labels at 44 characters; style: truncate multiple labels at 3 lines; style: correct the border width and radius
* style: make background border radius match the border
* style: correct gap between rows and columns of cards; style: correct padding inside card
* chore: clean up code
* refactor: apply new card UI to DataTrailCard component
* feat: add bookmarks (not formatted correctly), only render section if there are bookmarks, hook up delete functionality
* style: add horizontal line above bookmarks header; style: add bookmarks header
* style: add additional padding above bookmarks divider; chore: delete unused code
* style: add carrot button to bookmarks; style: format heading font style
* refactor: separate bookmarks into functional component; feat: make bookmarks section collapsed by default; feat: allow toggle to expand bookmarks section
* style: position delete button for bookmarks in bottom right of card
* fix: only render recent metrics and bookmarks headings if there are any
* style: add show more button (not functional); style: fix padding around show more button
* chore: delete unused code
* fix: add back gap underneath bookmarks header
* feat: implement show more/less button for recent metrics
* fix: do not show select metric card if user does not actually select a metric
* chore: preliminary code clean up
* chore: delete console.logs, comments
* chore: clean up styling
* Update public/app/features/trails/DataTrailCard.tsx
Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>
* fix: add i18nKey to Trans tags
* fix: attempt to remove go.work.sum changes that are unrelated to my PR
* fix: add Trans tags
* refactor: sepearate recent metrics into functional component; chore: delete unused code; fix: add Trans tags
* chore: generate translation json
* trigger drone
* trigger drone
* fix: add trans tag to date
* chore: abbreviate descriptive key, regenerate json
* Update public/app/features/trails/DataTrailBookmarks.tsx
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
* Update public/app/features/trails/DataTrailsRecentMetrics.tsx
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
* Update public/app/features/trails/DataTrailBookmarks.tsx
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
* fix: revert trans tag on date created to fix formatting
* chore: return null immediately if no recent metrics
* style: add margin between bookmarks header and carrot toggle button
* style: adjust margin to 8px between bookmarks header and carrot toggle button
* style: make margins multiples of 4
* Update public/app/features/trails/DataTrailBookmarks.tsx
Co-authored-by: Brendan O'Handley <brendan.ohandley@grafana.com>
* style: fix light mode styles; style: fix border radius
* fix: save select metric view as recent metric card if labels are applied
* Update public/app/features/trails/DataTrailCard.tsx
Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>
* refactor: move rocket svgs into assets folder
* chore: add back accidentally deleted console log
* Update public/app/features/trails/DataTrail.tsx
Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>
* Update public/app/features/trails/DataTrailBookmarks.tsx
Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>
* chore: revert lastModified related changes since behavior appears to remain the same
* fix: add back lastModified changes because they make the recent metrics show more functionality work
---------
Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
Co-authored-by: Brendan O'Handley <brendan.ohandley@grafana.com>
* add user ID API translation
* add uid to user frontend
* use users' UIDs in admin pages
* fix ldapSync page
* use global user search for user by UID
* remove active org filtering
* remove orgID params
* sandboxfy alerting tutorial part 2
* format
* format2
* added frontmatter
* all pretty no pity
* added setup, login
* link
* STEPS
* login link
* update steps
* improve visibility of part 2
* link
* new diagram image
* img
* all pretty, no pity
* Activate parents of query runner when using dashboard ds
* Set plugin loading util to fix test because activating the ancestors of the query runner needs to be able to load the plugin for the panel
* Rename activateInActiveParents -> activateSceneObjectAndParentTree
* Add back but deprecate activeInActiveParents
* Improves initial indexing speed. Makes params configurable.
* fix linter errors
* removes kind param
* updates index test
* remove println from test
* removes error check in test
* adds log for high index latency ands updates max goroutine var with workers config var
* fix test timing out - set worker limit
* set the batch size
---------
Co-authored-by: Scott Lepper <scott.lepper@gmail.com>
* updated steps
* update before you begin
* updated title
* update title 2
* elaborated on 'Sample logs' section
* updates to improve visibility
* updated links
* format
* updated link
* links and steps
* updated call-to-action boxes
* updated box
* title
* format
* steps
* format
* Made docs live in the now
* all pretty, no pity
* Activate parents of query runner when using dashboard ds
* Set plugin loading util to fix test because activating the ancestors of the query runner needs to be able to load the plugin for the panel
* WIP - Restructure recording rule pages
* Add more `Recording rules` use cases
* Update `Intro > Alert rules`. Minor style changes and updates to the recording rules section
* Minor verb change
* Switch `aliases` and fix broken link
* Bold for clarity
* Complete `Create recording rules in Grafana Alerting`
* Complete data source-managed recording rules
* Final update
* LogsPanel: add props to prepend or append icons to the log row menu
* LogsPanel: add test and type guard
* LogsPanel: add test
* Fix addonBefore position
* Refactor to be an array of ReactNode
* Remove comment
* chore: add docs
* Linting issues
* Rename to CheckObject
* Implement authz.AccessClient
* Move folder tree to reconciler and use new schema
* Move shared functionality to common package
* Add reconciler for managed permissions and resource translations
* Add support for folder resources
* Fix folder status error message
* Add test for folder creation response message
* Add TestFoldersCreateAPIEndpointK8S fixes
* Fix message returned when user has no permissions
* Only enable Faro if origins are the same in iframe
* Handle non-iframe case
* Remove console logs
* Use try catch to identify cross origin iframe
* Only disable transport
* WIP: setup to test folders GetAuthorizer
* Setup test
* Extract authorizer fn for tests
* Setup internal test fn
* Better define test inputs
* Add FolderAPI builder to the test
* First test passing
* Test getAuthorize for the create method
* Change authorizerFunc's signature
* [REVIEW] code readability
* Name error
* [REVIEW] add one more test case. Lint
* Remove empty line
* Implement initial check with schema for generic resources
* Implement List and add tests
* Add namespace type and change to folder_resource name
* Handle namespace grants for typed resources
* Run tests as integration tests
* Add support for verb in list requests
* build(webpack): set publicpath and process urls to resolve assets correctly
* build(webpack): add back --progress to build
* Add local cdn
(cherry picked from commit 7a19523fa476fd5ff2d7669d116f5be462b100f5)
* chore(devenv): fix local_cdn path in ngnix conf
* chore(codeowners): add frontend-ops as owners of local_cdn docker block
---------
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* FIX: Remove the checks for lbac rules inside of datasources
* Remove json validation for lbac rules
* Preserve lbac rules in updates
* Refactored test to remove the table structure
* refactor: change to allow naming and concise override instead of complex branching
* refactor to make sure we set an empty field for updates
* bugfix
* check for datasources.JsonData
* fix merge
* add datasource to check for field presence only
* add function call for readability
* Combobox async: Invalidate using timestamp instead of value
* Simulate keyboard delay in test
* Use a counter instead of timestamps
* Fix feedback
* Expand tests to include case discussed on PR
---------
Co-authored-by: Joao Silva <joao.silva@grafana.com>
* Introduce new models RoutingTree, RouteDefaults and Route and api-server to serve them that is backed by provisioning notification policy service.
* update method UpdatePolicyTree of notification policy service to return route and new version
* declare new actions alert.notifications.routes:read and alert.notifications.routes:write and two corresponding fixed roles.
---------
Co-authored-by: Tom Ratcliffe <tom.ratcliffe@grafana.com>
Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
* ref: ds picker events added
* ref: track opendropdown only on click
* ref: update/update all payload added to the event
* ref: configure more ds button event path to from path
* ref: result count fix, enable/disable track
* ref: debounce search tracks
* ref: track connections_plugin_card_clicked
* ref: call tracking from the child comp with result count
* ref: change event names, add creator_team and schema version
* Add installed and latest version information
* get latest changelog for changelog tab from gcom
* fix displaying signature type
* fix integration test
* add translations
* remove gcom request at local changelog method
* extracted in-proc mode to #93124
* allow insecure conns in dev mode + refactoring
* removed ModeCloud, relying on ModeGrpc and stackID instead to discover if we're running in Cloud
* remove the NamespaceAuthorizer would fail in legacy mode. It will be added back in the future.
* use FlagAppPlatformGrpcClientAuth to enable new behavior, instead of legacy
* extracted authz package changes in #95120
* extracted server side changes in #95086
---------
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
Co-authored-by: gamab <gabriel.mabille@grafana.com>
Co-authored-by: Dan Cech <dcech@grafana.com>
* Transformations: Add field from calc - avoid frame joining in some cases
* Add test for multiple query, 1 field, replace all
* omit frames that had no binary ops performed on them
---------
Co-authored-by: drew08t <drew08@gmail.com>
* fix: Change users permissions search to use a consistent key without collisions
* Move HashString to cacheutils
* Change error handling logic for what to do with a cache key
* Add a test that confirms search cache key consistency
* ds-querier: return QDR instead of k8s error
After parseQuery we know the request is a valid k8s request but we don't
know if the query is valid, therefore this change returns a QDR that
other systems, e.g. alerting ruler, can de-serialize properly.
Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
* ds-querier: fix tests
Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
* tweak status
* refactor refID to empty
---------
Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
* no orgname
* format code
* update unit test
* delete contextSrv
* fix unit test
* run prettier
---------
Co-authored-by: Laura Benz <laura.benz@grafana.com>
* add admin permissions upon creation of a folder w. SA
* Update pkg/services/folder/folderimpl/folder.go
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
* Grant service account permissions for creation of dashboards
* Grant service account admin permissions upon creating a datasource
* fetch user using the userservice with the userid
* Revert "fetch user using the userservice with the userid"
This reverts commit 23cba78752.
* revert back to original datasource creation
---------
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
* handle button focus between states
* fix focus when closing the overlay menu from the close button
* move into a separate hook
* properly feature toggle the hook
* use constants
* All objects should have an UID
* Now with a different error message
* Simplify create on DW 2: use the same object to write to both storages
* Run only one test
* Add check for status code
* Add name if it's not present in mode2
* Populate UID in legacy
* Remove logs and commented code
* Change dualwriter1
* Remove commented code
* Fix list test
* remove get on update from dualwriter 2
* Get object before updating. Better var renaming
* Finish rebasing
* Comment test
* Uncomment tests
* Update legacy first. Add preconditions
* Remove preconditions
* Fix update test
* copy RV from unified to legacy objects
* revert changes to playlist xorm store
* Improve logging. Add go routines for mode3
* Add tests for async funcs in mode3
* Lint
* Lint
* Lint. Start to fix tests
* Fix watcher tests
* Fix store tests
* Fiinish fixing watcher tests
* Fix server tests
* add name check
* Update pkg/apiserver/rest/dualwriter_mode1.go
Co-authored-by: Bruno Abrantes <bruno.abrantes@grafana.com>
* All objects should have an UID
* Now with a different error message
* Simplify create on DW 2: use the same object to write to both storages
* Run only one test
* Add check for status code
* Add name if it's not present in mode2
* Populate UID in legacy
* Remove logs and commented code
* Change dualwriter1
* Remove commented code
* Fix list test
* remove get on update from dualwriter 2
* Get object before updating. Better var renaming
* Finish rebasing
* Comment test
* Uncomment tests
* Fix update test
* revert changes to playlist xorm store
* Improve logging. Add go routines for mode3
* Lint
* Fix watcher tests
* Fiinish fixing watcher tests
* Add mode 5 with etcd test case. Add early check to fail on populated RV in payload
* we can't set RV to the found object when updating
* Lint
* Don't fail on update playlists
* Name should not be different when updating and it should be not empty on creating
* Fix tests
* Update pkg/apiserver/rest/dualwriter_mode2.go
Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
* Lint
* Fix mode 5 tests
* Lint
* Add generateName condition on every mode. Fix tests
* Lint
* Add condition on where name or generate name have to be set
* Fix test
* Lint
* Fix folders test
* We dont need to send name for mode1
* Fail if UID is not present
* Remove change from not running test
* Remove unused line
* Lint
* Update pkg/storage/unified/apistore/store.go
Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
* Improve error message
* Fix broken watcher test
* Fail on name mismatch on update
* Remove log
* Make sure UIDs match on create in both stores
* Lint
* Write first to unified storage
* Remove uid setting
* Remove RV only in mode2
* Fix test. Remove log line
* test
* No need to asser on RV in mode3
* Remove RV check due to race condition
* Update dualwriter.go
Co-authored-by: Georges Chaudy <chaudyg@gmail.com>
* Update pkg/storage/unified/client.go
* remove unused parameter
* log an error for object is missing UID instead of returning an error
* remove obj.SetResourceVersion("")
* log an error for object is missing UID instead of returning an error
* FInalise merge
* Move RV check to where it was
* Remove name check
* Remove server check for backwards compatibility
* Remove unused fn
* Move test checks for another PR
* Dont commit go work sum changes
* Only log error if RV is present for now.
---------
Co-authored-by: Todd Treece <todd.treece@grafana.com>
Co-authored-by: Bruno Abrantes <bruno.abrantes@grafana.com>
Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
Co-authored-by: Georges Chaudy <chaudyg@gmail.com>
Previously all receiver modifications were denied with alertingApiServer
enabled. This allows pure creates and deletes through as these specific
cases can be handled simply and without risk of rbac shenanigans.
* Fix: Fix panic when json data are nil
* Use Interface()
* Feedback
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
* Need to check inside the if statement
---------
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
* Implement uidToResourceID
* add middleware
* Move uidToResourceID to alerting package
* Only hash uid if it's too long
* Use hashed uid in access control
* Move ReceiverUidToResourceId to ScopeProvider
* resolve uid in middleware only if param exists
* Tests
* Linting
---------
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
This solves problems on Linux distros like NixOS and BSDs like FreeBSD that don't provide `/bin/bash`, while also
maintaining support for all other distros out there (AFAIK? even Alpine with its Busybox has /usr/bin/env).
* adds metric for watch latency
* registers storage metrics when creating a new ResourceServer
* defines the latency (in milliseconds) as the diff between now and the RV. Still need to wait until PR for switching RV to millisecond timestamp is rolled out.
* should be micro seconds not milli
* for watch latency, use diff between now and resource version and convert to seconds
* fix typo
* Loki query editor: update CompletionDataProvider time range when it changes
* CompletionDataProvider: update test and add regression
* Formatting
* Completion Data Provider: clear cache when the time range changes
* Completion Data Provider: specifically test for undefined values vs empty string
* Transforms raw US resource into an intermediate IndexableResource and indexes that. Pulls index mapping code out into different file. For now, we will hardcode which spec fields are indexed, per resource.
* Fixes a few bugs with field casing and timestamps not being formatted right (or not existing).
* adds readme section for using search with US
* extracts to function to transform from search hit to IndexedResource
* get folders when building index
* Remove SettingProvider settings from SSO interactions
* Mock Settings Provider for SSO Settings test
* Ignore error from SettingsProvider
* Add test for backend
* start on tokens
* more error messages
* more handling
* rephrased with suggestions from Daniel
* separate gms parse method
* use translation
* refactor initial idea to use error obj
* use error dto result
* handle gms client
* clean logs and comments
* fix tests
* tests for gms
* test and lint
* lint
* one more handling from gms
* typing in fe
* use error interface
* use validation error
* remove unused gms error
* use errorlib and helper function in fe
* regen api
* use same error util
* one more error to handle
* Also validate folder on provisioning update
* Move folder check before auth check
When checking for the existence of a folder we go through the folder
service which requires auth. Doing so prevents an unprivileged user from
accessing information about whether a particular folder exists or not.
* move query library + share buttons to toolbar
* add share text to button
* need spacer when not in singleTopNav
* fix unit tests
* use secondary button styling when singleTopNav is enabled
* Request trace by id using v2, fallback for v1 when 404
* Show partial traces badge in Trace View
* update go work sum
* Fix tests
* some linting
* Fix tests and try to ignore linter
* Move no lint
* nolint:bodyclose
* merge main
* Fix null tags in array
* Fix test
* Update go.sum
* Update go.sum
* Build: Fix docker manifest create not using correct IMAGE_TAG
* Support publishing security versions of NPM packages
---------
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
Co-authored-by: Kevin Minehart <kmineh0151@gmail.com>
Co-authored-by: Diego Augusto Molina <diegoaugustomolina@gmail.com>
* Use a enable configuration to enable frontend sandbox
* Modify settings to load enableFrontendSandbox
* Check for signature type
* Update commment
* Fix e2e tests for the frontend sandbox
* Modify logic so a custom check function is used instead of a list of checks
* Fixes flaky test
* fix comment
* Update comment
* Empty commit
* Empty commit
* Update texts for gm rr in the form
* fix translations
* Fix test
* address review comments
* address review comments - part2
* translations
* update docs for new term: output
* Rewrite zanzana collector to fetch all available pages
* Register access control as a background service
* If zanzana is enabled we run Syncs and start Reconciliation job
* Update pkg/services/authz/zanzana/client/client.go
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
* Use server lock when doing performing reconciliation
* start on loading the error code
* error code to message mapping
* use resource code type
* use defined error code
* partial updates from comments
* i18nKey gen
* fixed t
* fixed translations
* typing
* CloudMigrations: create snapshot for Notification Policy
* CloudMigrations: add notification policy constants and components
* CloudMigrations: add uid to resources that have it
* Add streamingEnabled to Tempo ds docs
* Update docs/sources/datasources/tempo/configure-tempo-data-source.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
---------
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Tidy and update types
* Tidy up comments
* More tidy up
* Simplify logic and reduce repitition in autocomplete
* Simplify logic
* Add and support new intrinsics
* Only retrieve intrinsics from language provider
* Move generateQueryFromFilters to languageProvider
* Initial async
* Set value
* Update story
* Ignore older returned requests
* Add tests
* Update async test
* Support custom value
* Fix ignore late responses test
* Add act to test
* Fix final test
* Remove comment and fix type error
* refactor async story to look more like api call
* allow consumers to pass in a value with a label, for async
* compare story to async select
* Move 'keep latest async value' into seperate hook
* remove null fn from useLatestAsyncCall
* remove commented assertion
* move custom value to top
* before/afterAll & useRealTimers
* create a user
* no useless await
---------
Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: joshhunt <josh@trtr.co>
* run service account creation DB queries in transaction
* extract the signed in user from the context
* undo unneeded change
* don't error out if a user is not found
* Update pkg/services/serviceaccounts/manager/service.go
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
* Update pkg/services/serviceaccounts/manager/service.go
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
---------
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
* Fixes#94296
* format code
* format code
* remove the timezone
* fix bug
* format code
* update unit test
* modified csv data order
* format code
* delete csv change
* build(webpack): extract css imports into files including node_modules
* feat(webassets): add cssfiles to entrypoint assets for extracted css files
* feat(views): add entrypoint css link tags to html templates
* feat(webassets): set CDN prefix for CSS files
* test(webassets): trim down sample-assets-manifest, fix failing snapshot tests
* Update pkg/api/webassets/webassets_test.go
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* build(webpack): remove css module loader
---------
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* CloudMigrations: create snapshot for Contact Points
* CloudMigrations: add contact point copies and components in frontend
* CloudMigrations: temporarily use bell for all alerts resources
* feat(frontend): introduce project.json for every workspace to improve caching
* refactor(frontend): use nx tags for grafana dependson
* refactor(frontend): clean up nx tags for packages and plugins
* build(nx): make grafana dependent on cacheable generate icons command
* build(nx): clean up project files
* introduce appPlatformGrpcClientAuth (renamed appPlatformAccessTokens which is not used)
* re-run toggles gen
---------
Co-authored-by: gamab <gabriel.mabille@grafana.com>
* Added Query hints for Prometheus query code editor
* ES Lint fixes
* Remoed displayName from queryEditorHints as it was unused
* Added the logic on button click to difference function
* extracted data to constants from props
* added css style to hints
* Use advanced options when query params are not transformable
* Update public/app/features/alerting/unified/components/rule-editor/query-and-alert-condition/QueryAndExpressionsStep.tsx
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
---------
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
* Publish event when one or more rules are changed
* Publish affected rules
* Use a fake bus to test publish event without listening
* Wire alerting store into provisioning service
* Combobox: Measure text of longest label for dropdown width
* remove commented out code
* add story to compare to Select
* move magic numbers to constants to reference, and calculate the scrollbar width
* look at first 100,000 items
* Extract shared add to dashboard flow
* Change how we save and add the new panels
* More cleanup
* Began updating tests
* Move and update tests
* set time range
* Fix lint / ts issues
* Fix time history step issue
* fix test
* Update betterer
* remove more tests that are now not needed
* work around cyclic dep
* Update
* Fixes
* fix lint
* remove unused type
* Require create permissions when creating folder
* Test folder create permissions
* Add test for nested folder permissions on creation
* Replace hardcoded verbs
* Remove traceQLStreaming feature flag from docs
* Apply suggestions from code review
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Updates from prettier
---------
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
`GuranteedUpdate` method of `apistore.Storage` had a bug, where it would
errorneously conclude that the object is unchanged, in case a
`tryUpdate` function is passed that modifies the existing object itself
(as it is the case in many core types in K8s upstream).
The modified `existingObj` was compared with `updatedObj`, which would
essentially be same and this lead to the update being skipped.
This patch fixes this by always passing a copy of the `existingObj`.
Signed-off-by: Prem Kumar <prem.saraswat@grafana.com>
* Use epoch with microsecond resolution as RV
* fix backend tests
* Add solution for when the clock goes back
* Add solution for when the clock goes back
* generate mocks
* go lint
* remove comment
* Use Greatest instead of max in msyql and postgres
* update tests
* Update pkg/storage/unified/sql/sqltemplate/dialect_sqlite.go
Co-authored-by: Diego Augusto Molina <diegoaugustomolina@gmail.com>
* cast to bigint
* add additional round trip
* increment the RV using 2 sql round trips instead of 3
* cleanup comments
* cast unix timestamp to integer
* fix postgres query
* remove old increment test data
* remove greatest
* cast unix_timestamp to signed
* Use statement_timestamp instead of clock_timestamp
---------
Co-authored-by: Diego Augusto Molina <diegoaugustomolina@gmail.com>
* refactor: remove FE feat toggle from BE
* refactor: remove FE toggle and adjust roles
* refactor: replace feat toggle in tracking events
* refactor: remove FE feat toggle
* refactor: remove FE feat toggle
* fix: autogenerated file
* ref: pass tracer to plugin factory func
* fix: add tracer to coreplugin
* test: fix test, generate wire
* test: ignore trace field in loader_test
* ref: pass tracer as dependency, don't store in plugin
* ref: wrap tracer with tracer provider to satisfy WithTracerProvider
* ref: use otel trace.Tracer type for tracer
* scenes error when options not set
* add all of the options that are updated in onOptionsChange
* add options to all the other places we are building timeseries panels
* Update public/app/features/trails/AutomaticMetricQueries/graph-builders/percentiles.ts
Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>
* remove activation handlers and unused code
* Update public/app/features/trails/AutomaticMetricQueries/graph-builders/simple.ts
Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>
* Update public/app/features/trails/AutomaticMetricQueries/graph-builders/percentiles.ts
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
---------
Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
* Open dashboard list when a scope is selected
* refactor
* test
* remove localstorage key
* add checks on open/close methods
* remove redundant statement
* improve dashboards listing
* Pass parent folder as a contextual tuple in Check request
* Search by listing folders and dashboards
* skip dashboards listing if limit reached
* remove unused
* add some comments
* only add ContextualTuples if parent provided
* Remove parent relation for dashboards from schema and perform separate checks
* resource-api: Loosen name validation to match K8s requirements
This patch modifies some of the requirements for name validation of
objects in Resource API to match Kubernetes.
The limit we have on characters in name is 64, but some resources allow
upto 253 characters. Similarly we also include `:` in the regex, as many
objects in default K8s setup use it in the name (the group
`system:masters` for example)
Signed-off-by: Prem Kumar <prem.saraswat@grafana.com>
* Update the name column length in migrator and update e2e test to verify
---------
Signed-off-by: Prem Kumar <prem.saraswat@grafana.com>
* Support getting full path of UIDs
* Use full path to set parents field
* Update get folder test
* Add folder store test for getting with full path UIDs
* Add test for parsing parent titles
* Test nested folder create payload
* Update dependency @grafana/scenes to v5.20.0
* bump scenes-react as well
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* wip
* add simple scenes object with logs panel
* return hardcoded log message from runtime ds
* simplify log entry
* use log in links registry
* wired the log together.
* wip
* Connected the extensions log to the runtime datasource to steam logs
* wired the other registies.
* implemented child function.
* set right field type on labels
* set meta type
* using the logger in various places.
* added type of onclick.
* removed time picker.
* removed imports.
* passing log to functions where they are needed.
* moved scene into admin page.
* minor improvement to the message.
* added possibility to update query with values based on the data.
* added filter suppoert.
* wip
* wip
* fixed so extension points are displayed.
* use log level from grafana data
* fixed bugs with the filtering.
* Fixed some logs.
* only register extensions page in development mode.
* fixed filtering.
* added on click debug log.
* PluginExtensions: Add debug log to Grafana (Rewrite to scenes-react) (#93954)
* refactoring.
* simplify it even more.
* Update public/app/features/plugins/extensions/logs/LogViewer.tsx
Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
* used VizGridLayout instead of VizGrid component.
* Fixed feedback and fixed bug in filtering logic.
* fixed another nit.
* empty string instead of title.
* Added tests and fixed error.
* added test file.
* regenerated yarn.lock
* Update public/app/features/plugins/extensions/logs/filterTransformation.test.ts
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
* fixed nit.
* more nits.
* added more test cases.
* simplified filtering logic.
* removed unused dep.
* defined broadcast channel in jest setup.
* added tests for datasource.
* fixed failed tests.
* fixed tests.
* fixing go lint issue.
* silent go lint.
* fixed lint issue.
---------
Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
* adds Filter gRPC and make protobuf
* adds route for querying the filter gRPC
* wires up Filter gRPC call
* [WIP] index from start
* renames gRPC endpoint to "Search"
* adds /apis/search route into k8s routes. Hacky for now.
* updates readme - wrong casing
* adds feature toggle for unified storage search
* hides US search behind feature flag. Clean up print statements.
* removes indexer - will be added in another PR
* Search: Add API Builder
* adds required method
* implementing UpdateAPIGroupInfo (WIP)
* adds groupversion
* commenting out for now
* remove unneeded code from experimenting and update register.go to match interface required
* list resources and load into index
* pass context
* namespaces search route
* lint
* watch
* add todo
* add todo
* merge
* cleanup
* add todo
* gen protobuf
* lint; fix migration issue
* Updates index mapping function to map unified storage object Value
* Changes Index() to pointer receiver - fixes panic
* add delete
* cleanup
* gets search/browse functioning. Results show up as base64 encoded. Still a WIP.
* Doesnt json re-encode gRPC response in search handler
* add kind to SearchRequest proto
* Updates query interface to be more generic. Make proto. Parses query params in api server.
* make protobuf
* removes unused method and imports
* Returns all indexed fields in search results. Adds pagination support (limit + offset).
* remove comment
* remove unused struct
* gets tenant in search k8s api handler
* adds hardcoded spec field mappings - starting with playlists
* adds all spec fields to search results
* moved helper function for field mappings into index
* only includes allowed spec fields in search results
* cleans up error handling
* removes debug log
---------
Co-authored-by: leonorfmartins <leonorfmartins@gmail.com>
Co-authored-by: Todd Treece <todd.treece@grafana.com>
Co-authored-by: Scott Lepper <scott.lepper@gmail.com>
* Fix detail view not showing instances nor history tab
* small refactor
* Update public/app/features/alerting/unified/hooks/useCombinedRule.ts
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
* refactor
---------
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
// need to ignore emotion's `css` prop, see https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unknown-property.md#rule-options
- **Alerting:** Make context deadline on AlertNG service startup configurable [#96135](https://github.com/grafana/grafana/pull/96135), [@fayzal-g](https://github.com/fayzal-g)
- **MigrationAssistant:** Restrict dashboards, folders and datasources by the org id of the signed in user [#96345](https://github.com/grafana/grafana/pull/96345), [@leandro-deveikis](https://github.com/leandro-deveikis)
- **User:** Check SignedInUser OrgID in RevokeInvite [#95490](https://github.com/grafana/grafana/pull/95490), [@mgyongyosi](https://github.com/mgyongyosi)
### Bug fixes
- **Alerting:** Fix escaping of silence matchers in utf8 mode [#95347](https://github.com/grafana/grafana/pull/95347), [@tomratcliffe](https://github.com/tomratcliffe)
- **Alerting:** Fix overflow for long receiver names [#95133](https://github.com/grafana/grafana/pull/95133), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Fix saving advanced mode toggle state in the alert rule editor [#95981](https://github.com/grafana/grafana/pull/95981), [@alexander-akhmetov](https://github.com/alexander-akhmetov)
- **Alerting:** Fix setting datasource uid, when datasource is string in old version [#96273](https://github.com/grafana/grafana/pull/96273), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
- **Alerting:** Force refetch prom rules when refreshing panel [#96125](https://github.com/grafana/grafana/pull/96125), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
- **Anonymous User:** Adds validator service for anonymous users [#94994](https://github.com/grafana/grafana/pull/94994), [@leandro-deveikis](https://github.com/leandro-deveikis)
- **Anonymous User:** Adds validator service for anonymous users (Enterprise)
- **Azure Monitor:** Support metric namespaces fallback [#95155](https://github.com/grafana/grafana/pull/95155), [@aangelisc](https://github.com/aangelisc)
- **CloudWatch:** Interpolate region in log context query [#94990](https://github.com/grafana/grafana/pull/94990), [@iwysiu](https://github.com/iwysiu)
- **Dashboard datasource:** Return annotations as series when query topic is "annotations" [#95971](https://github.com/grafana/grafana/pull/95971), [@kaydelaney](https://github.com/kaydelaney)
- **Dashboard:** Append orgId to URL [#95963](https://github.com/grafana/grafana/pull/95963), [@bfmatei](https://github.com/bfmatei)
- **Dashboards:** Fixes performance issue expanding a row [#95321](https://github.com/grafana/grafana/pull/95321), [@torkelo](https://github.com/torkelo)
- **Flame Graph:** Fix crash when it receives empty data [#96211](https://github.com/grafana/grafana/pull/96211), [@yincongcyincong](https://github.com/yincongcyincong)
- **Folders:** Add admin permissions upon creation of a folder w. SA [#95365](https://github.com/grafana/grafana/pull/95365), [@eleijonmarck](https://github.com/eleijonmarck)
- **Folders:** Don't show error pop-up if the user can't fetch the root folder [#95600](https://github.com/grafana/grafana/pull/95600), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **Migration:** Remove table aliasing in delete statement to make it work for mariadb [#95232](https://github.com/grafana/grafana/pull/95232), [@kalleep](https://github.com/kalleep)
- **Service Accounts:** Run service account creation in transaction [#94803](https://github.com/grafana/grafana/pull/94803), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **Table:** Fix text wrapping applying to wrong field [#95425](https://github.com/grafana/grafana/pull/95425), [@codeincarnate](https://github.com/codeincarnate)
- **Unified Storage:** Use ssl_mode instead of sslmode [#95662](https://github.com/grafana/grafana/pull/95662), [@chaudyg](https://github.com/chaudyg)
<!-- 11.3.1 END -->
<!-- 11.2.4 START -->
# 11.2.4 (2024-11-19)
### Features and enhancements
- **Alerting:** Make context deadline on AlertNG service startup configurable [#96133](https://github.com/grafana/grafana/pull/96133), [@fayzal-g](https://github.com/fayzal-g)
- **MigrationAssistant:** Restrict dashboards, folders and datasources by the org id of the signed in user [#96344](https://github.com/grafana/grafana/pull/96344), [@leandro-deveikis](https://github.com/leandro-deveikis)
- **Folders:** Add admin permissions upon creation of a folder w. SA [#95416](https://github.com/grafana/grafana/pull/95416), [@eleijonmarck](https://github.com/eleijonmarck)
- **Migration:** Remove table aliasing in delete statement to make it work for mariadb [#95231](https://github.com/grafana/grafana/pull/95231), [@kalleep](https://github.com/kalleep)
- **ServerSideExpressions:** Disable SQL Expressions to prevent RCE and LFI vulnerability [#94959](https://github.com/grafana/grafana/pull/94959), [@samjewell](https://github.com/samjewell)
<!-- 11.2.4 END -->
<!-- 11.1.9 START -->
# 11.1.9 (2024-11-19)
### Features and enhancements
- **Alerting:** Make context deadline on AlertNG service startup configurable [#96132](https://github.com/grafana/grafana/pull/96132), [@fayzal-g](https://github.com/fayzal-g)
- **User:** Check SignedInUser OrgID in RevokeInvite [#95488](https://github.com/grafana/grafana/pull/95488), [@mgyongyosi](https://github.com/mgyongyosi)
### Bug fixes
- **Alerting:** Force refetch prom rules when refreshing panel [#96123](https://github.com/grafana/grafana/pull/96123), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
- **Anonymous User:** Adds validator service for anonymous users [#94992](https://github.com/grafana/grafana/pull/94992), [@leandro-deveikis](https://github.com/leandro-deveikis)
- **Anonymous User:** Adds validator service for anonymous users (Enterprise)
- **Azure Monitor:** Support metric namespaces fallback [#95153](https://github.com/grafana/grafana/pull/95153), [@aangelisc](https://github.com/aangelisc)
- **Migration:** Remove table aliasing in delete statement to make it work for mariadb [#95230](https://github.com/grafana/grafana/pull/95230), [@kalleep](https://github.com/kalleep)
- **ServerSideExpressions:** Disable SQL Expressions to prevent RCE and LFI vulnerability [#94969](https://github.com/grafana/grafana/pull/94969), [@scottlepp](https://github.com/scottlepp)
<!-- 11.1.9 END -->
<!-- 11.0.8 START -->
# 11.0.8 (2024-11-19)
### Features and enhancements
- **Alerting:** Make context deadline on AlertNG service startup configurable [#96131](https://github.com/grafana/grafana/pull/96131), [@fayzal-g](https://github.com/fayzal-g)
- **User:** Check SignedInUser OrgID in RevokeInvite [#95487](https://github.com/grafana/grafana/pull/95487), [@mgyongyosi](https://github.com/mgyongyosi)
### Bug fixes
- **Anonymous User:** Adds validator service for anonymous users [#95151](https://github.com/grafana/grafana/pull/95151), [@leandro-deveikis](https://github.com/leandro-deveikis)
- **Anonymous User:** Adds validator service for anonymous users (Enterprise)
- **Azure Monitor:** Support metric namespaces fallback [#95152](https://github.com/grafana/grafana/pull/95152), [@aangelisc](https://github.com/aangelisc)
- **Migration:** Remove table aliasing in delete statement to make it work for mariadb [#95229](https://github.com/grafana/grafana/pull/95229), [@kalleep](https://github.com/kalleep)
- **Alerting:** Make context deadline on AlertNG service startup configurable [#96058](https://github.com/grafana/grafana/pull/96058), [@fayzal-g](https://github.com/fayzal-g)
<!-- 10.4.12 END -->
<!-- 11.3.0 START -->
# 11.3.0 (2024-10-22)
@@ -46,6 +173,89 @@
- **SubMenu:** Fix expanding sub menu items on touch devices [#93208](https://github.com/grafana/grafana/pull/93208), [@yincongcyincong](https://github.com/yincongcyincong)
<!-- 11.3.0 END -->
<!-- 11.2.3 START -->
# 11.2.3 (2024-10-22)
### Bug fixes
- **Alerting:** Fix incorrect permission on POST external rule groups endpoint [CVE-2024-8118] [#93947](https://github.com/grafana/grafana/pull/93947), [@alexweav](https://github.com/alexweav)
- **Canvas:** Allow API calls to grafana origin [#94129](https://github.com/grafana/grafana/pull/94129), [@adela-almasan](https://github.com/adela-almasan)
- **Folders:** Correctly show new folder button under root folder [#94712](https://github.com/grafana/grafana/pull/94712), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **OrgSync:** Do not set default Organization for a user to a non-existent Organization [#94549](https://github.com/grafana/grafana/pull/94549), [@mgyongyosi](https://github.com/mgyongyosi)
- **ServerSideExpressions:** Disable SQL Expressions to prevent RCE and LFI vulnerability [#94959](https://github.com/grafana/grafana/pull/94959), [@samjewell](https://github.com/samjewell)
<!-- 11.2.3 END -->
<!-- 11.2.2+security-01 START -->
# 11.2.2+security-01 (2024-10-17)
### Bug fixes
- **SQL Expressions**: Fixes CVE-2024-9264
<!-- 11.2.2+security-01 END -->
<!-- 11.2.1+security-01 START -->
# 11.2.1+security-01 (2024-10-17)
### Features and enhancements
### Bug fixes
- **SQL Expressions**: Fixes CVE-2024-9264
<!-- 11.2.1+security-01 END -->
<!-- 11.1.8 START -->
# 11.1.8 (2024-10-22)
### Bug fixes
- **Alerting:** Fix incorrect permission on POST external rule groups endpoint [CVE-2024-8118] [#93948](https://github.com/grafana/grafana/pull/93948), [@alexweav](https://github.com/alexweav)
- **OrgSync:** Do not set default Organization for a user to a non-existent Organization [#94551](https://github.com/grafana/grafana/pull/94551), [@mgyongyosi](https://github.com/mgyongyosi)
- **ServerSideExpressions:** Disable SQL Expressions to prevent RCE and LFI vulnerability [#94969](https://github.com/grafana/grafana/pull/94969), [@scottlepp](https://github.com/scottlepp)
<!-- 11.1.8 END -->
<!-- 11.1.7+security-01 START -->
# 11.1.7+security-01 (2024-10-17)
### Bug fixes
- **SQL Expressions**: Fixes CVE-2024-9264
<!-- 11.1.7+security-01 END -->
<!-- 11.1.6+security-01 START -->
# 11.1.6+security-01 (2024-10-17)
### Bug fixes
- **SQL Expressions**: Fixes CVE-2024-9264
<!-- 11.1.6+security-01 END -->
<!-- 11.0.6+security-01 START -->
# 11.0.6+security-01 (2024-10-17)
### Bug fixes
- **SQL Expressions**: Fixes CVE-2024-9264
<!-- 11.0.6+security-01 END -->
<!-- 11.0.5+security-01 START -->
# 11.0.5+security-01 (2024-10-17)
### Bug fixes
- **SQL Expressions**: Fixes CVE-2024-9264
<!-- 11.0.5+security-01 END -->
<!-- 11.2.2 START -->
# 11.2.2 (2024-10-01)
@@ -89,6 +299,19 @@
- **Plugins:** Avoid returning 404 for `AutoEnabled` apps [#93487](https://github.com/grafana/grafana/pull/93487), [@wbrowne](https://github.com/wbrowne)
<!-- 11.1.7 END -->
<!-- 11.0.7 START -->
# 11.0.7 (2024-10-22)
### Bug fixes
- **Alerting:** Fix incorrect permission on POST external rule groups endpoint [CVE-2024-8118] [#93949](https://github.com/grafana/grafana/pull/93949), [@alexweav](https://github.com/alexweav)
- **Dashboard:** Make dashboard search faster [#94702](https://github.com/grafana/grafana/pull/94702), [@knuzhdin](https://github.com/knuzhdin)
- **OrgSync:** Do not set default Organization for a user to a non-existent Organization [#94552](https://github.com/grafana/grafana/pull/94552), [@mgyongyosi](https://github.com/mgyongyosi)
- **ServerSideExpressions:** Disable SQL Expressions to prevent RCE and LFI vulnerability [#94971](https://github.com/grafana/grafana/pull/94971), [@samjewell](https://github.com/samjewell)
<!-- 11.0.7 END -->
<!-- 11.0.6 START -->
# 11.0.6 (2024-10-01)
@@ -106,6 +329,17 @@
- **Plugins:** Avoid returning 404 for `AutoEnabled` apps [#93486](https://github.com/grafana/grafana/pull/93486), [@wbrowne](https://github.com/wbrowne)
- **Alerting:** Fix incorrect permission on POST external rule groups endpoint [CVE-2024-8118] [#93946](https://github.com/grafana/grafana/pull/93946), [@alexweav](https://github.com/alexweav)
- **Dashboard:** Make dashboard search faster [#94703](https://github.com/grafana/grafana/pull/94703), [@knuzhdin](https://github.com/knuzhdin)
<!-- 10.4.11 END -->
<!-- 10.4.10 START -->
# 10.4.10 (2024-10-01)
@@ -121,6 +355,16 @@
- **Correlations:** Limit access to correlations page to users who can access Explore [#93673](https://github.com/grafana/grafana/pull/93673), [@ifrost](https://github.com/ifrost)
<!-- 10.4.10 END -->
<!-- 10.3.12 START -->
# 10.3.12 (2024-10-22)
### Bug fixes
- **Alerting:** Fix incorrect permission on POST external rule groups endpoint [CVE-2024-8118] [#93945](https://github.com/grafana/grafana/pull/93945), [@alexweav](https://github.com/alexweav)
- **Dashboard:** Make dashboard search faster [#94704](https://github.com/grafana/grafana/pull/94704), [@knuzhdin](https://github.com/knuzhdin)
rawSchemaPlaylistv0alpha1=[]byte(`{"spec":{"properties":{"interval":{"type":"string"},"items":{"items":{"properties":{"type":{"description":"type of the item.","enum":["dashboard_by_tag","dashboard_by_uid","dashboard_by_id"],"type":"string"},"value":{"description":"Value depends on type and describes the playlist item.\n - dashboard_by_id: The value is an internal numerical identifier set by Grafana. This\n is not portable as the numerical identifier is non-deterministic between different instances.\n Will be replaced by dashboard_by_uid in the future. (deprecated)\n - dashboard_by_tag: The value is a tag which is set on any number of dashboards. All\n dashboards behind the tag will be added to the playlist.\n - dashboard_by_uid: The value is the dashboard UID","type":"string"}},"required":["type","value"],"type":"object"},"type":"array"},"title":{"type":"string"}},"required":["title","interval","items"],"type":"object"},"status":{"properties":{"additionalFields":{"description":"additionalFields is reserved for future use","type":"object","x-kubernetes-preserve-unknown-fields":true},"operatorStates":{"additionalProperties":{"properties":{"descriptiveState":{"description":"descriptiveState is an optional more descriptive state field which has no requirements on format","type":"string"},"details":{"description":"details contains any extra information that is operator-specific","type":"object","x-kubernetes-preserve-unknown-fields":true},"lastEvaluation":{"description":"lastEvaluation is the ResourceVersion last evaluated","type":"string"},"state":{"description":"state describes the state of the lastEvaluation.\nIt is limited to three possible states for machine evaluation.","enum":["success","in_progress","failed"],"type":"string"}},"required":["lastEvaluation","state"],"type":"object"},"description":"operatorStates is a map of operator ID to operator state evaluations.\nAny operator which consumes this kind SHOULD add its state evaluation information to this field.","type":"object"}},"type":"object","x-kubernetes-preserve-unknown-fields":true}}`)
# Comma-separated list of plugins ids that will be loaded inside the frontend sandbox
# Currently behind the feature flag pluginsFrontendSandbox
enable_frontend_sandbox_for_plugins=
# Comma-separated list of paths for POST/PUT URL in actions. Empty will allow anything that is not on the same origin
actions_allow_post_url=
@@ -553,7 +557,7 @@ token_expiration_day_limit =
# Login cookie name
login_cookie_name=grafana_session
# Disable usage of Grafana build-in login solution.
# Disable usage of Grafana's built-in login solution.
disable_login=false
# The maximum lifetime (duration) an authenticated user can be inactive before being required to login at next visit. Default is 7 days (7d). This setting should be expressed as a duration, e.g. 5m (minutes), 6h (hours), 10d (days), 2w (weeks), 1M (month). The lifetime resets at each successful token rotation (token_rotation_interval_minutes).
@@ -622,6 +626,11 @@ id_response_header_namespaces = user api-key service-account
# This feature currently **only supports single-organization deployments**
# Max requests accepted per short interval of time for Grafana backend log ingestion endpoint (/log)
log_endpoint_burst_limit=15
# Enables all Faro default instrumentation by using `getWebInstrumentations`. Overrides other instrumentation flags.
instrumentations_all_enabled=false
# Should error instrumentation be enabled, only affects Grafana Javascript Agent
instrumentations_errors_enabled=true
@@ -1562,7 +1574,8 @@ enabled = true
#################################### Short Links #############################
[short_links]
# Short links which are never accessed will be deleted as cleanup. Time is in days. Default is 7 days. Max is 365. 0 means they will be deleted approximately every 10 minutes.
# Short links that are never accessed will be deleted as cleanup. Time is set up in days. The default is 7 days. Maximum value is 365.
# 0 means they will be deleted approximately every 10 minutes. A negative value (such as -1) will disable expiration.
# Comma separated list of plugin ids for which environment variables should be forwarded. Used only when feature flag pluginsSkipHostEnvVars is enabled.
forward_host_env_vars=
# Comma separated list of plugin ids to install as part of the startup process.
preinstall=grafana-lokiexplore-app
#By default, the following plugins will be preinstalled: "grafana-lokiexplore-app"
preinstall=
#Controls whether preinstall plugins asynchronously (in the background) or synchronously (blocking). Useful when preinstalled plugins are used with provisioning.
preinstall_async=true
#Disables preinstall feature. It has the same effect as setting preinstall to an empty list.
You can access the web UI at http://localhost:12080/#/
## Debugging setup in VS Code
An example of launch.json is provided in `devenv/vscode/launch.json`. It basically does what Makefile and .bra.toml do. The 'program' field is set to the folder name so VS Code loads all *.go files in it instead of just main.go.
An example of launch.json is provided in `.vscode/launch.json`. It basically does what Makefile and .bra.toml do. The 'program' field is set to the folder name so VS Code loads all *.go files in it instead of just main.go.
@@ -234,7 +234,7 @@ To determine the number of active users:
A tiered license defines dashboard viewers, and dashboard editors and administrators, as two distinct user types that each have their own user limit.
As of Grafana Enterprise version 9.0, Grafana only counts and enforces the _total_ number of active users in your Grafana instance. For example, if you purchase 150 active users, you can have 20 admins, 70 editors, and 60 viewers, or you can have 150 admins. Grafana will enforce the total number of active users even if you use a license that grants a specific number of admins or editors and a certain number of viewers. This is a more permissive policy than before, which gives you the flexibility to change users' roles.
Grafana only counts and enforces the _total_ number of active users in your Grafana instance. For example, if you purchase 150 active users, you can have 20 admins, 70 editors, and 60 viewers, or you can have 150 admins. Grafana will enforce the total number of active users even if you use a license that grants a specific number of admins or editors and a certain number of viewers. This is a more permissive policy than before, which gives you the flexibility to change users' roles.
If you are running a pre-9.0 version of Grafana Enterprise, please refer to the documentation for that version to learn more about license enforcement in your current version.
@@ -103,53 +103,45 @@ To browse for available plugins:
### Install a plugin
To install a plugin:
The most common way to install a plugin is through the Grafana UI, but alternative methods are also available.
1. In Grafana, click **Administration > Plugins and data > Plugins** in the side navigation menu to view all plugins.
1. Browse and find a plugin.
1. Click the plugin's logo.
1. Click **Install**.
When the update is complete, you'll see a confirmation message that the installation was successful.
There are also additional ways to install plugins depending on your setup.
### Update a plugin
#### Install a plugin using Grafana CLI
To update a plugin:
Grafana CLI allows you to install, upgrade, and manage your Grafana plugins using a command line. For more information about Grafana CLI plugin commands, refer to [Plugin commands]({{< relref "../../cli/#plugins-commands" >}}).
1. In Grafana, click **Administration > Plugins and data > Plugins** in the side navigation menu to view all plugins.
1. Click the **Installed** filter to show only installed plugins.
1. Click the plugin's logo.
1. Click **Update**.
#### Install a plugin from a ZIP file
When the update is complete, you'll see a confirmationmessage that the update was successful.
This method is typically used for plugins not available in the Plugin Catalog or in environments without internet access.
### Uninstall a plugin
Download the archive containing the plugin assets, and install it by extracting the archive into the plugin directory. For example:
1. In Grafana, click **Administration > Plugins and data > Plugins** in the side navigation menu to view all plugins.
1. Click the plugin's logo.
1. Click the **Installed** filter to show only installed plugins.
1. Click **Uninstall**.
The path to the plugin directory is defined in the configuration file. For more information, refer to [Configuration]({{< relref "../../setup-grafana/configure-grafana/#plugins" >}}).
When the update is complete, you'll see a confirmation message that the uninstall was successful.
#### Install a plugin in air-gapped environment
## Install Grafana plugins
Plugin installation usually requires an internet connection. You can check which endpoints are used during the installation on your instance and add them to your instance’s allowlist.
Grafana supports data source, panel, and app plugins.
If this is not possible you can go via installing a plugin using [Grafana CLI](#install-a-plugin-using-grafana-cli) or as a [ZIP file](#install-a-plugin-from-a-zip-file).
1. In a web browser, navigate to the [Grafana plugin catalog](https://grafana.com/plugins) and find a plugin that you want to install.
1. Click the plugin, and then click the **Installation** tab.
You can fetch any plugin from Grafana.com API following the download link referenced in the API.
Here is an example based on `grafana-lokiexplore-app` plugins.
### Install plugin on Grafana Cloud
1. Open `https://grafana.com/api/plugins/grafana-lokiexplore-app` and look for `links` section
1. Find a `download` url which looks something like `https://grafana.com/api/plugins/grafana-lokiexplore-app/versions/1.0.2/download`
1. Use this URL to download the plugin ZIP file, which you can then install as described above.
On the **Installation tab**, in the **For** field, click the name of the Grafana instance on which you want to install the plugin.
Grafana Cloud handles the plugin installation automatically.
If you're logged in to Grafana Cloud when you add a plugin, log out and then log back in again to use the new plugin.
### Install plugins using the Grafana Helm chart
#### Install plugins using the Grafana Helm chart
With the Grafana Helm chart, add the plugins you want to install as a list using the `plugins` field in the your values file. For more information about the configuration, refer to [the Helm chart configuration reference](https://github.com/grafana/helm-charts/tree/main/charts/grafana#configuration).
@@ -162,21 +154,29 @@ plugins:
- redis-datasource
```
### Install plugin on local Grafana
When the update is complete, a confirmation message will indicate the installation was successful.
Follow the instructions on the **Install** tab. You can either install the plugin with a Grafana CLI command or by downloading and uncompressing a zip file into the Grafana plugins directory. We recommend using Grafana CLI in most instances. The zip option is available if your Grafana server doesn't have access to the internet.
### Update a plugin
For more information about Grafana CLI plugin commands, refer to [Plugin commands]({{< relref "../../cli/#plugins-commands" >}}).
To update a plugin:
#### Install a packaged plugin
1. In Grafana, click **Administration > Plugins and data > Plugins** in the side navigation menu to view all plugins.
1. Click the **Installed** filter to show only installed plugins.
1. Click the plugin's logo.
1. Click **Update**.
After the user has downloaded the archive containing the plugin assets, they can install it by extracting the archive into their plugin directory. For example:
When the update is complete, a confirmation message will indicate the installation was successful.
The path to the plugin directory is defined in the configuration file. For more information, refer to [Configuration]({{< relref "../../setup-grafana/configure-grafana/#plugins" >}}).
To uninstall a plugin:
1. In Grafana, click **Administration > Plugins and data > Plugins** in the side navigation menu to view all plugins.
1. Click the plugin's logo.
1. Click the **Installed** filter to show only installed plugins.
1. Click **Uninstall**.
When the update is complete, a confirmation message will indicate the installation was successful.
If you're developing a plugin, then you can enable development mode to allow all unsigned plugins.
{{% /admonition %}}
## Plugin Frontend Sandbox
{{% admonition type="caution" %}}
Plugin Frontend Sandbox is currently in [public preview](/docs/release-life-cycle/). Grafana Labs offers limited support, and breaking changes might occur prior to the feature being made generally available.
{{% /admonition %}}
The Plugin Frontend Sandbox is a security feature that isolates plugin frontend code from the main Grafana application.
When enabled, plugins run in a separate JavaScript context, which provides several security benefits:
- Prevents plugins from modifying parts of the Grafana interface outside their designated areas
- Stops plugins from interfering with other plugins functionality
- Protects core Grafana features from being altered by plugins
- Prevents plugins from modifying global browser objects and behaviors
Plugins running inside the Frontend Sandbox should continue to work normally without any noticeable changes in their intended functionality.
### Enable Frontend Sandbox
The Frontend Sandbox feature is currently behind the `pluginsFrontendSandbox` feature flag. To enable it, you'll need to:
1. Enable the feature flag in your Grafana configuration. For more information about enabling feature flags, refer to [Configure feature toggles](/setup-grafana/configure-grafana/feature-toggles/).
2. For self-hosted Grafana installations, add the plugin IDs you want to sandbox in the `security` section using the `enable_frontend_sandbox_for_plugins` configuration option.
For Grafana Cloud users, you can simply use the toggle switch in the plugin catalog page to enable or disable the sandbox for each plugin. By default, the sandbox is disabled for all plugins.
{{% admonition type="note" %}}
Enabling the Frontend Sandbox might impact the performance of certain plugins. Only disable the sandbox if you fully trust the plugin and understand the security implications.
{{% /admonition %}}
### Compatibility
The Frontend Sandbox is available in public preview in Grafana >=11.4. It is compatible with all types of plugins including app plugins, panel plugins, and data source plugins. Angular-based plugins are not supported. Plugins developed and signed by Grafana Labs are excluded and cannot be sandboxed.
### When to Use Frontend Sandbox
We strongly recommend enabling the Frontend Sandbox for plugins that allow users to write custom JavaScript code for data visualization or manipulation. These plugins, while powerful, can potentially execute arbitrary JavaScript code in your Grafana instance. The sandbox provides an additional layer of security by restricting what this code can access and modify.
Examples of plugins where the sandbox is particularly important include:
- Panel plugins that allow users to write custom JavaScript code
- Plugins from untrusted sources
### Troubleshooting
If a plugin isn't functioning correctly with the Frontend Sandbox enabled:
1. Temporarily disable the sandbox for that specific plugin
1. Test if the plugin works correctly without the sandbox
1. If the plugin only works with the sandbox disabled, ensure you trust the plugin source before continuing to use it without sandbox protection
1. Report any sandbox-related issues to the plugin developer
@@ -81,13 +81,9 @@ The configuration file can also list data sources to automatically delete, calle
Grafana deletes the data sources listed in `deleteDatasources`_before_ adding or updating those in the `datasources` list.
You can configure Grafana to automatically delete provisioned data sources when they're removed from the provisioning file.
To do so, add `prune: true` to the root of your provisioning file.
To do so, add `prune: true` to the root of your data source provisioning file.
With this configuration, Grafana also removes the provisioned data sources if you remove the provisioning file entirely.
{{< admonition type="note" >}}
The `prune` parameter is available in Grafana v11.1 and higher.
{{< /admonition >}}
### Running multiple Grafana instances
If you run multiple instances of Grafana, add a version number to each data source in the configuration and increase it when you update the configuration.
@@ -231,9 +227,9 @@ Data sources tagged with _HTTP\*_ communicate using the HTTP protocol, which inc
| encrypt | string | MSSQL | Determines SSL encryption handling. Options include: `disable` - data sent between client and server is not encrypted; `false` - data sent between client and server is not encrypted beyond the login packet; `true` - data sent between client and server is encrypted. Default is `false`. |
| postgresVersion | number | PostgreSQL | Postgres version as a number (903/904/905/906/1000) meaning v9.3, v9.4, ..., v10 |
@@ -79,7 +79,7 @@ The following list contains role-based access control actions.
| `dashboards.permissions:write` | <ul><li>`dashboards:*`</li><li>`dashboards:uid:*`</li><li>`folders:*`</li><li>`folders:uid:*`</li></ul> | Update permissions for one or more dashboards. |
| `dashboards:read` | <ul><li>`dashboards:*`</li><li>`dashboards:uid:*`</li><li>`folders:*`</li><li>`folders:uid:*`</li></ul> | Read one or more dashboards. |
| `dashboards:write` | <ul><li>`dashboards:*`</li><li>`dashboards:uid:*`</li><li>`folders:*`</li><li>`folders:uid:*`</li></ul> | Update one or more dashboards. |
| `dashboards.public:write` | <ul><li>`dashboards:*`</li><li>`dashboards:uid:*`</li></ul> | Write public dashboard configuration. |
| `datasources:create` | None | Create data sources. |
@@ -100,6 +100,8 @@ The following list contains role-based access control actions.
| `folders:delete` | <ul><li>`folders:*`</li><li>`folders:uid:*`</li></ul> | Delete one or more folders and their subfolders. |
| `folders:read` | <ul><li>`folders:*`</li><li>`folders:uid:*`</li></ul> | Read one or more folders and their subfolders. |
| `folders:write` | <ul><li>`folders:*`</li><li>`folders:uid:*`</li></ul> | Update one or more folders and their subfolders. |
| `groupsync.mappings:read` | None | List group attribute sync mappings. To use this permission, enable the `groupAttributeSync` feature toggle. |
| `groupsync.mappings:write` | None | List, create, update, and delete group attribute sync mappings. To use this permission, enable the `groupAttributeSync` feature toggle. |
| `ldap.config:reload` | None | Reload the LDAP configuration. |
| `ldap.status:read` | None | Verify the availability of the LDAP server or servers. |
| `ldap.user:read` | None | Read users via LDAP. |
@@ -188,36 +190,38 @@ The following list contains role-based access control actions used by Grafana Ad
| `alert.notifications.receivers:create` | None | Create a new contact points. The creator is automatically granted full access to the created contact point.None |
| `alert.notifications.receivers:create` | None | Create a new contact points. The creator is automatically granted full access to the created contact point. |
| Editor | `basic_editor` | `fixed:datasources:explorer`<br>`fixed:dashboards:creator`<br>`fixed:folders:creator`<br>`fixed:annotations:writer`<br>`fixed:teams:creator` if the `editors_can_admin` configuration flag is enabled<br>`fixed:alerting:writer`<br>`fixed:dashboards.insights:reader`<br>`fixed:datasources.insights:reader`<br>`fixed:library.panels:creator`<br>`fixed:library.panels:general.reader`<br>`fixed:library.panels:general.writer`<br>`fixed:alerting.provisioning.status:writer` | Default [Editor](ref:rbac-basic-roles) assignments. |
| Viewer | `basic_viewer` | `fixed:datasources.id:reader`<br>`fixed:organization:reader`<br>`fixed:annotations:reader`<br>`fixed:annotations.dashboard:writer`<br>`fixed:alerting:reader`<br>`fixed:plugins.app:reader`<br>`fixed:dashboards.insights:reader`<br>`fixed:datasources.insights:reader`<br>`fixed:library.panels:general.reader`<br>`fixed:datasources:explorer` if the `viewers_can_edit` configuration flag is enabled | Default [Viewer](ref:rbac-basic-roles) assignments. |
| No Basic Role | n/a | | Default [No Basic Role](ref:rbac-basic-roles) |
| Editor | `basic_editor` | `fixed:datasources:explorer`<br>`fixed:dashboards:creator`<br>`fixed:folders:creator`<br>`fixed:annotations:writer`<br>`fixed:teams:creator` if the `editors_can_admin` configuration flag is enabled<br>`fixed:alerting:writer`<br>`fixed:dashboards.insights:reader`<br>`fixed:datasources.insights:reader`<br>`fixed:library.panels:creator`<br>`fixed:library.panels:general.reader`<br>`fixed:library.panels:general.writer`<br>`fixed:alerting.provisioning.status:writer`| Default [Editor](ref:rbac-basic-roles) assignments. |
| Viewer | `basic_viewer` | `fixed:datasources.id:reader`<br>`fixed:organization:reader`<br>`fixed:annotations:reader`<br>`fixed:annotations.dashboard:writer`<br>`fixed:alerting:reader`<br>`fixed:plugins.app:reader`<br>`fixed:dashboards.insights:reader`<br>`fixed:datasources.insights:reader`<br>`fixed:library.panels:general.reader`<br>`fixed:datasources:explorer` if the `viewers_can_edit` configuration flag is enabled | Default [Viewer](ref:rbac-basic-roles) assignments. |
| No Basic Role | n/a | | Default [No Basic Role](ref:rbac-basic-roles) |
## Fixed role definitions
@@ -98,7 +98,7 @@ To learn how to use the roles API to determine the role UUIDs, refer to [Manage
| `fixed:dashboards.insights:reader` | `fixed_JlBJ2_gizP8zhgaeGE2rjyZe2Rs` | `dashboards.insights:read` | Read dashboard insights data and see presence indicators. |
| `fixed:dashboards.permissions:writer` | `fixed_CcznxhWX_Yqn8uWMXMQ-b5iFW9k` | All permissions from `fixed:dashboards.permissions:reader` and <br>`dashboards.permissions:write` | Read and update all dashboard permissions. |
| `fixed:dashboards.public:writer` | `fixed_f_GHHRBciaqESXfGz2oCcooqHxs` | `dashboards.public:write` | Create, update, delete or pause a public dashboard. |
| `fixed:dashboards.public:writer` | `fixed_f_GHHRBciaqESXfGz2oCcooqHxs` | `dashboards.public:write` | Create, update, delete or pause a shared dashboard. |
| `fixed:datasources:explorer` | `fixed_qDzW9mzx9yM91T5Bi8dHUM2muTw` | `datasources:explore` | Enable the Explore feature. Data source permissions still apply, you can only query data sources for which you have query permissions. |
| `fixed:datasources:reader` | `fixed_C2x8IxkiBc1KZVjyYH775T9jNMQ` | `datasources:read`<br>`datasources:query` | Read and query data sources. |
@@ -115,6 +115,8 @@ To learn how to use the roles API to determine the role UUIDs, refer to [Manage
| `fixed:folders.permissions:writer` | `fixed_3GAgpQ_hWG8o7-lwNb86_VB37eI` | All permissions from `fixed:folders.permissions:reader` and <br>`folders.permissions:write` | Read and update all folder permissions. |
| `fixed:ldap:reader` | `fixed_lMcOPwSkxKY-qCK8NMJc5k6izLE` | `ldap.user:read`<br>`ldap.status:read` | Read the LDAP configuration and LDAP status information. |
| `fixed:groupsync:reader` | `fixed_tLIbDrE6kw93sKqooF8GVS9BF4E` | `groupsync.mappings:read` | List all group attribute sync mappings. To use this role, enable the `groupAttributeSync` feature toggle. |
| `fixed:groupsync:writer` | `fixed_q7XUYx_efzxxsVmWhQgpiYClwBs` | `groupsync.mappings:read`<br>`groupsync.mappings:write` | Create, read, update, and delete all group attribute sync mappings. To use this role, enable the `groupAttributeSync` feature toggle. |
| `fixed:ldap:writer` | `fixed_p6AvnU4GCQyIh7-hbwI-bk3GYnU` | All permissions from `fixed:ldap:reader` and <br>`ldap.user:sync`<br>`ldap.config:reload` | Read and update the LDAP configuration, and read LDAP status information. |
| `fixed:library.panels:creator` | `fixed_6eX6ItfegCIY5zLmPqTDW8ZV7KY` | `library.panels:create`<br>`folders:read` | Create library panel at the root level. |
| `fixed:library.panels:general.reader` | `fixed_ct0DghiBWR_2BiQm3EvNPDVmpio` | `library.panels:read` | Read all library panels at the root level. |
Available in [Grafana Enterprise](/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) version 7.3 and later, and [Grafana Cloud](/docs/grafana-cloud).
Available in [Grafana Enterprise](/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) and [Grafana Cloud](/docs/grafana-cloud).
{{% /admonition %}}
You can enable auditing in the Grafana configuration file.
@@ -99,7 +99,7 @@ The notification template is assigned to the contact point to determine the noti
{{< figure src="/media/docs/alerting/how-notification-templates-works.png" max-width="1200px" caption="A flow of the alert notification process, from querying the alert rule to sending the alert notification message." >}}
By default, Grafana provides default templates, such as `default.title` and `default.message`, to format notification messages.
By default, Grafana provides default templates, such as `{{define "default.title"}}` and `{{define "default.message"}}`, to format notification messages.
@@ -64,7 +64,7 @@ Notification templates allows you to change the default notification messages.
You can modify the content and format of notification messages. For example, you can customize the content to show only specific information or adjust the format to suit a particular contact point, such as Slack or Email.
{{% admonition type="note" %}}
Avoid adding extra information about alert instances in notification templates, as this information is only be visible in the notification message.
Avoid adding extra information about alert instances in notification templates, as this information is only visible in the notification message.
Instead, you should [use annotations or labels](ref:template-annotations-and-labels) to add information directly to the alert, ensuring it's also visible in the alert state and alert history within Grafana. You can then print the new alert annotation or label in notification templates.
@@ -118,6 +118,7 @@ Grafana supports a wide range of contact points with varied support for images i
## Limitations
- This feature is not supported in Mimir or Loki, or when Grafana is configured to send alerts to other Alertmanagers such as the Prometheus Alertmanager.
- This feature is not supported when using custom templates in email notifications.
- A number of contact points support at most one image per notification. In this case, just the first image is either uploaded to the receiving service or referenced from cloud storage per notification.
- When multiple alerts are sent in a single notification a screenshot might be included for each alert. The order the images are shown is random.
- If uploading screenshots to a cloud storage service such as Amazon S3, Azure Blob Storage or Google Cloud Storage; and accessing screenshots in the bucket requires authentication, logging into a VPN or corporate network; image previews might not work in all instant messaging and communication platforms as some services rewrite URLs to use their CDN.
In contact points, you can select notification templates to customize the notification messages sent.
By default, Grafana provides a template for the notification title (`default.title`) and a template for the notification message (`default.message`). Both default templates display common alert details.
By default, Grafana provides a template for the notification title (`{{define "default.title"}}`) and a template for the notification message (`{{define "default.message"}}`). Both default templates display common alert details.
You can also create custom templates to customize the content and format of notification messages, which can then be applied to one or more contact points.
You can also create custom templates to customize the content and format of notification messages, which can then be applied to one or more contact points. In Grafana, a custom notification template is created within a notification template group.
This documentation provides step-by-step instructions for selecting templates in contact points, previewing templates, and creating custom templates using the Grafana UI.
This documentation provides step-by-step instructions for selecting templates in contact points, previewing templates, and creating notification template groups using the Grafana UI.
## Select a notification template for a contact point
@@ -50,29 +50,28 @@ To add an existing notification template to your contact point, complete the fol
For example, if you are creating an email contact point integration, click **Message** or **Subject**.
1. Click **Edit**.
A dialog box opens where you can select templates.
1. Click **Select existing template**to select a template and [preview](#preview-a-notification-template) it using the default payload.
A dialog box opens where you can select notification templates.
1. Click **Select notification template**or **Enter custom message** to customize a template or message
You can also copy the selected template and use it in the custom tab.
1. Click **Enter custom message** to customize and edit the field directly. Note that the title changes depending on the field you are editing.
1. You can switch between the two tabs to access the list of available templates and copy them across to the customized version.
- You can select an existing notification template and [preview](#preview-a-notification-template) it using the default payload.
- You can also copy the notification template and use it in the **Enter custom message** tab.
1. Click **Save contact point**.
## Create a notification template
## Create a notification template and notification template group
Create notification templates to customize notification messages and reuse them in contact points.
Your notification template name must be unique. You cannot have two templates with the same name in the same notification template or in different notification templates. Avoid defining templates with the same name as default templates, such as: `__subject`, `__text_values_list`, `__text_alert_list`, `default.title` and `default.message`.
In Grafana, custom notification templates (`{{define "<NAME>"}}`) are created within a notification template group, allowing you to test and implement multiple templates together.
Your notification template name (`{{define "<NAME>"}}`) must be unique. You cannot have two templates with the same name in the same notification template group or in different notification template groups. Therefore, avoid using names already defined as default templates, such as: `__subject`, `__text_values_list`, `__text_alert_list`, `default.title` and `default.message`.
To create a notification template in Grafana, complete the following steps.
1. Click **Alerts & IRM** -> **Contact points**.
1. Click the **Notification Templates** tab and then **+ Add notification template**.
1. Click the **Notification Templates** tab and then **+ Add notification template group**.
1. Enter a name for the notification template.
1. Enter a name for the notification template group.
1. Write the content of the template in the content field.
@@ -80,13 +79,13 @@ To create a notification template in Grafana, complete the following steps.
If `{{ define }}` is not included in the content, `{{ define "<NOTIFICATION_TEMPLATE_NAME>" }}` and `{{ end }}` is automatically added to the start and end.
To create a notification template that contains more than one template, complete the following steps.
To create a notification template group that contains more than one notification template, complete the following steps.
1. Click **+ Add notification template**.
1. Click **+ Add notification template group**.
1. Enter a name for the notification template.
1. Enter a name for the notification template group.
1. Write each template in the Content field, including `{{ define "name-of-template" }}` and `{{ end }}` at the start and end of each template.
1. Write each template in the Content field, including `{{ define "<NOTIFICATION_TEMPLATE_NAME>" }}` and `{{ end }}` at the start and end of each template.
1. Save your changes.
@@ -103,7 +102,7 @@ Notification template preview is only for Grafana Alertmanager.
1. Click **+ Add notification template** or edit an existing template.
1. Click **+ Add notification template group** or edit an existing template group.
1. Add or update your template content.
Default data is provided and you can add or edit alert data to it as well as alert instances. You can add alert data directly in the Payload data window itself or click **Select alert instances** or **Add custom alerts**.
In Grafana, queries fetch and transform data from [data sources,](ref:data-sources) which include databases like MySQL or PostgreSQL, time series databases like Prometheus or InfluxDB, and services like Amazon CloudWatch or Azure Monitor.
A query specifies the desired data to retrieve from a data source and applies relevant filters or transformations. Query languages or syntax specific to the chosen data source are utilized for constructing these queries.
A query specifies the data to extract from a data source, with the syntax varying based on the type of data source used.
In Alerting, an alert rule defines of one or more queries and expressions that select the data you want to measure and a [condition](#alert-condition) that needs to be met before an alert rule fires.
@@ -52,7 +52,7 @@ Grafana Alerting has the following permissions.
| `alert.provisioning:write` | n/a | Update all Grafana alert rules, notification policies, etc via provisioning API. Permissions to folders and data source are not required. |
| `alert.provisioning.provenance:write` | n/a | Set provisioning status for alerting resources. Cannot be used alone. Requires user to have permissions to access resources |
Contact point permissions. To enable these permissions, enable the `alertingApiServer` feature toggle.
Contact point permissions. To enable API and user interface that use these permissions, enable the `alertingApiServer` feature toggle.
To help plan your RBAC rollout strategy, refer to [Plan your RBAC rollout strategy](https://grafana.com/docs/grafana/next/administration/roles-and-permissions/access-control/plan-rbac-rollout-strategy/).
| Silences Writer: `fixed:alerting.instances:writer` | All permissions from `fixed:alerting.instances:reader` and<br> `alert.instances:create`<br>`alert.instances:write` for organization scope <br> `alert.instances.external:write` for scope `datasources:*` | Add and update silences in Grafana and external providers. |
| Instances and Silences Reader: `fixed:alerting.instances:reader` | `alert.instances:read` for organization scope <br> `alert.instances.external:read` for scope `datasources:*` | Read alert instances and silences in Grafana and external providers. |
| Notifications Writer: `fixed:alerting.notifications:writer` | All permissions from `fixed:alerting.notifications:reader`and<br>`alert.notifications:write`for organization scope<br>`alert.notifications.external:read` for scope `datasources:*` | Add, update, and delete notification policies and contact points in Grafana and external providers. |
| Notifications Reader: `fixed:alerting.notifications:reader` | `alert.notifications:read` for organization scope<br>`alert.notifications.external:read` for scope `datasources:*` | Read notification policies and contact points in Grafana and external providers. |
| Rules Writer: `fixed:alerting.rules:writer` | All permissions from `fixed:alerting.rules:reader` and <br> `alert.rule:create` <br> `alert.rule:write` <br> `alert.rule:delete` <br> `alert.silences:create` <br> `alert.silences:write` for scope `folders:*` <br> `alert.rules.external:write` for scope `datasources:*` | Create, update, and delete all alert rules and manage rule-specific silences. |
| Rules Reader: `fixed:alerting.rules:reader` | `alert.rule:read`, `alert.silences:read` for scope `folders:*` <br> `alert.rules.external:read` for scope `datasources:*` <br> `alert.notifications.time-intervals:read` <br> `alert.notifications.receivers:list` | Read all alert rules and rule-specific silences in Grafana and external providers. |
| Full access: `fixed:alerting:writer` | All permissions from `fixed:alerting.rules:writer` <br>`fixed:alerting.instances:writer`<br>`fixed:alerting.notifications:writer` | Add, update, and delete alert rules, silences, contact points, and notification policies in Grafana and external providers. |
| Full read-only access: `fixed:alerting:reader` | All permissions from `fixed:alerting.rules:reader` <br>`fixed:alerting.instances:reader`<br>`fixed:alerting.notifications:reader` | Read alert rules, alert instances, silences, contact points, and notification policies in Grafana and external providers. |
| Read via Provisioning API + Export Secrets: `fixed:alerting.provisioning.secrets:reader` | `alert.provisioning:read` and `alert.provisioning.secrets:read` | Read alert rules, alert instances, silences, contact points, and notification policies using the provisioning API and use export with decrypted secrets. |
| Access to alert rules provisioning API: `fixed:alerting.provisioning:writer` | `alert.provisioning:read` and `alert.provisioning:write` | Manage all alert rules, notification policies, contact points, templates, in the organization using the provisioning API. |
| Set provisioning status: `fixed:alerting.provisioning.status:writer` | `alert.provisioning.provenance:write` | Set provisioning rules for Alerting resources. Should be used together with other regular roles (Notifications Writer and/or Rules Writer.) |
| Display name in UI / Fixed role | Permissions | Description |
| Silences Writer: `fixed:alerting.instances:writer` | All permissions from `fixed:alerting.instances:reader` and<br> `alert.instances:create`<br>`alert.instances:write` for organization scope <br> `alert.instances.external:write` for scope `datasources:*` | Add and update silences in Grafana and external providers. |
| Instances and Silences Reader: `fixed:alerting.instances:reader` | `alert.instances:read` for organization scope <br> `alert.instances.external:read` for scope `datasources:*`| Read alert instances and silences in Grafana and external providers. |
| Notifications Writer: `fixed:alerting.notifications:writer` | All permissions from `fixed:alerting.routes:writer`,<br> `fixed:alerting.receivers:creator`,<br> `fixed:alerting.receivers:writer`,<br> `fixed:alerting.templates:writer`,<br> `fixed:alerting.time-intervals:writer`and<br>`alert.notifications:write`for organization scope<br>`alert.notifications.external:read` for scope `datasources:*` | Add, update, and delete notification policies and contact points in Grafana and external providers. |
| Notifications Reader: `fixed:alerting.notifications:reader` | All permissions from `fixed:alerting.routes:reader`,<br> `fixed:alerting.receivers:reader`,<br> `fixed:alerting.templates:reader`,<br> `fixed:alerting.time-intervals:reader`and<br>`alert.notifications:read` for organization scope<br>`alert.notifications.external:read` for scope `datasources:*` | Read notification policies and contact points in Grafana and external providers. |
| Rules Writer: `fixed:alerting.rules:writer` | All permissions from `fixed:alerting.rules:reader` and <br> `alert.rule:create` <br> `alert.rule:write` <br> `alert.rule:delete` <br> `alert.silences:create` <br> `alert.silences:write` for scope `folders:*` <br> `alert.rules.external:write` for scope `datasources:*` | Create, update, and delete all alert rules and manage rule-specific silences. |
| Rules Reader: `fixed:alerting.rules:reader` | `alert.rule:read`, `alert.silences:read` for scope `folders:*` <br> `alert.rules.external:read` for scope `datasources:*` <br> `alert.notifications.time-intervals:read` <br> `alert.notifications.receivers:list` | Read all alert rules and rule-specific silences in Grafana and external providers. |
| Full access: `fixed:alerting:writer` | All permissions from `fixed:alerting.rules:writer` <br>`fixed:alerting.instances:writer`<br>`fixed:alerting.notifications:writer`| Add, update, and delete alert rules, silences, contact points, and notification policies in Grafana and external providers. |
| Full read-only access: `fixed:alerting:reader` | All permissions from `fixed:alerting.rules:reader` <br>`fixed:alerting.instances:reader`<br>`fixed:alerting.notifications:reader`| Read alert rules, alert instances, silences, contact points, and notification policies in Grafana and external providers. |
| Read via Provisioning API + Export Secrets: `fixed:alerting.provisioning.secrets:reader` | `alert.provisioning:read` and `alert.provisioning.secrets:read`| Read alert rules, alert instances, silences, contact points, and notification policies using the provisioning API and use export with decrypted secrets. |
| Access to alert rules provisioning API: `fixed:alerting.provisioning:writer` | `alert.provisioning:read` and `alert.provisioning:write`| Manage all alert rules, notification policies, contact points, templates, in the organization using the provisioning API. |
| Set provisioning status: `fixed:alerting.provisioning.status:writer` | `alert.provisioning.provenance:write`| Set provisioning rules for Alerting resources. Should be used together with other regular roles (Notifications Writer and/or Rules Writer.) |
If you have enabled the `alertingApiServer` feature toggle, an additional set of fixed roles is available.
@@ -68,6 +68,8 @@ If you have enabled the `alertingApiServer` feature toggle, an additional set of
| Templates Writer: `fixed:alerting.templates:writer` | `alert.notifications.templates:read`, `alert.notifications.templates:write`, `alert.notifications.templates:delete` | Create new and manage existing notification templates. |
| Time Intervals Reader: `fixed:alerting.time-intervals:reader` | `alert.notifications.time-intervals:read` | Read all time intervals. |
| Time Intervals Writer: `fixed:alerting.time-intervals:writer` | `alert.notifications.time-intervals:read`, `alert.notifications.time-intervals:write`, `alert.notifications.time-intervals:delete` | Create new and manage existing time intervals. |
| Notification Policies Reader: `fixed:alerting.routes:reader` | `alert.notifications.routes:read` | Read all time intervals. |
| Notification Policies Writer: `fixed:alerting.routes:writer` | `alert.notifications.routes:read``alert.notifications.routes:write` | Create new and manage existing time intervals. |
@@ -165,15 +165,15 @@ To export contact points from the Grafana UI, complete the following steps.
1. Click **Copy Code** or **Download**.
### Export templates
### Export notification template groups
Grafana currently doesn't offer an Export UI or [Export endpoint](#export-api-endpoints) for notification templates, unlike other Alerting resources presented in this documentation.
Grafana currently doesn't offer an Export UI or [Export endpoint](#export-api-endpoints) for notification template groups, unlike other Alerting resources presented in this documentation.
However, you can export it by manually copying the content template and title directly from the Grafana UI.
However, you can export it by manually copying the content and name of the notification template group from the Grafana UI.
1. Find the notification template group you want to export.
1. Copy the content and name.
1. Adjust it for the [file provisioning format](ref:alerting_file_provisioning_template) or [Terraform resource](ref:alerting_tf_provisioning_template).
### Export the notification policy tree
@@ -217,8 +217,8 @@ You can use the [Alerting HTTP API](ref:alerting_http_provisioning) to return ex
However, note the standard endpoints return a JSON format that is not compatible for provisioning through configuration files or Terraform, except the `/export` endpoints listed below.
# Use configuration files to provision alerting resources
@@ -270,8 +270,8 @@ settings:
url: https://discord/webhook
# <string>
avatar_url: https://my_avatar
# <string>
use_discord_username: Grafana
# <bool>
use_discord_username: false
# <string>
message: |
{{ template "default.message" . }}
@@ -616,6 +616,16 @@ settings:
authorization_credentials: abc123
# <string>
maxAlerts: '10'
# <map>
tlsConfig:
# <bool>
insecureSkipVerify: false
# <string>
clientCertificate: certificate in PEM format
# <string>
clientKey: key in PEM format
# <string>
caCertificate: CA certificate in PEM format
```
{{< /collapse >}}
@@ -639,19 +649,19 @@ settings:
{{< /collapse >}}
## Import templates
## Import notification template groups
Create or delete templates using provisioning files in your Grafana instance(s).
Create or delete notification template groups using provisioning files in your Grafana instance(s).
1. Find the notification template in Grafana.
1. [Export](ref:export_templates) a template by copying the template content and title.
1. Find the notification template group in Grafana.
1. [Export](ref:export_templates) a template group by copying the template content and name.
1. Copy the contents into a YAML or JSON configuration file and add it to the `provisioning/alerting` directory of the Grafana instance you want to import the alerting resources to.
Example configuration files can be found below.
1. Restart your Grafana instance (or reload the provisioned files using the Admin API).
Here is an example of a configuration file for creating templates.
Here is an example of a configuration file for creating notification template groups.
```yaml
# config file version
@@ -661,16 +671,16 @@ apiVersion: 1
templates:
# <int> organization ID, default = 1
- orgId: 1
# <string, required> name of the template, must be unique
# <string, required> name of the template group, must be unique
name: my_first_template
# <string, required> content of the template
# <string, required> content of the template group
template: |
{{ define "my_first_template" }}
Custom notification message
{{ end }}
```
Here is an example of a configuration file for deleting templates.
Here is an example of a configuration file for deleting notification template groups.
```yaml
# config file version
@@ -680,7 +690,7 @@ apiVersion: 1
deleteTemplates:
# <int> organization ID, default = 1
- orgId: 1
# <string, required> name of the template, must be unique
# <string, required> name of the template group, must be unique
name: my_first_template
```
@@ -853,8 +863,8 @@ In alerting resources, most properties support template variable interpolation,
- Notification template group name: `templates[].name`
- Notification template group content: `templates[].template`
Note for properties that support interpolation, you may unexpectedly substitute template variables when not intended. To avoid this, you can escape the `$variable` with `$$variable`.
@@ -272,19 +272,19 @@ In this section, we'll create Terraform configurations for each alerting resourc
1. Continue to add more Grafana resources or [use the Terraform CLI for provisioning](#provision-grafana-resources-with-terraform).
### Add and enable templates
### Add and enable notification templates
[Notification templates](ref:notification-template) allow customization of alert notifications across multiple contact points.
1. Create or find the notification template you want to import in Grafana. Alternatively, consider writing the resource in code as demonstrated in the example below.
1. Create or find the notification template group you want to import in Grafana. Alternatively, consider writing the resource in code as demonstrated in the example below.
1. [Export](ref:alerting_export) the template as [`grafana_message_template` Terraform resource](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/message_template).
1. [Export](ref:alerting_export) the notification template group as [`grafana_message_template` Terraform resource](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/message_template).
This example is a simple demo template defined as`custom_email.message`.
This example creates a notification template group named `custom_emails` that defines a `custom_email.message` template.
@@ -118,7 +118,7 @@ Ensure you have a public dashboard footer logo or footer text set if you don't w
#### Learn more
[Configure custom branding documentation](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/setup-grafana/configure-grafana/configure-custom-branding/#custom-branding-for-public-dashboards) for public dashboards
[Configure custom branding documentation](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/setup-grafana/configure-grafana/configure-custom-branding/#custom-branding-for-shared-dashboards) for public dashboards
### Subfolders cause very rare issues with folders that have forward slashes in their names
@@ -188,7 +188,7 @@ Following are some query options specific to the built-in annotation query.
You can create new queries to fetch annotations from the built-in annotation query using the `-- Grafana --` data source by setting _Filter by_ to `Tags`.
Grafana v8.1 and later versions also support typeahead of existing tags, provide at least one tag.
Grafana also supports typeahead of existing tags, provide at least one tag.
For example, create an annotation query name `outages` and specify a tag `outage`. This query will show all annotations (from any dashboard or via API) with the `outage` tag. If multiple tags are defined in an annotation query, then Grafana will only show annotations matching all the tags. To modify the behavior, enable `Match any`, and Grafana will show annotations that contain any one of the tags you provided.
@@ -37,15 +37,20 @@ You can control permissions for library panels using [role-based access control
## Create a library panel
When you create a library panel, the panel on the source dashboard is converted to a library panel as well. You need to save the original dashboard once a panel is converted.
Library panels can be reused in different dashboards throughout Grafana. When you create a library panel, the panel on the source dashboard is converted to a library panel as well. You need to save the original dashboard once a panel is converted.
1. Click **Edit** in the top-right corner of the dashboard.
1. On the panel you want to update, hover over any part of the panel to display the menu icon on the top-right corner.
1. Click the menu icon and select **More > Create library panel**.
1. In **Library panel name**, enter the name.
1. In **Save in folder**, select the folder to save the library panel.
1. Click **Create library panel**.
1. Click**Save dashboard** and **Exit edit**.
To create a library panel, follow these steps:
1. In the top-right corner of the dashboard, click **Edit**.
1. Hover over any part of the panel you want to share to display the actions menu on the top right corner.
1. Click **More > New library panel**.
1. In the **Library panel name** field, enter the name.
1. In the**Save in folder** drop-down list, select the folder in which to save the library panel. By default, the root level is selected.
1. Click **Create library panel** to save your changes.
1. Click **Save dashboard**.
1. (Optional) Enter a description of the changes you've made.
1. Click **Save**.
1. Click **Exit edit**.
Once created, you can modify the library panel using any dashboard on which it appears. After you save the changes, all instances of the library panel reflect these modifications.
@@ -53,11 +58,13 @@ Once created, you can modify the library panel using any dashboard on which it a
Add a Grafana library panel to a dashboard when you want to provide visualizations to other dashboard users.
To add a library panel, follow these steps:
1. Click **Dashboards** in the main menu.
1. Click **New** and select **New Dashboard** in the dropdown.
1. Click **New** and select **New Dashboard** in the drop-down list.
1. On the empty dashboard, click **+ Add library panel**.
You'll see a list of your library panels.
The **Add panel from panel library** drawer opens.
1. Filter the list or search to find the panel you want to add.
1. Click a panel to add it to the dashboard.
@@ -69,6 +76,8 @@ Add a Grafana library panel to a dashboard when you want to provide visualizatio
Unlink a library panel when you want to make a change to the panel and not affect other instances of the library panel.
To unlink a library panel, follow these steps:
1. Click **Dashboards** in the main menu.
1. Click **Library panels**.
1. Select a library panel that is being used in dashboards.
@@ -107,8 +116,9 @@ Alternatively, if you know where the library panel that you want to replace is b
You can view a list of available library panels and see where those panels are being used.
1. Click **Dashboards** in the main menu.
1. Click **Library panels**.
To view and manage library panels, follow these steps:
1. Click **Dashboards > Library panels** in the main menu.
You can see a list of previously defined library panels.
{{< figure src="/media/docs/grafana/panels-visualizations/screenshot-library-panel-list-9-5.png" class="docs-image--no-shadow" max-width= "900px" alt="Library panels page with list of library panels" >}}
@@ -123,8 +133,8 @@ You can view a list of available library panels and see where those panels are b
## Delete a library panel
Delete a library panel when you no longer need it.
To delete a library panel that you no longer need, follow these steps:
1. Click **Dashboards** in the main menu.
1. Click **Library panels**.
1. Click **Dashboards > Library panels** in the main menu.
1. Click the delete icon next to the library panel name.
@@ -24,7 +24,7 @@ A _playlist_ is a list of dashboards that are displayed in a sequence. You might
Grafana automatically scales dashboards to any resolution, which makes them perfect for big screens.
You can access the Playlist feature from Grafana's side menu, in the Dashboards submenu.
You can access the **Playlist** feature from Grafana's side menu, in the Dashboards submenu.
{{< admonition type="note" >}}
You must have at least Editor role permissions to create and manage playlists.
@@ -41,12 +41,12 @@ Use the information in this section to access playlists. Start and control the d
### Start a playlist
You can start a playlist in six different view modes. View modes determine how the menus and navigation bar appear on the dashboards as well as how panels are sized.
You can start a playlist in four different view modes. View modes determine how the menus and navigation bar appear on the dashboards as well as how panels are sized.
1. Click **Dashboards** in the main menu.
1. Click **Playlists**.
1. Find the desired playlist and click **Start playlist**.
1. In the dialog box that opens, select one of the [six playlist modes](#playlist-modes) available.
1. In the dialog box that opens, select one of the [four playlist modes](#playlist-modes) available.
1. Disable any dashboard controls that you don't want displayed while the list plays; these controls are enabled and visible by default. Select from:
- **Time and refresh**
@@ -55,31 +55,28 @@ You can start a playlist in six different view modes. View modes determine how t
1. Click **Start \<playlist name\>**.
The playlist displays each dashboard for the time specified in the **Interval** field, set when creating or editing a playlist. After a playlist starts, you can [control](#control-a-playlist) it using the navbar at the top of your screen.
The playlist displays each dashboard for the time specified in the **Interval** field, set when creating or editing a playlist. After a playlist starts, you can [start or stop it](#control-a-playlist) it using the controls at the top of your screen.
| Normal mode | <ul><li>The side menu remains visible.</li></ul><ul><li>The navbar and dashboard controls appear at the top of the screen.</li></ul> |
| Normal mode (with auto fit panels) | <ul><li>The side menu remains visible.</li></ul><ul><li>The navbar and dashboard controls appear at the top of the screen.</li></ul><ul><li>Dashboard panels automatically adjust to optimize space on screen.</li></ul> |
| TV mode | <ul><li>The side menu is hidden or removed.</li></ul><ul><li>The navbar and dashboard controls appear at the top of the screen.</li></ul><ul><li>Enabled automatically after one minute of user inactivity.</li></ul><ul><li>Enable it manually using the `d v` sequence shortcut, or by appending the parameter `?inactive` to the dashboard URL.</li></ul><ul><li>Disable it with any mouse movement or keyboard action.</li></ul> |
| TV mode (with auto fit panels) | <ul><li>The side menu is hidden or removed.</li></ul><ul><li>The navbar and dashboard controls appear at the top of the screen.</li></ul><ul><li>Dashboard panels automatically adjust to optimize space on screen.</li></ul><ul> |
| Kiosk mode | <ul><li>The side menu is hidden or removed.</li></ul><ul><li>The navbar and dashboard controls appear at the top of the screen.</li></ul><ul><li>You can disable or enable it manually using the `d v` sequence shortcut after the playlist has started.</li></ul> |
| Kiosk mode (with auto fit panels) | <ul><li>The side menu is hidden or removed.</li></ul><ul><li>The navbar and dashboard controls appear at the top of the screen.</li></ul><ul><li>You can disable or enable it manually using the `d v` sequence shortcut after the playlist has started.</li></ul><ul><li>Dashboard panels automatically adjust to optimize space on screen.</li></ul> |
| Normal mode | <ul><li>The main menu and navbar remain visible.</li><li>Dashboard controls are hidden.</li><li>Playlist controls are displayed at the top of the screen.<li><ul> |
| Normal mode (with auto fit panels) | <ul><li>The main menu and navbar remain visible.</li><li>Dashboard controls are hidden.</li><li>Playlist controls are displayed at the top of the screen.</li><li>Dashboard panels automatically adjust to optimize space on screen.</li></ul> |
| Kiosk mode | <ul><li>The main menu, navbar, and dashboard controls are hidden.</li><li>You can disable the playlist manually by pressing the `Esc` key after the playlist has started. Doing so causes the playlist controls to be displayed at the top of the screen briefly.</li></ul> |
| Kiosk mode (with auto fit panels) | <ul><<li>The main menu, navbar, and dashboard controls are hidden.</li><li>You can disable the playlist manually by pressing the `Esc` key after the playlist has started. Doing so causes the playlist controls to be displayed at the top of the screen briefly.</li><li>Dashboard panels automatically adjust to optimize space on screen.</li></ul> |
You can control a playlist in **Normal** or **TV** mode after it's started, using the navigation bar at the top of your screen. Press the Esc key in your keyboard to stop the playlist.
| Next (double-right arrow) | Advances to the next dashboard. |
| Back (left arrow) | Returns to the previous dashboard. |
| Stop (square) | Ends the playlist, and exits to the current dashboard. |
| Cycle view mode (monitor icon) | Rotates the display of the dashboards in different view modes. |
| Time range | Displays data within a time range. It can be set to display the last 5 minutes up to 5 years ago, or a custom time range, using the down arrow. |
| Refresh (circle arrow) | Reloads the dashboard, to display the current data. It can be set to reload automatically every 5 seconds to 1 day, using the drop-down arrow. |
### Playlist controls
You can control a playlist in **Normal** mode after it's started, using the buttons at the top of your screen. Press the `Esc` key to stop the playlist.
- **Next (double-right arrow)** - Advances to the next dashboard.
- **Back (doublt-left arrow)** - Returns to the previous dashboard.
- **Stop playlist** - Ends the playlist, and exits to the current dashboard.
@@ -149,13 +149,13 @@ Only organization administrators can create reports by default. You can customiz
### Save as draft
> **Note:** Available in [Grafana Enterprise](ref:grafana-enterprise) version 9.1.0 and later and [Grafana Cloud](/docs/grafana-cloud/).
> **Note:** Available in [Grafana Enterprise](ref:grafana-enterprise) and [Grafana Cloud](/docs/grafana-cloud/).
You can save a report as a draft at any point during the report creation or update process. You can save a report as a draft even if it's missing required fields. Also, the report won't be sent according to its schedule while it's a draft.
### Choose template variables
> **Note:** Available in [Grafana Enterprise](ref:grafana-enterprise) version 7.5 and later behind the `reportVariables` feature flag, Grafana Enterprise version 8.0 and later without a feature flag, and [Grafana Cloud](/docs/grafana-cloud/).
> **Note:** Available in [Grafana Enterprise](ref:grafana-enterprise) and [Grafana Cloud](/docs/grafana-cloud/).
You can configure report-specific template variables for the dashboard on the report page. The variables that you select will override the variables from the dashboard, and they are used when rendering a PDF file of the report. For detailed information about using template variables, refer to the [Templates and variables](ref:templates-and-variables) section.
@@ -165,7 +165,7 @@ The query variables saved with a report might become of date if the results of t
### Render a report with panels or rows set to repeat by a variable
> **Note:** Available in [Grafana Enterprise](ref:grafana-enterprise) version 8.0 and later, and [Grafana Cloud](/docs/grafana-cloud/).
> **Note:** Available in [Grafana Enterprise](ref:grafana-enterprise) and [Grafana Cloud](/docs/grafana-cloud/).
You can include dynamic dashboards with panels or rows, set to repeat by a variable, into reports. For detailed information about setting up repeating panels or rows in dashboards, refer to [Repeat panels or rows](ref:repeat-panels-or-rows).
@@ -233,8 +233,7 @@ This feature relies on the same plugin that supports the [image rendering](ref:i
### Scheduling
> **Note:** Available in [Grafana Enterprise](ref:grafana-enterprise) version 8.0 and later, and [Grafana Cloud](/docs/grafana-cloud/).
> The scheduler was significantly changed in Grafana Enterprise version 8.1.
> **Note:** Available in [Grafana Enterprise](ref:grafana-enterprise) and [Grafana Cloud](/docs/grafana-cloud/).
Scheduled reports can be sent once, or repeated on an hourly, daily, weekly, or monthly basis, or sent at custom intervals. You can also disable scheduling by selecting **Never**, for example to send the report via the API.
@@ -254,7 +253,7 @@ When you schedule a report with a monthly frequency, and set the start date betw
#### Send a test email
> **Note:** Available in [Grafana Enterprise](ref:grafana-enterprise) version 7.0 and later, and [Grafana Cloud](/docs/grafana-cloud/).
> **Note:** Available in [Grafana Enterprise](ref:grafana-enterprise) and [Grafana Cloud](/docs/grafana-cloud/).
1. In the report, click **Send test email**.
1. In the **Email** field, enter the email address or addresses that you want to test, separated by a semicolon.
@@ -265,19 +264,19 @@ The last saved version of the report will be sent to selected emails. You can us
### Pause a report
> **Note:** Available in [Grafana Enterprise](ref:grafana-enterprise) version 8.0 and later, and [Grafana Cloud](/docs/grafana-cloud/).
> **Note:** Available in [Grafana Enterprise](ref:grafana-enterprise) and [Grafana Cloud](/docs/grafana-cloud/).
You can pause sending reports from the report list view by clicking the pause icon. The report will not be sent according to its schedule until it is resumed by clicking the resume button on the report row.
### Add multiple dashboards to a report
> **Note:** Available in [Grafana Enterprise](ref:grafana-enterprise) version 9.0 and later, and [Grafana Cloud](/docs/grafana-cloud/).
> **Note:** Available in [Grafana Enterprise](ref:grafana-enterprise) and [Grafana Cloud](/docs/grafana-cloud/).
You can add more than one dashboard to a report. Additional dashboards will be rendered as new pages in the same PDF file, or additional images if you chose to embed images in your report email. You cannot add the same dashboard to a report multiple times.
### Embed a dashboard as an image into a report
> **Note:** Available in [Grafana Enterprise](ref:grafana-enterprise) version 9.0 and later, and [Grafana Cloud](/docs/grafana-cloud/).
> **Note:** Available in [Grafana Enterprise](ref:grafana-enterprise) and [Grafana Cloud](/docs/grafana-cloud/).
You can send a report email with an image of the dashboard embedded in the email instead of attached as a PDF. In this case, the email recipients can see the dashboard at a glance instead of having to open the PDF.
@@ -285,7 +284,7 @@ You can send a report email with an image of the dashboard embedded in the email
You can generate and save PDF files of any dashboard.
> **Note:** Available in [Grafana Enterprise](ref:grafana-enterprise) version 6.7 and later, and [Grafana Cloud](/docs/grafana-cloud/).
> **Note:** Available in [Grafana Enterprise](ref:grafana-enterprise) and [Grafana Cloud](/docs/grafana-cloud/).
1. In the dashboard that you want to export as PDF, click the **Share** button.
1. On the PDF tab, select a layout option for the exported dashboard: **Portrait** or **Landscape**.
# Name of the TrueType font file with italic style
font_italic = DejaVuSansCondensed-Oblique.ttf
# Allowed domains to receive reports. Use * to allow all domains. Use a comma-separated list to allow multiple domains. Example: allowed_domains = grafana.com, example.org
allowed_domains = *
```
## Report settings
> **Note:** Available in [Grafana Enterprise](ref:grafana-enterprise) version 7.2 and later, and [Grafana Cloud](/docs/grafana-cloud/).
> **Note:** Available in [Grafana Enterprise](ref:grafana-enterprise) and [Grafana Cloud](/docs/grafana-cloud/).
You can configure organization-wide report settings in the **Settings** under **Dashboards > Reporting**. Settings are applied to all the reports for current organization.
You can customize the branding options.
Report branding:
### Attachment settings
#### PDF
- **Company logo:** Company logo displayed in the report PDF. It can be configured by specifying a URL, or by uploading a file. The maximum file size is 16 MB. Defaults to the Grafana logo.
Email branding:
- **Theme:** Theme of the PDF attached to the report. Defaults to **Light**. The selected theme is also applied to the PDFs generated when you click **Preview PDF** during report creation or select the **Export as PDF** option on a dashboard. If **Current** is selected, the PDF in the report will be in the Admin's instance theme, but the preview and exported PDFs will be in the user's instance theme.
#### Embedded Image
- **Theme:** Theme of the dashboard image embedded in the email. Defaults to **Dark**.
### Email branding
- **Company logo:** Company logo displayed in the report email. It can be configured by specifying a URL, or by uploading a file. The maximum file size is 16 MB. Defaults to the Grafana logo.
- **Email footer:** Toggle to enable the report email footer. Select **Sent by** or **None**.
> **Warning:** Making your dashboard public could result in a large number of queries to the data sources used by your dashboard.
> This can be mitigated by utilizing the enterprise [caching](ref:caching) and/or rate limiting features.
Public dashboards allow you to share your Grafana dashboard with anyone. This is useful when you want to make your dashboard available to the world without requiring access to your Grafana organization. This differs from [dashboard sharing](ref:dashboard-sharing), which either requires recipients to be users in the same Grafana organization or provides limited information, as with a snapshot.
You can see a list of all your public dashboards in one place by navigating to **Dashboards > Public dashboards**. For each dashboard in the list, the page displays the status, a link to view the dashboard, a link to the public dashboard configuration, and the option to revoke the public URL.
## Security implications of making your dashboard public
- Anyone with the URL can access the dashboard.
- Public dashboards are read-only.
- Arbitrary queries **cannot** be run against your data sources through public dashboards. Public dashboards can only execute the
queries stored on the original dashboard.
## Make a dashboard public
1. Click **Share** in the top-right corner of the dashboard.
1. Click the **Public dashboard** tab.
1. Acknowledge the implications of making the dashboard public by selecting all the checkboxes.
1. Click **Generate public URL** to make the dashboard public and make your link live.
1. Copy the public dashboard link if you'd like to share it. You can always come back later for it.
Once you've made the dashboard public, a **Public** tag is displayed in the header of the dashboard.
## Pause access
1. Click **Share** in the top-right corner of the dashboard.
1. Click the **Public dashboard** tab.
1. Enable the **Pause sharing dashboard** toggle.
The dashboard is no longer accessible, even with the link, until you make it shareable again.
## Revoke access
1. Click **Share** in the top-right corner of the dashboard.
1. Click the **Public dashboard** tab.
1. Click **Revoke public URL** to delete the public dashboard.
The link no longer works. You must create a new public URL, as in [Make a dashboard public](#make-a-dashboard-public).
## Email sharing
{{% admonition type="note" %}}
Available in [private preview](/docs/release-life-cycle/) in [Grafana Cloud](/docs/grafana-cloud). This feature will have a cost by active users after being promoted into general availability.
Please contact support to have the feature enabled.
{{% /admonition %}}
Email sharing allows you to share your public dashboard with only specific people by email, instead of having it accessible to anyone with the URL. When you use email sharing, recipients receive a one-time use link that's valid for **one hour**. Once the link is used, the viewer has access to the public dashboard for **30 days**.
### Invite a viewer
1. Click **Share** in the top-right corner of the dashboard.
1. Click the **Public dashboard** tab.
1. Acknowledge the implications of making the dashboard public by selecting all the checkboxes.
1. Click **Generate public URL** to make the dashboard public and make your link live.
1. Under Can view dashboard, click **Only specified people**.
1. Enter the email you want to share the public dashboard with.
1. Click **Invite**.
1. The recipient will receive an email with a one-time use link.
### Viewers requesting access
If a viewer without access tries to navigate to the public dashboard, they'll be asked to request access by providing their email. They will receive an email with a new one-time use link if the email they provided has already been invited to view the public dashboard and has not been revoked.
If the viewer doesn't have an invitation or it's been revoked, you won't be notified and no link is sent.
### Revoke access for a viewer
1. Click **Share** in the top-right corner of the dashboard.
1. Click the **Public dashboard** tab.
1. Click **Revoke** on the viewer you'd like to revoke access for.
Immediately, the viewer no longer has access to the public dashboard, nor can they use any existing one-time use links they may have.
### Reinvite a viewer
1. Click **Share** in the top-right corner of the dashboard.
1. Click the **Public dashboard** tab.
1. Click **Resend** on the viewer you'd like to re-share the public dashboard with.
The viewer will receive an email with a new one-time use link. This will invalidate all previously issued links for that viewer.
### View public dashboard users
To see a list of users who have accessed your dashboard by way of email sharing, take the following steps:
1. In the main sidebar navigation, click **Administration**.
1. Click **Users**.
1. Click the **Public dashboard users** tab.
From here, you can see the earliest time a user has been active in a dashboard, which public dashboards they have access to, and their role.
### Access limitations
One-time use links use browser cookies, so when a viewer is granted access through one of these links, they will only have access on the browser they used to claim the link.
A single viewer cannot generate multiple valid one-time use links. When a new one-time use link is issued for a viewer, all previous ones are invalidated.
If a Grafana user has read access to the parent dashboard, they can view the public dashboard without needing to have access granted.
## Assess public dashboard usage
> **Note:** Available in [Grafana Enterprise](ref:grafana-enterprise) and [Grafana Cloud](/docs/grafana-cloud).
You can check usage analytics about your public dashboard by clicking the insights icon in the dashboard header:
Learn more about the kind of information provided in the [dashboard insights documentation](ref:dashboard-insights-documentation).
## Supported data sources
Public dashboards _should_ work with any data source that has the properties `backend` and `alerting` both set to true in its `plugin.json`. However, this can't always be
guaranteed because plugin developers can override this functionality. The following lists include data sources confirmed to work with public dashboards and data sources that should work, but have not been confirmed as compatible.
### Confirmed:
<table>
<tr>
<td>
<ul>
<li>ClickHouse</li>
<li>CloudWatch</li>
<li>Elasticsearch</li>
<li>Infinity</li>
<li>InfluxDB</li>
<li>Loki</li>
<li>Microsoft SQL Server</li>
</ul>
</td>
<td>
<ul>
<li>MongoDB</li>
<li>MySQL</li>
<li>Oracle Database</li>
<li>PostgreSQL</li>
<li>Prometheus</li>
<li>Redis</li>
<li>SQLite</li>
</ul>
</td>
</tr>
</table>
### Unsupported:
<table>
<tr>
<td>
<ul>
<li>Graphite</li>
</ul>
</td>
</tr>
</table>
### Unconfirmed:
<table>
<tr>
<td>
<ul>
<li>Altinity plugin for ClickHouse</li>
<li>Amazon Athena</li>
<li>Amazon Redshift</li>
<li>Amazon Timestream</li>
<li>Apache Cassandra</li>
<li>AppDynamics</li>
<li>Azure Data Explorer Datasource</li>
<li>Azure Monitor</li>
<li>CSV</li>
<li>DB2 Datasource</li>
<li>Databricks</li>
<li>Datadog</li>
<li>Dataset</li>
<li>Druid</li>
</ul>
</td>
<td>
<ul>
<li>Dynatrace</li>
<li>GitHub</li>
<li>Google BigQuery</li>
<li>Grafana for YNAB</li>
<li>Honeycomb</li>
<li>Jira</li>
<li>Mock</li>
<li>Neo4j Datasource</li>
<li>New Relic</li>
<li>OPC UA (Unified Architecture)</li>
<li>Open Distro for Elasticsearch</li>
<li>OpenSearch</li>
<li>OpenTSDB</li>
</ul>
</td>
<td>
<ul>
<li>Orbit</li>
<li>SAP HANA®</li>
<li>Salesforce</li>
<li>Sentry</li>
<li>ServiceNow</li>
<li>Snowflake</li>
<li>Splunk</li>
<li>Splunk Infrastructure Monitoring</li>
<li>Sqlyze data source</li>
<li>TDengine</li>
<li>Vertica</li>
<li>Wavefront</li>
<li>X-Ray</li>
<li>kdb+</li>
<li>simple grpc data source</li>
</ul>
</td>
</tr>
</table>
## Limitations
- Panels that use frontend data sources will fail to fetch data.
- Template variables are not supported.
- Exemplars will be omitted from the panel.
- Only annotations that query the `-- Grafana --` data source are supported.
- Organization annotations are not supported.
- Grafana Live and real-time event streams are not supported.
- Library panels are not supported.
- Data sources using Reverse Proxy functionality are not supported.
## Custom branding
If you're a Grafana Enterprise customer, you can use custom branding to change the appearance of a public dashboard footer. For more information, refer to [Custom branding](ref:custom-branding).
Grafana enables you to share dashboards and panels with other users within your organization and in certain situations, publicly on the web. You can share using:
- Direct links with users in and outside of your organization
- Snapshots
- Embeds
- PDFs
- JSON files
- Reports
- Library panels
You must have an authorized viewer permission to see an image rendered by a direct link.
The same permission is also required to view embedded links unless you have anonymous access permission enabled for your Grafana instance.
{{< admonition type="note" >}}
Anonymous access permission is not available in Grafana Cloud.
{{< /admonition >}}
## Share dashboards {#share-a-dashboard}
You can share dashboards in the following ways:
- [Internally with a link](#share-an-internal-link)
- [Externally with anyone or specific people](#share-an-external-link)
- [As a report](#schedule-a-report)
- [As a snapshot](#share-a-snapshot)
- [As a PDF export](#export-a-dashboard-as-pdf)
- [As a JSON file export](#export-a-dashboard-as-json)
When you share a dashboard externally as a link or by email, those dashboards are included in a list of your shared dashboards. To view the list and manage these dashboards, navigate to **Dashboards > Shared dashboards**.
{{< admonition type="note" >}}
If you change a dashboard, ensure that you save the changes before sharing.
{{< /admonition >}}
### Share an internal link
To share a customized, direct link to your dashboard within your organization, follow these steps:
1. Click **Dashboards** in the main menu.
1. Click the dashboard you want to share.
1. Click the **Share** drop-down list in the top-right corner and select **Share internally**.
1. (Optional) In the **Share internally** drawer that opens, set the following options:
- **Lock time range** - Change the current relative time range to an absolute time range. This option is enabled by default.
- **Shorten link** - Shorten the dashboard link. This option is enabled by default.
1. Select the theme for the dashboard. Choose from **Current**, **Dark**, or **Light**.
1. Click **Copy link**.
1. Send the copied link to a Grafana user with authorization to view the link.
1. Click the **X** at the top-right corner to close the share drawer.
#### Quick-share an internal link
Once you've customized an internal link, you can share it quickly by following these steps:
1. Click **Dashboards** in the main menu.
1. Click the dashboard you want to share.
1. Click the **Share** button, not the drop-down list icon, to copy a shortened link.
This link has any customizations, like time range locking or theme, that you've previously set. These are stored in the browser scope.
### Share an external link
Externally shared dashboards allow you to share your Grafana dashboard with anyone. This is useful when you want to make your dashboard available to the world without requiring access to your Grafana organization.
Learn how to configure and manage externally shared dashboards in [Externally shared dashboards](ref:shared-dashboards).
### Schedule a report
{{< admonition type="note" >}}
This feature is only available in Grafana Enterprise.
{{< /admonition >}}
To share your dashboard as a report, follow these steps:
1. Click **Dashboards** in the main menu.
1. Click the dashboard you want to share.
1. Click the **Share** drop-down list in the top-right corner and select **Schedule a report**.
1. [Configure the report](ref:configure-report).
1. Depending on your schedule settings, you'll have different options at this step. Click either **Schedule send** or **Send now**.
You can also save the report as a draft.
To manage your reports, navigate to **Dashboards > Reporting > Reports**.
### Share a snapshot
A dashboard snapshot publicly shares a dashboard while removing sensitive data such as queries and panel links, leaving only visible metrics and series names. Anyone with the link can access the snapshot.
You can publish snapshots to your local instance or to [snapshots.raintank.io](http://snapshots.raintank.io). The latter is a free service provided by Grafana Labs that enables you to publish dashboard snapshots to an external Grafana instance. Anyone with the link can view it. You can set an expiration time if you want the snapshot removed after a certain time period.
{{< admonition type=note >}}
The snapshots.raintank.io option is disabled by default in Grafana Cloud. You can update [your config file](https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#external_enabled) to enable this functionality.
{{< /admonition >}}
To see the other snapshots shared from your organization, navigate to **Dashboards > Snapshots** in the main menu.
To share your dashboard with anyone as a snapshot, follow these steps:
1. Click **Dashboards** in the main menu.
1. Click the dashboard you want to share.
1. Click the **Share** drop-down list in the top-right corner and select **Share snapshot**.
1. In the **Share snapshot** drawer that opens, enter a descriptive title for the snapshot in the **Snapshot name** field.
1. Select one of the following expiration options for the snapshot:
- **1 Hour**
- **1 Day**
- **1 Week**
- **Never**
1. Click **Publish snapshot** or **Publish to snapshots.raintank.io**.
Grafana generates the link of the snapshot. Note that you can't publish dashboard snapshots containing custom panels to snapshot.raintank.io.
1. Click **Copy link**, and share it either within your organization or publicly on the web.
1. Click the **X** at the top-right corner to close the share drawer.
#### Delete a snapshot
To delete existing snapshots, follow these steps:
1. Navigate to **Dashboards > Snapshots** in the main menu.
1. To confirm which snapshot you're about to delete, click **View** on the snapshot row.
The URLs for panel and dashboard snapshots from the same dashboard look similar and viewing them first can help you distinguish them.
1. Click the red **x** next to the snapshot that you want to delete.
The snapshot is immediately deleted. You might need to clear your browser cache or use a private or incognito browser to confirm this.
## Export dashboards
In addition to sharing dashboards as links, reports, and snapshots, you can export them as PDFs or JSON files.
### Export a dashboard as PDF
To export a dashboard in its current state as a PDF, follow these steps:
1. Click **Dashboards** in the main menu.
1. Open the dashboard you want to export.
1. Click the **Export** drop-down in the top-right corner and select **Export as PDF**.
1. In the **Export dashboard PDF** drawer that opens, select either **Landscape** or **Portrait** for the PDF orientation.
1. Select either **Grid** or **Simple** for the PDF layout.
1. Set the **Zoom** level; zoom in to enlarge text, or zoom out to see more data (like table columns) per panel.
1. Click **Generate PDF**.
The PDF opens in another tab where you can download it.
1. Click the **X** at the top-right corner to close the share drawer.
### Export a dashboard as JSON
Export a Grafana JSON file that contains everything you need, including layout, variables, styles, data sources, queries, and so on, so that you can later import the dashboard. To export a JSON file, follow these steps:
1. Click **Dashboards** in the main menu.
1. Open the dashboard you want to export.
1. Click the **Export** drop-down list in the top-right corner and select **Export as JSON**.
The **Export dashboard JSON** drawer opens.
1. Toggle the **Export the dashboard to use in another instance** switch to generate the JSON with a different data source UID.
1. Click **Download file** or **Copy to clipboard**.
1. Click the **X** at the top-right corner to close the share drawer.
## Share panels {#share-a-panel}
You can share a panels in the following ways:
- [Internally with a link](#share-an-internal-link)
- [As an embed](#share-an-embed)
- [As a snapshot](#panel-snapshot)
{{< admonition type="note" >}}
If you change a panel, ensure that you save the changes before sharing.
{{< /admonition >}}
### Share an internal link
To share a personalized, direct link to your panel within your organization, follow these steps:
1. Hover over any part of the panel you want to share to display the actions menu on the top right corner.
1. Click the menu and select **Share link**.
1. (Optional) In the **Link settings** drawer that opens, set the following options:
- **Lock time range** - Change the current relative time range to an absolute time range. This option is enabled by default.
- **Shorten link** - Shorten the panel link. This option is disabled by default.
1. Select the theme for the dashboard. Choose from **Current**, **Dark**, or **Light**.
1. Do one or both of the following:
- Click **Copy link**.
- Click **Render image**, which [renders the panel as a PNG image](ref:image-rendering).
1. Send the copied link or image URL to a Grafana user with authorization to view it.
1. Click the **X** at the top-right corner to close the share drawer.
#### Query string parameters for server-side rendered images
When you click **Render image** in the panel link settings, Grafana generates a PNG image of the panel with the following default parameters:
You can share a panel by embedding it on another website using an iframe. Users must be signed into Grafana to view the panel.
{{< admonition type="note" >}}
Anonymous access permission is no longer available for Grafana Cloud.
{{< /admonition >}}
To create a panel that can be embedded, follow these steps:
1. Hover over any part of the panel you want to share to display the actions menu on the top-right corner.
1. Click the menu and select **Share embed**.
The **Share embed** drawer opens.
1. (Optional) Toggle the **Lock time range** switch to set whether the panel uses the current relative time range or an absolute time range. This option is enabled by default.
1. Select the theme for the dashboard. Choose from **Current**, **Dark**, or **Light**.
1. (Optional) Make any changes to the HTML that you need.
1. Click **Copy to clipboard**.
1. Paste the HTML code into your website code.
1. Click the **X** at the top-right corner to close the share drawer.
Here's an example of what the HTML code might look like:
The result is an interactive Grafana visualization embedded in an iframe.
### Share a snapshot {#panel-snapshot}
A panel snapshot shares an interactive panel publicly while removing sensitive data such as queries and panel links, leaving only visible metrics and series names. Anyone with the link can access the snapshot.
You can publish snapshots to your local instance or to [snapshots.raintank.io](http://snapshots.raintank.io). The latter is a free service provided by Grafana Labs that enables you to publish dashboard snapshots to an external Grafana instance. Anyone with the link can view it. You can set an expiration time if you want the snapshot removed after a certain time period.
{{< admonition type=note >}}
The snapshots.raintank.io option is disabled by default in Grafana Cloud. You can update [your config file](https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#external_enabled) to enable this functionality.
{{< /admonition >}}
To see the other snapshots shared from your organization, navigate to **Dashboards > Snapshots** in the main menu.
To share your panel with anyone as a snapshot, follow these steps:
1. Hover over any part of the panel you want to share to display the actions menu on the top-right corner.
1. Click the menu and select **Share snapshot**.
1. In the **Share snapshot** drawer that opens, enter a descriptive title for the snapshot in the **Snapshot name** field.
1. Select one of the following expiration options for the snapshot:
- **1 Hour**
- **1 Day**
- **1 Week**
- **Never**
1. Click **Publish snapshot** or **Publish to snapshots.raintank.io**.
Grafana generates the link of the snapshot. Note that you can't publish snapshots that include custom panels to snapshot.raintank.io.
1. Click **Copy link**, and share it either within your organization or publicly on the web.
1. Click the **X** at the top-right corner to close the share drawer.
#### Delete a snapshot
To delete existing snapshots, follow these steps:
1. Navigate to **Dashboards > Snapshots** in the main menu.
1. To confirm which snapshot you're about to delete, click **View** on the snapshot row.
The URLs for panel and dashboard snapshots from the same dashboard look similar and viewing them first can help you distinguish them.
1. Click the red **x** next to the snapshot URL that you want to delete.
The snapshot is immediately deleted. You may need to clear your browser cache or use a private or incognito browser to confirm this.
Grafana enables you to share dashboards and panels with other users within an organization and in certain situations, publicly on the Web. You can share using:
- A direct link
- A Snapshot
- An embedded link (for panels only)
- An export link (for dashboards only)
You must have an authorized viewer permission to see an image rendered by a direct link.
The same permission is also required to view embedded links unless you have anonymous access permission enabled for your Grafana instance.
{{< admonition type="note" >}}
As of Grafana 8.0, anonymous access permission is not available in Grafana Cloud.
{{< /admonition >}}
When you share a panel or dashboard as a snapshot, a snapshot (which is a panel or dashboard at the moment you take the snapshot) is publicly available on the web. Anyone with a link to it can access it. Because snapshots do not require any authorization to view, Grafana removes information related to the account it came from, as well as any sensitive data from the snapshot.
## Share a dashboard
You can share a dashboard as a direct link or as a snapshot. You can also export a dashboard.
{{< admonition type="note" >}}
If you change a dashboard, ensure that you save the changes before sharing.
{{< /admonition >}}
1. Click **Dashboards** in the main menu.
1. Click the dashboard you want to share.
1. Click **Share** in the top-right corner.
The share dialog opens and shows the Link tab.
### Share a direct link
The **Link** tab shows the current time range, template variables, and the default theme. You can also share a shortened URL.
1. Click **Copy**.
This action copies the default or the shortened URL to the clipboard.
1. Send the copied URL to a Grafana user with authorization to view the link.
### Publish a snapshot
A dashboard snapshot shares an interactive dashboard publicly. Grafana strips sensitive data such as queries (metric, template and annotation) and panel links, leaving only the visible metric data and series names embedded in the dashboard. Dashboard snapshots can be accessed by anyone with the link.
You can publish snapshots to your local instance or to [snapshots.raintank.io](http://snapshots.raintank.io). The latter is a free service provided by Grafana Labs that enables you to publish dashboard snapshots to an external Grafana instance. Anyone with the link can view it. You can set an expiration time if you want the snapshot removed after a certain time period.
1. Click the **Snapshot** tab.
1. Click **Publish to snapshots.raintank.io** or **Publish Snapshot**.
Grafana generates a link of the snapshot.
1. Copy the snapshot link, and share it either within your organization or publicly on the web.
If you created a snapshot by mistake, click **Delete snapshot** in the dialog box to remove the snapshot from your Grafana instance.
#### Delete a snapshot
To delete existing snapshots, follow these steps:
1. Click **Dashboards** in the main menu.
1. Click **Snapshots** to go to the snapshots management page.
1. Click the red **x** next to the snapshot URL that you want to delete.
The snapshot is immediately deleted. You may need to clear your browser cache or use a private or incognito browser to confirm this.
### Export a dashboard as JSON
The dashboard export action creates a Grafana JSON file that contains everything you need, including layout, variables, styles, data sources, queries, and so on, so that you can later import the dashboard.
1. Click **Dashboards** in the main menu.
1. Open the dashboard you want to export.
1. Click **Share** in the top-right corner.
1. Click **Export**.
If you're exporting the dashboard to use in another instance, with different data source UIDs, enable the **Export for sharing externally** switch.
1. Click **Save to file**.
Grafana downloads a JSON file to your local machine.
#### Make a dashboard portable
If you want to export a dashboard for others to use, you can add template variables for things like a metric prefix (use a constant variable) and server name.
A template variable of the type `Constant` is automatically hidden in the dashboard, and is also added as a required input when the dashboard is imported.
## Export dashboard as PDF
You can generate and save PDF files of any dashboard.
{{< admonition type="note" >}}
Available in [Grafana Enterprise](ref:grafana-enterprise) and [Grafana Cloud](/docs/grafana-cloud/).
{{< /admonition >}}
1. Click **Dashboards** in the main menu.
1. Click the dashboard you want to share.
1. Click **Share** in the top-right corner.
1. On the **PDF** tab, select a layout option for the exported dashboard: **Portrait** or **Landscape**.
1. Click **Save as PDF** to render the dashboard as a PDF file.
Grafana opens the PDF file in a new window or browser tab.
## Share a panel
You can share a panel as a direct link, as a snapshot, or as an embedded link. You can also create library panels using the **Share** option on any panel.
1. Hover over any part of the panel to display the actions menu on the top right corner.
1. Click the menu and select **Share**.
The share dialog opens and shows the **Link** tab.
### Use direct link
The **Link** tab shows the current time range, template variables, and the default theme. You can optionally enable a shortened URL to share.
1. Click **Copy**.
This action copies the default or the shortened URL to the clipboard.
1. Send the copied URL to a Grafana user with authorization to view the link.
1. You also optionally click **Direct link rendered image** to share an image of the panel.
For more information, refer to [Image rendering](ref:image-rendering).
The following example shows a link to a server-side rendered PNG:
#### Query string parameters for server-side rendered images
- **width:** Width in pixels. Default is 800.
- **height:** Height in pixels. Default is 400.
- **tz:** Timezone in the format `UTC%2BHH%3AMM` where HH and MM are offset in hours and minutes after UTC
- **timeout:** Number of seconds. The timeout can be increased if the query for the panel needs more than the default 30 seconds.
- **scale:** Numeric value to configure device scale factor. Default is 1. Use a higher value to produce more detailed images (higher DPI). Supported in Grafana v7.0+.
### Publish a snapshot
A panel snapshot shares an interactive panel publicly. Grafana strips sensitive data leaving only the visible metric data and series names embedded in the dashboard. Panel snapshots can be accessed by anyone with the link.
You can publish snapshots to your local instance or to [snapshots.raintank.io](http://snapshots.raintank.io). The latter is a free service provided by [Grafana Labs](https://grafana.com), that enables you to publish dashboard snapshots to an external Grafana instance.
{{< admonition type="note" >}}
As of Grafana 11, the option to publish to [snapshots.raintank.io](http://snapshots.raintank.io) is no longer available for Grafana Cloud.
{{< /admonition >}}
You can optionally set an expiration time if you want the snapshot to be removed after a certain time period.
1. In the **Share Panel** dialog, click **Snapshot** to go to the tab.
1. Click **Publish to snapshots.raintank.io** or **Publish Snapshot**.
Grafana generates the link of the snapshot.
1. Copy the snapshot link, and share it either within your organization or publicly on the web.
If you created a snapshot by mistake, click **Delete snapshot** in the dialog box to remove the snapshot from your Grafana instance.
#### Delete a snapshot
To delete existing snapshots, follow these steps:
1. Click **Dashboards** in the main menu.
1. Click **Snapshots** to go to the snapshots management page.
1. Click the red **x** next to the snapshot URL that you want to delete.
The snapshot is immediately deleted. You may need to clear your browser cache or use a private or incognito browser to confirm this.
### Embed panel
You can embed a panel using an iframe on another web site. A viewer must be signed into Grafana to view the graph.
{{< admonition type="note" >}}
As of Grafana 8.0, anonymous access permission is no longer available for Grafana Cloud.
This feature was previously called **Public dashboards**.
{{< /admonition >}}
Externally shared dashboards allow you to share your Grafana dashboard with anyone. This is useful when you want to make your dashboard available to the world without requiring access to your Grafana organization.
If you change a dashboard, ensure that you save the changes before sharing.
{{< admonition type="warning" >}}
Sharing your dashboard externally could result in a large number of queries to the data sources used by your dashboard.
This can be mitigated by using the Enterprise [caching](ref:caching) and/or rate limiting features.
{{< /admonition >}}
## Shared dashboards list
You can see a list of all your externally shared dashboards in one place by navigating to **Dashboards > Shared dashboards**. For each dashboard in the list, the page displays:
- Link to view the externally shared version of the dashboard
- Link to the shared dashboard configuration
- Options to pause or revoke access to the external dashboard
You can also click the name of the dashboard to navigate to the dashboard internally.
## Important notes about sharing your dashboard externally
- Anyone with the URL can access the dashboard.
- Externally shared dashboards are read-only.
- Arbitrary queries **cannot** be run against your data sources through externally shared dashboards. Externally shared dashboards can only execute the queries stored on the original dashboard.
## Share externally with specific people
{{< admonition type="note">}}
This feature was previously called **email sharing**.
Available in [Grafana Enterprise](ref:grafana-enterprise) and [Grafana Cloud](/docs/grafana-cloud).
{{< /admonition >}}
{{< docs/private-preview product="Sharing externally with specific people" >}}
To share a dashboard with specific external users, you can send them a link by email. Use this option when you only want to share your dashboard with specific people. When you share dashboards by email, recipients receive a one-time use link that's valid for **one hour**. Once the link is used, the viewer has access to the shared dashboard for **30 days**.
When you share a dashboard with an email link, your organization is billed per user, regardless of how many dashboards are shared. Grafana bills monthly per user until access is revoked.
To share a dashboard with specific people, follow these steps:
1. Click **Dashboards** in the main menu.
1. Click the dashboard you want to share.
1. Click the **Share** drop-down list in the top-right corner and select **Share externally**.
The **Share externally** drawer opens.
1. In the **Link access** drop-down list, select **Only specific people**.
1. Click the checkbox confirming that you understand payment is required to add users.
1. Click **Accept**.
1. In the **Invite** field, enter the email address of the person you want to invite and click **Invite** and repeat this process for all the people you want to invite.
You can only invite one person at a time.
1. (Optional) Set the following options:
- **Enable time range** - Allow people accessing the link to change the time range. This configuration screen shows the default time range of the dashboard.
- **Display annotations** - Allow people accessing the link to view the dashboard annotations.
1. (Optional) Click **Copy external link** and send the copied URL to any external user.
1. Click the **X** at the top-right corner to close the share drawer.
Once you've shared a dashboard externally, a **Public** label is displayed in the header of the dashboard.
### Viewers requesting access
If a viewer without access tries to navigate to the shared dashboard, they'll be asked to request access by providing their email. They'll receive an email with a new one-time use link if the email they provided has already been invited to view the shared dashboard and hasn't been revoked.
### Revoke access for a viewer
You can revoke access to the entire dashboard using the steps in [Update access to an external dashboard link](#update-access-to-an-external-dashboard-link), but you can also revoke access to the dashboard for specific people.
To revoke access for a viewer, follow these steps:
1. Click **Dashboards** in the main menu.
1. Click the dashboard you want to share.
1. Click the **Share** drop-down list in the top-right corner and select **Share externally**.
1. In the **Share externally** drawer that opens, click the menu icon (three dots) next to the email address of the viewer for whom you'd like to revoke access.
1. Click **Revoke access**.
1. Click the **X** at the top-right corner to close the share drawer.
The viewer immediately no longer has access to the dashboard, nor can they use any existing one-time use links they may have.
### Re-invite a viewer
To re-invite a viewer, follow these steps:
1. Click **Dashboards** in the main menu.
1. Click the dashboard you want to share.
1. Click the **Share** drop-down list in the top-right corner and select **Share externally**.
1. In the **Share externally** drawer that opens, click the menu icon (three dots) next to the email address of the viewer you'd like to invite again.
1. Click **Resend invite**.
1. Click the **X** at the top-right corner to close the share drawer.
The viewer receives an email with a new one-time use link. This invalidates all previously issued links for that viewer.
### View shared dashboard users
To see a list of users who have accessed your externally shared dashboard by way of an emailed link, follow these steps:
1. Click **Administration** in in the main menu.
1. Select **Users and access** > **Users**.
1. On the **Users** page, click the **Shared dashboard users** tab.
On this screen, you can see:
- The earliest time a user has been active in a dashboard
- When they last accessed a shared dashboard
- The dashboards to they have access
- Their role
You can also revoke a user's access to all shared dashboards on from this tab.
### Access limitations
One-time use links use browser cookies, so when a viewer is granted access through one of these links, they'll only have access on the browser they used to claim the link.
A single viewer can't generate multiple valid one-time use links for a dashboard. When a new one-time use link is issued for a viewer, all previous ones are invalidated.
If a Grafana user has read access to the parent dashboard, they can view the externally shared dashboard without needing to have access granted.
## Share externally to anyone with a link
To share your dashboard so that anyone with the link can access it, follow these steps:
1. Click **Dashboards** in the main menu.
1. Click the dashboard you want to share.
1. Click the **Share** drop-down list in the top-right corner and select **Share externally**.
The **Share externally** drawer opens.
1. In the **Link access** drop-down list, select **Anyone with the link**.
1. Click the checkbox confirming that you understand the entire dashboard will be public.
1. Click **Accept**.
1. (Optional) Set the following options:
- **Enable time range** - Allow people accessing the link to change the time range. This configuration screen shows the default time range of the dashboard.
- **Display annotations** - Allow people accessing the link to view the dashboard annotations.
1. Click the **X** at the top-right corner to close the share drawer.
Now anyone with the link can access the dashboard until you pause or revoke access to it.
Once you've shared a dashboard externally, a **Public** label is displayed in the header of the dashboard.
### Update access to an external dashboard link
You can update the access to externally shared dashboard links by following these steps:
1. Click **Dashboards** in the main menu.
1. Click the dashboard you want to share.
1. Click the **Share** drop-down list in the top-right corner and select **Share externally**.
1. In the **Share externally** drawer that opens, do one of the following:
- Click **Pause access** so that people can't access the dashboard, but the link is maintained.
- Click **Resume access** so that people can access the dashboard again.
- Click **Revoke access** so that people can't access the dashboard unless a new external link is generated. Confirm that you want to revoke the link.
1. Click the **X** at the top-right corner to close the share drawer.
## Assess shared dashboard usage
{{< admonition type="note" >}}
Available in [Grafana Enterprise](ref:grafana-enterprise) and [Grafana Cloud](/docs/grafana-cloud).
{{< /admonition >}}
You can check usage analytics about your externally shared dashboard by clicking the insights icon in the dashboard header:
Learn more about the kind of information provided in the [dashboard insights documentation](ref:dashboard-insights-documentation).
## Supported data sources
Externally shared dashboards _should_ work with any data source that has the properties `backend` and `alerting` both set to true in its `plugin.json`. However, this can't always be
guaranteed because plugin developers can override this functionality. The following lists include data sources confirmed to work with externally shared dashboards and data sources that should work, but have not been confirmed as compatible.
### Confirmed:
<table>
<tr>
<td>
<ul>
<li>ClickHouse</li>
<li>CloudWatch</li>
<li>Elasticsearch</li>
<li>Infinity</li>
<li>InfluxDB</li>
<li>Loki</li>
<li>Microsoft SQL Server</li>
</ul>
</td>
<td>
<ul>
<li>MongoDB</li>
<li>MySQL</li>
<li>Oracle Database</li>
<li>PostgreSQL</li>
<li>Prometheus</li>
<li>Redis</li>
<li>SQLite</li>
</ul>
</td>
</tr>
</table>
### Unsupported:
<table>
<tr>
<td>
<ul>
<li>Graphite</li>
</ul>
</td>
</tr>
</table>
### Unconfirmed:
<table>
<tr>
<td>
<ul>
<li>Altinity plugin for ClickHouse</li>
<li>Amazon Athena</li>
<li>Amazon Redshift</li>
<li>Amazon Timestream</li>
<li>Apache Cassandra</li>
<li>AppDynamics</li>
<li>Azure Data Explorer Datasource</li>
<li>Azure Monitor</li>
<li>CSV</li>
<li>DB2 Datasource</li>
<li>Databricks</li>
<li>Datadog</li>
<li>Dataset</li>
<li>Druid</li>
</ul>
</td>
<td>
<ul>
<li>Dynatrace</li>
<li>GitHub</li>
<li>Google BigQuery</li>
<li>Grafana for YNAB</li>
<li>Honeycomb</li>
<li>Jira</li>
<li>Mock</li>
<li>Neo4j Datasource</li>
<li>New Relic</li>
<li>OPC UA (Unified Architecture)</li>
<li>Open Distro for Elasticsearch</li>
<li>OpenSearch</li>
<li>OpenTSDB</li>
</ul>
</td>
<td>
<ul>
<li>Orbit</li>
<li>SAP HANA®</li>
<li>Salesforce</li>
<li>Sentry</li>
<li>ServiceNow</li>
<li>Snowflake</li>
<li>Splunk</li>
<li>Splunk Infrastructure Monitoring</li>
<li>Sqlyze data source</li>
<li>TDengine</li>
<li>Vertica</li>
<li>Wavefront</li>
<li>X-Ray</li>
<li>kdb+</li>
<li>simple grpc data source</li>
</ul>
</td>
</tr>
</table>
## Limitations
- Panels that use frontend data sources will fail to fetch data.
- Template variables are not supported.
- Exemplars will be omitted from the panel.
- Only annotations that query the `-- Grafana --` data source are supported.
- Organization annotations are not supported.
- Grafana Live and real-time event streams are not supported.
- Library panels are not supported.
- Data sources using Reverse Proxy functionality are not supported.
## Custom branding
If you're a Grafana Enterprise customer, you can use custom branding to change the appearance of an externally shared dashboard footer. For more information, refer to [Custom branding](ref:custom-branding).
@@ -80,17 +95,18 @@ The dashboard user interface provides a number of features that you can use to c
The following image and descriptions highlight all dashboard features.


1. **Grafana home** - Click **Home** in the breadcrumb to go to the home page configured in the Grafana instance.
1. **Dashboard folder** - When you click the dashboard folder name, you can search for other dashboards contained in the folder and perform other [folder management tasks](ref:dashboard-folders).
1. **Dashboard title** - You can create your own dashboard titles or have Grafana create them for you using [generative AI features](ref:generative-ai-features).
1. **Kiosk mode** - Click to display the dashboard on a large screen such as a TV or a kiosk. Kiosk mode hides the main menu, navbar, and dashboard controls. Learn more about kiosk mode in our [How to Create Kiosks to Display Dashboards on a TV blog post](https://grafana.com/blog/2019/05/02/grafana-tutorial-how-to-create-kiosks-to-display-dashboards-on-a-tv/). Press `Esc` to leave kiosk mode.
1. **Mark as favorite** - Mark the dashboard as one of your favorites so it's included in your list of **Starred** dashboards in the main menu.
1. **Public label** - When you [share a dashboard externally](ref:shared-dashboards), it's marked with the **Public** label.
1. **Dashboard insights** - Click to view analytics about your dashboard including information about users, activity, query counts. Learn more about [dashboard analytics](ref:dashboard-analytics).
1. **Share dashboard** - Access several [dashboard sharing](ref:sharing) options.
1. **Edit** - Click to leave view-only mode and enter edit mode, where you can make changes directly to the dashboard and access dashboard settings, as well as several panel editing functions.
1. **Kiosk mode** - Click to display the dashboard on a large screen such as a TV or a kiosk. Kiosk mode hides elements such as navigation menus. Learn more about kiosk mode in our [How to Create Kiosks to Display Dashboards on a TV blog post](https://grafana.com/blog/2019/05/02/grafana-tutorial-how-to-create-kiosks-to-display-dashboards-on-a-tv/). Press `Enter` to leave kiosk mode.
1. **Variables** - Use [variables](ref:variables) to create more interactive and dynamic dashboards.
1. **Share dashboard** - Access several [dashboard sharing](ref:sharing) options.
1. **Variables** - Use [variables](ref:variables), including ad hoc filters, to create more interactive and dynamic dashboards.
1. **Dashboard links** - Link to other dashboards, panels, and external websites. Learn more about [dashboard links](ref:dashboard-links).
1. **Current dashboard time range and time picker** - Click to select [relative time range](#relative-time-range) options and set custom [absolute time ranges](#absolute-time-range).
- You can change the **Timezone** and **Fiscal year** settings from the time range controls by clicking the **Change time settings** button.
@@ -123,10 +139,11 @@ By hovering over a panel with the mouse you can use some shortcuts that will tar
- `e`: Toggle panel edit view
- `v`: Toggle panel fullscreen view
- `ps`: Open Panel Share Modal
- `pd`: Duplicate Panel
- `pr`: Remove Panel
- `pl`: Toggle panel legend
- `pu`: Open share panel link configuration
- `pe`: Open share panel embed configuration
- `ps`: Open share panel snapshot configuration
- `pd`: Duplicate panel
- `pr`: Remove panel
## Set dashboard time range
@@ -264,3 +281,33 @@ Selecting the **Auto** interval schedules a refresh based on the query time rang
Once you've [added an ad hoc filter](ref:add-ad-hoc-filters) in the dashboard settings, you can create label/value filter pairs on the dashboard.
These filters are applied to all metric queries that use the specified data source and to all panels on the dashboard.
To filter dashboard data, follow these steps:
1. On the dashboard, click in the filter field.
1. Select a label, operator, and value.
To add multiple values for one label, choose one of the multi-select operators, **One of** (`=|`) or **Not one of** (`!=|`). These operators only appear if the filter data source supports it.
1. Repeat this process as needed until you have all the filters you need.

### Edit or delete filters
To edit or delete filters, follow these steps:
1. On the dashboard, click anywhere on the filter you want to change.
1. Do one of the following:
- To edit the operator or value of a filter, click anywhere on the filter and update it.

- To change the filter label, you must delete the filter and create a new one.
@@ -101,21 +106,33 @@ The following table lists the types of variables shipped with Grafana.
## Enter General options
You must enter general options for any type of variable that you create.
To create a variable, follow these steps:
1. Click **Edit** in the top-right corner of the dashboard.
1. Click **Settings**.
1. Go to the **Variables** tab.
1. Click **Add variable**.
1. Click **Add variable**, or if there are already existing variables, **+ New variable**.
1. Choose an option in the **Select variable type** drop-down list.
1. Enter a **Name** for the variable.
1. In the **Select variable type** drop-down, choose **Query**.
1. (Optional) In **Label**, enter the display name of the variable dropdown.
1. (Optional) In the **Label** field, enter the display name for the variable drop-down list.
If you don't enter a display name, then the dropdown label is the variable name.
If you don't enter a display name, then the drop-down list label is the variable name.
1. Choose a **Show on dashboard** option:
- **Label and value** - The variable drop-down displays the variable **Name** or **Label** value. This is the default.
- **Value:** The variable drop-down only displays the selected variable value and a down arrow.
- **Nothing:**No variable drop-down is displayed on the dashboard.
- **Label and value** - The variable drop-down list displays the variable **Name** or **Label** value. This is the default.
- **Value:**The variable drop-down list only displays the selected variable value and a down arrow.
- **Nothing:** No variable drop-down list is displayed on the dashboard.
1. Click one of the following links to complete the steps for adding your selected variable type:
- [Query](#add-a-query-variable)
- [Custom](#add-a-custom-variable)
- [Textbox](#add-a-text-box-variable)
- [Constant](#add-a-constant-variable)
- [Data source](#add-a-data-source-variable)
- [Interval](#add-an-interval-variable)
- [Ad hoc filters](#add-ad-hoc-filters)
## Add a query variable
@@ -130,10 +147,20 @@ Query expressions are different for each data source. For more information, refe
{{< /admonition >}}
1. [Enter general options](#enter-general-options).
1. In the **Data source** list, select the target data source for the query. For more information about data sources, refer to [Add a data source](ref:add-a-data-source).
1. In the **Refresh** list, select when the variable should update options.
- **On Dashboard Load:** Queries the data source every time the dashboard loads. This slows down dashboard loading, because the variable query needs to be completed before dashboard can be initialized.
- **On Time Range Change:** Queries the data source every time the dashboard loads and when the dashboard time range changes. Use this option if your variable options query contains a time range filter or is dependent on the dashboard time range.
1. Under the **Query options** section of the page, select a target data source in the **Data source** drop-down list.
You can also click **Open advanced data source picker** to see more options, including adding a data source (Admins only).
For more information about data sources, refer to [Add a data source](ref:add-a-data-source).
1. In the **Query type** drop-down list, select one of the following options:
- **Label names**
- **Label values**
- **Metrics**
- **Query result**
- **Series query**
- **Classic query**
1. In the **Query** field, enter a query.
- The query field varies according to your data source. Some data sources have custom query editors.
@@ -142,9 +169,18 @@ Query expressions are different for each data source. For more information, refe
- If you need more room in a single input field query editor, then hover your cursor over the lines in the lower right corner of the field and drag downward to expand.
1. (Optional) In the **Regex** field, type a regex expression to filter or capture specific parts of the names returned by your data source query. To see examples, refer to [Filter variables with regex](#filter-variables-with-regex).
1. In the **Sort** list, select the sort order for values to be displayed in the dropdown list. The default option, **Disabled**, means that the order of options returned by your data source query will be used.
1. (Optional) Enter [Selection Options](#configure-variable-selection-options).
1. In **Preview of values**, Grafana displays a list of the current variable values. Review them to ensure they match what you expect.
1. In the **Sort** drop-down list, select the sort order for values to be displayed in the dropdown list. The default option, **Disabled**, means that the order of options returned by your data source query will be used.
1. Under **Refresh**, select when the variable should update options:
- **On dashboard load** - Queries the data source every time the dashboard loads. This slows down dashboard loading, because the variable query needs to be completed before dashboard can be initialized.
- **On time range change** - Queries the data source every time the dashboard loads and when the dashboard time range changes. Use this option if your variable options query contains a time range filter or is dependent on the dashboard time range.
1. (Optional) Configure the settings in the [Selection Options](#configure-variable-selection-options) section:
- **Multi-value** - Enables multiple values to be selected at the same time.
- **Include All option** - Enables an option to include all variables.
1. In the **Preview of values** section, Grafana displays a list of the current variable values. Review them to ensure they match what you expect.
1. Click **Save dashboard**.
1. Click **Back to dashboard** and **Exit edit**.
@@ -155,9 +191,16 @@ Use a _custom_ variable for a value that does not change, such as a number or a
For example, if you have server names or region names that never change, then you might want to create them as custom variables rather than query variables. Because they do not change, you might use them in [chained variables](#chained-variables) rather than other query variables. That would reduce the number of queries Grafana must send when chained variables are updated.
1. [Enter general options](#enter-general-options).
1. In the **Values separated by comma**list, enter the values for this variable in a comma-separated list. You can include numbers, strings, or key/value pairs separated by a space and a colon. For example, `key1 : value1,key2 : value2`.
1. (Optional) Enter [Selection Options](#configure-variable-selection-options).
1. In **Preview of values**, Grafana displays a list of the current variable values. Review them to ensure they match what you expect.
1. Under the **Custom options** section of the page, in the **Values separated by comma**field, enter the values for this variable in a comma-separated list.
You can include numbers, strings, or key/value pairs separated by a space and a colon. For example, `key1 : value1,key2 : value2`.
1. (Optional) Configure the settings in the [Selection Options](#configure-variable-selection-options) section:
- **Multi-value** - Enables multiple values to be selected at the same time.
- **Include All option** - Enables an option to include all variables.
1. In the **Preview of values** section, Grafana displays a list of the current variable values. Review them to ensure they match what you expect.
1. Click **Save dashboard**.
1. Click **Back to dashboard** and **Exit edit**.
@@ -168,8 +211,10 @@ _Text box_ variables display a free text input field with an optional default va
For more information about cardinality, refer to [What are cardinality spikes and why do they matter?](https://grafana.com/blog/2022/02/15/what-are-cardinality-spikes-and-why-do-they-matter/)
1. [Enter general options](#enter-general-options).
1. (Optional) In the **Default value** field, select the default value for the variable. If you do not enter anything in this field, then Grafana displays an empty text box for users to type text into.
1. In **Preview of values**, Grafana displays a list of the current variable values. Review them to ensure they match what you expect.
1. (Optional) Under the **Text options** section of the page, in the **Default value** field, enter the default value for the variable.
If you do not enter anything in this field, then Grafana displays an empty text box for users to type text into.
1. Click **Save dashboard**.
1. Click **Back to dashboard** and **Exit edit**.
@@ -182,8 +227,10 @@ Constant variables are _not_ flexible. Each constant variable only holds one val
Constant variables are useful when you have complex values that you need to include in queries but don't want to retype in every query. For example, if you had a server path called `i-0b6a61efe2ab843gg`, then you could replace it with a variable called `$path_gg`.
1. [Enter general options](#enter-general-options).
1. In the **Value** field, enter the variable value. You can enter letters, numbers, and symbols. You can even use wildcards if you use [raw format](ref:raw-format).
1. In **Preview of values**, Grafana displays the current variable value. Review it to ensure it matches what you expect.
1. Under the **Constant options** section of the page, in the **Value** field, enter the variable value.
You can enter letters, numbers, and symbols. You can even use wildcards if you use [raw format](ref:raw-format).
1. Click **Save dashboard**.
1. Click **Back to dashboard** and **Exit edit**.
@@ -192,13 +239,17 @@ Constant variables are useful when you have complex values that you need to incl
_Data source_ variables enable you to quickly change the data source for an entire dashboard. They are useful if you have multiple instances of a data source, perhaps in different environments.
1. [Enter general options](#enter-general-options).
1. In the **Type** list, select the target data source for the variable.
1. Under the **Data source options** section of the page, in the **Type** drop-down list, select the target data source for the variable.
1. (Optional) In **Instance name filter**, enter a regex filter for which data source instances to choose from in the variable value drop-down list.
You can also click **Open advanced data source picker** to see more options, including adding a data source (Admins only). For more information about data sources, refer to [Add a data source](ref:add-a-data-source).
Leave this field empty to display all instances.
1. (Optional) In **Instance name filter**, enter a regex filter for which data source instances to choose from in the variable value drop-down list. Leave this field empty to display all instances.
1. (Optional) Enter [Selection Options](#configure-variable-selection-options).
1. In **Preview of values**, Grafana displays a list of the current variable values. Review them to ensure they match what you expect.
1. (Optional) Configure the settings in the [Selection Options](#configure-variable-selection-options) section:
- **Multi-value** - Enables multiple values to be selected at the same time.
- **Include All option** - Enables an option to include all variables.
1. In the **Preview of values** section, Grafana displays a list of the current variable values. Review them to ensure they match what you expect.
1. Click **Save dashboard**.
1. Click **Back to dashboard** and **Exit edit**.
@@ -209,11 +260,18 @@ Use an _interval_ variable to represents time spans such as `1m`,`1h`, `1d`. You
You can use an interval variable as a parameter to group by time (for InfluxDB), date histogram interval (for Elasticsearch), or as a summarize function parameter (for Graphite).
1. [Enter general options](#enter-general-options).
1. In the **Values** field, enter the time range intervals that you want to appear in the variable drop-down list. The following time units are supported: `s (seconds)`, `m (minutes)`, `h (hours)`, `d (days)`, `w (weeks)`, `M (months)`, and `y (years)`. You can also accept or edit the default values: `1m,10m,30m,1h,6h,12h,1d,7d,14d,30d`.
1. (Optional) Turn on the **Auto Option** if you want to add the `auto` option to the list. This option allows you to specify how many times the current time range should be divided to calculate the current `auto` time span. If you turn it on, then two more options appear:
- **Step count -** Select the number of times the current time range will be divided to calculate the value, similar to the **Max data points** query option. For example, if the current visible time range is 30 minutes, then the `auto` interval groups the data into 30 one-minute increments. The default value is 30 steps.
- **Min Interval -** The minimum threshold below which the step count intervals will not divide the time. To continue the 30 minute example, if the minimum interval is set to 2m, then Grafana would group the data into 15 two-minute increments.
1. In **Preview of values**, Grafana displays a list of the current variable values. Review them to ensure they match what you expect.
1. Under the **Interval options** section, in the **Values** field, enter the time range intervals that you want to appear in the variable drop-down list.
The following time units are supported: `s (seconds)`, `m (minutes)`, `h (hours)`, `d (days)`, `w (weeks)`, `M (months)`, and `y (years)`. You can also accept or edit the default values: `1m,10m,30m,1h,6h,12h,1d,7d,14d,30d`.
1. (Optional) Select on the **Auto option** checkbox if you want to add the `auto` option to the list.
This option allows you to specify how many times the current time range should be divided to calculate the current `auto` time span. If you turn it on, then two more options appear:
- **Step count** - Select the number of times the current time range will be divided to calculate the value, similar to the **Max data points** query option. For example, if the current visible time range is 30 minutes, then the `auto` interval groups the data into 30 one-minute increments. The default value is 30 steps.
- **Min interval** - The minimum threshold below which the step count intervals will not divide the time. To continue the 30 minute example, if the minimum interval is set to 2m, then Grafana would group the data into 15 two-minute increments.
1. In the **Preview of values** section, Grafana displays a list of the current variable values. Review them to ensure they match what you expect.
_Ad hoc filters_ enable you to add key/value filters that are automatically added to all metric queries that use the specified data source. Unlike other variables, you do not use ad hoc filters in queries. Instead, you use ad hoc filters to write filters for existing queries.
_Ad hoc filters_ are one of the most complex and flexible variable options available.
Instead of a regular list of variable options, this variable allows you to build a dashboard-wide ad hoc query.
Ad hoc filters let you add label/value filters that are automatically added to all metric queries that use the specified data source.
Unlike other variables, you don't use ad hoc filters in queries.
Instead, you use ad hoc filters to write filters for existing queries.
{{% admonition type="note" %}}
Not all data sources support ad hoc filters. Examples of those that do include Prometheus, Loki, InfluxDB, and Elasticsearch.
Not all data sources support ad hoc filters.
Examples of those that do include Prometheus, Loki, InfluxDB, and Elasticsearch.
{{% /admonition %}}
To create an ad hoc filter, follow these steps:
1. [Enter general options](#enter-general-options).
1. In the **Data source** list, select the target data source.
1. Under the **Ad-hoc options** section of the page, select a target data source in the **Data source** drop-down list.
You can also click **Open advanced data source picker** to see more options, including adding a data source (Admins only). For more information about data sources, refer to [Add a data source](ref:add-a-data-source).
You can also click **Open advanced data source picker** to see more options, including adding a data source (Admins only).
For more information about data sources, refer to [Add a data source](ref:add-a-data-source).
1. (Optional) To provide the filter dimensions as comma-separated values (CSV), toggle the **Use static key dimensions** switch on, and then enter the values in the space provided.
1. Click **Save dashboard**.
1. Enter an optional description of your dashboard changes, and then click **Save**.
1. Click **Back to dashboard** and **Exit edit**.
### Create ad hoc filters
Ad hoc filters are one of the most complex and flexible variable options available. Instead of a regular list of variable options, this variable allows you to build a dashboard-wide ad hoc query. Filters you apply in this manner are applied to all panels on the dashboard.
Now you can [filter data on the dashboard](ref:filter-dashboard).
## Configure variable selection options
@@ -304,18 +371,12 @@ Grafana has global built-in variables that can be used in expressions in the que
### $\_\_dashboard
> Only available in Grafana v6.7+. In Grafana 7.1, the variable changed from showing the UID of the current dashboard to the name of the current dashboard.
This variable is the name of the current dashboard.
### $\_\_from and $\_\_to
Grafana has two built-in time range variables: `$__from` and `$__to`. They are currently always interpolated as epoch milliseconds by default, but you can control date formatting.
{{% admonition type="note" %}}
This special formatting syntax is only available in Grafana 7.1.2+
### Filter and modify using named text and value capture groups
{{% admonition type="note" %}}
This feature is available in Grafana 7.4+.
{{% /admonition %}}
Using named capture groups, you can capture separate 'text' and 'value' parts from the options returned by the variable query. This allows the variable drop-down list to contain a friendly name for each value that can be selected.
For example, when querying the `node_hwmon_chip_names` Prometheus metric, the `chip_name` is a lot friendlier than the `chip` value. So the following variable query result:
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.