mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Elasticsearch: Add deprecation notice for < 7.10 versions (#48506)
* Elasticsearch: Add deprecation notice for old versions * Add option to remove notice * Remove deprecation from editor * Update * Update public/app/plugins/datasource/elasticsearch/configuration/ConfigEditor.tsx * Simplify * Update documentation * Update * Update docs/sources/datasources/elasticsearch.md Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com> Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
This commit is contained in:
parent
656cd4c8dd
commit
da1d34e83d
@ -11,6 +11,17 @@ weight = 325
|
|||||||
Grafana ships with advanced support for Elasticsearch. You can do many types of simple or complex Elasticsearch queries to
|
Grafana ships with advanced support for Elasticsearch. You can do many types of simple or complex Elasticsearch queries to
|
||||||
visualize logs or metrics stored in Elasticsearch. You can also annotate your graphs with log events stored in Elasticsearch.
|
visualize logs or metrics stored in Elasticsearch. You can also annotate your graphs with log events stored in Elasticsearch.
|
||||||
|
|
||||||
|
Supported Elasticsearch versions:
|
||||||
|
|
||||||
|
- v2.0+ (deprecated)
|
||||||
|
- v5.0+ (deprecated)
|
||||||
|
- v6.0+ (deprecated)
|
||||||
|
- v7.0-v7.9+ (deprecated)
|
||||||
|
- v7.10+
|
||||||
|
- v8.0+ (experimental)
|
||||||
|
|
||||||
|
> **Note:** Deprecated versions (v2.0+, v5.0+, v6.0+, and v7.0-v7.9+) will be removed in the next major release.
|
||||||
|
|
||||||
## Adding the data source
|
## Adding the data source
|
||||||
|
|
||||||
1. Open the side menu by clicking the Grafana icon in the top header.
|
1. Open the side menu by clicking the Grafana icon in the top header.
|
||||||
|
@ -5,6 +5,7 @@ import { Alert, DataSourceHttpSettings } from '@grafana/ui';
|
|||||||
import { config } from 'app/core/config';
|
import { config } from 'app/core/config';
|
||||||
|
|
||||||
import { ElasticsearchOptions } from '../types';
|
import { ElasticsearchOptions } from '../types';
|
||||||
|
import { isDeprecatedVersion } from '../utils';
|
||||||
|
|
||||||
import { DataLinks } from './DataLinks';
|
import { DataLinks } from './DataLinks';
|
||||||
import { ElasticDetails } from './ElasticDetails';
|
import { ElasticDetails } from './ElasticDetails';
|
||||||
@ -26,6 +27,8 @@ export const ConfigEditor = (props: Props) => {
|
|||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
const deprecatedVersion = isDeprecatedVersion(options.jsonData.esVersion);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{options.access === 'direct' && (
|
{options.access === 'direct' && (
|
||||||
@ -33,6 +36,11 @@ export const ConfigEditor = (props: Props) => {
|
|||||||
Browser access mode in the Elasticsearch datasource is deprecated and will be removed in a future release.
|
Browser access mode in the Elasticsearch datasource is deprecated and will be removed in a future release.
|
||||||
</Alert>
|
</Alert>
|
||||||
)}
|
)}
|
||||||
|
{deprecatedVersion && (
|
||||||
|
<Alert title="Deprecation notice" severity="warning">
|
||||||
|
{`Support for Elasticsearch versions after their end-of-life (currently versions < 7.10) is deprecated and will be removed in a future release.`}
|
||||||
|
</Alert>
|
||||||
|
)}
|
||||||
|
|
||||||
<DataSourceHttpSettings
|
<DataSourceHttpSettings
|
||||||
defaultUrl="http://localhost:9200"
|
defaultUrl="http://localhost:9200"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { valid } from 'semver';
|
import { valid, gte } from 'semver';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
isMetricAggregationWithField,
|
isMetricAggregationWithField,
|
||||||
@ -118,3 +118,11 @@ export const coerceESVersion = (version: string | number): string => {
|
|||||||
return '5.0.0';
|
return '5.0.0';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const isDeprecatedVersion = (version: string): boolean => {
|
||||||
|
if (gte(version, '7.10.0')) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user