docs(alerting): clarify usage of different Alertmanagers and fix misleading details (#107498)
* docs(alerting): clarify usage of different Alertmanagers and fix misleading details
* address review changes
(cherry picked from commit 61efc8b609)
Co-authored-by: Pepe Cano <825430+ppcano@users.noreply.github.com>
* docs(alerting): Add `Detect missing series in Prometheus` section to the MissingData guide (#107329)
(cherry picked from commit 2f1a6ae171)
* fix ref link
InfluxDB: Fix regex for finding regexes in frontend code (#105194)
When interpolating variables in the frontend, we want to be sure to
escape special characters if the variable is used in a regex.
We used a regex to find regexes in raw queries, which contained a bug.
The regex treated any `/` character as the start of a regex. However,
InfluxQL (and most sql dialects) support using `/` as a division
operator.
This PR adds a check for `=~` or `!~` immediately preceding `/` as the
beginning of a regex, as per the InfluxQL spec for regexes:
https://docs.influxdata.com/influxdb/v2/reference/syntax/influxql/spec/#regular-expressions
Fixes https://github.com/grafana/support-escalations/issues/16219
(cherry picked from commit 8f4b2bbece)
Co-authored-by: beejeebus <justin.randell@grafana.com>
* Alerting: Resend alerts for states that are missing in the eval results (#105965)
What is this feature?
This PR fixes the MissingSeriesEvalsToResolve behavior when it's set to more than 4 evaluation intervals.
Why do we need this feature?
The MissingSeriesEvalsToResolve setting was not working correctly due to alerts being auto-resolved by Alertmanager after 4 evaluation intervals (via the endsAt field).
Before we had deleteStaleStatesFromCache method that was returning only stale states that had to be resolved. Non-stale states for which the current evaluation does not have a series never had endsAt updated and were never resend to the Alertmanager, so they were automatically resolved after 4 evaluations regardless of the setting.
The new processMissingSeriesStates returns state for each missing series on every evaluation, and resolves the stale ones. This guarantees that alerts without series still alert for the configured number of evaluations.
* Remove FiredAt field
Docs: Adding info on allowlisting IPs for the Cloud Migration Assistant (#106447)
* Docs: Adding info on allowlisting IPs for the Cloud Migration Assistant
* adjusting the wording
(cherry picked from commit 7cdd4470c6)
Co-authored-by: Jacob Valdez <jacob.valdez@grafana.com>
Docs: Document `remote_cache` is only used if a remote database is used (#104779)
* Document `remote_cache` is only used if a remote database is used
* Update _index.md
---------
(cherry picked from commit 19a65a4865)
Co-authored-by: Mathias Petermann <mathias.petermann@gmail.com>
Co-authored-by: Jacob Valdez <jacob.valdez@grafana.com>
FlameGraph: Fix bug for function names that conflict with JavaScript object prototype properties (#106338)
* grafana-flamegraph: Fix bug for function names that conflict with JavaScript object prototype properties
The bug occurs in the flamegraph data transformation logic where function names from profiling data are used as object
keys without proper prototype pollution protection.
Fixes#106232#101551
* Fix top table calculations
---------
(cherry picked from commit 6156e9c2d8)
Co-authored-by: Christian Simon <simon@swine.de>
Co-authored-by: vinayteki95 <vinayteki95@users.noreply.github.com>
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
Profiles: Stop passing response headers for Grafana-Pyroscope and parca datasources (#106577)
* Revert "pkgs/tsdb/[grafana-pyroscope-datasource|parca]: Fix use of request headers in responses"
This reverts commit 8bac68e906.
* Profiles: Stop passing request/response headers to the backend
(cherry picked from commit 8fdf86e56f)
(cherry picked from commit 7878815ffc)
Provisioning: Move OSS provisioning to Run step (#105428)
* Provisioning: Move OSS provisioning to Run step
---------
(cherry picked from commit 1435eedbc4)
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
Co-authored-by: maicon <maiconscosta@gmail.com>
Run Init Provisioners at Server Initialization (#105080)
* Run Init Provisioners at Server Initialization
---------
(cherry picked from commit 82bbbf1a98)
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
Co-authored-by: maicon <maiconscosta@gmail.com>
* Geomap: Require layer to have data for legend (#105580)
(cherry picked from commit 16a6d61ca7)
* Remove test for non-existent function
* Remove unused import
Docs: adding information on adjusting short link expiration time in Grafana cloud (#106112)
* Docs: adding information on adjusting short link expiration time in Grafana cloud
* changing admonition and adding info on changing config for cloud
* adjusting wording
* fixing typo
* Update docs/sources/setup-grafana/configure-grafana/_index.md
---------
(cherry picked from commit f02ad33fd2)
Co-authored-by: Jacob Valdez <jacob.valdez@grafana.com>
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
CloudMigrations: Omit autoincremented id for alert snapshots (#106598)
If you tried to migrate alerts from two differente sources/on-prem instances,
the autoincremented numeric id would be the same, and since we were creating
the resource in cloud with that same id (the API accepts it), it would
return an error "conflicting alert rule found" because that id is the primary key on the table.
We simply omit the numeric id now and let the API for the cloud instance generate it.
(cherry picked from commit a1f2693fd8)
Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>