Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
bd4d665d
Commit
bd4d665d
authored
Nov 21, 2017
by
THIERRY SALLE
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Elasticsearch max_concurrent_shard_requests parameter for es 5.6+
parent
b1de1e6f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
5 deletions
+17
-5
public/app/plugins/datasource/elasticsearch/config_ctrl.ts
+2
-0
public/app/plugins/datasource/elasticsearch/datasource.ts
+11
-5
public/app/plugins/datasource/elasticsearch/partials/config.html
+4
-0
No files found.
public/app/plugins/datasource/elasticsearch/config_ctrl.ts
View file @
bd4d665d
...
@@ -8,6 +8,7 @@ export class ElasticConfigCtrl {
...
@@ -8,6 +8,7 @@ export class ElasticConfigCtrl {
constructor
(
$scope
)
{
constructor
(
$scope
)
{
this
.
current
.
jsonData
.
timeField
=
this
.
current
.
jsonData
.
timeField
||
'@timestamp'
;
this
.
current
.
jsonData
.
timeField
=
this
.
current
.
jsonData
.
timeField
||
'@timestamp'
;
this
.
current
.
jsonData
.
esVersion
=
this
.
current
.
jsonData
.
esVersion
||
5
;
this
.
current
.
jsonData
.
esVersion
=
this
.
current
.
jsonData
.
esVersion
||
5
;
this
.
current
.
jsonData
.
maxConcurrentShardRequests
=
this
.
current
.
jsonData
.
maxConcurrentShardRequests
||
256
;
}
}
indexPatternTypes
=
[
indexPatternTypes
=
[
...
@@ -22,6 +23,7 @@ export class ElasticConfigCtrl {
...
@@ -22,6 +23,7 @@ export class ElasticConfigCtrl {
esVersions
=
[
esVersions
=
[
{
name
:
'2.x'
,
value
:
2
},
{
name
:
'2.x'
,
value
:
2
},
{
name
:
'5.x'
,
value
:
5
},
{
name
:
'5.x'
,
value
:
5
},
{
name
:
'5.6+'
,
value
:
56
},
];
];
indexPatternTypeChanged
()
{
indexPatternTypeChanged
()
{
...
...
public/app/plugins/datasource/elasticsearch/datasource.ts
View file @
bd4d665d
...
@@ -16,6 +16,7 @@ export class ElasticDatasource {
...
@@ -16,6 +16,7 @@ export class ElasticDatasource {
timeField
:
string
;
timeField
:
string
;
esVersion
:
number
;
esVersion
:
number
;
interval
:
string
;
interval
:
string
;
maxConcurrentShardRequests
:
number
;
queryBuilder
:
ElasticQueryBuilder
;
queryBuilder
:
ElasticQueryBuilder
;
indexPattern
:
IndexPattern
;
indexPattern
:
IndexPattern
;
...
@@ -30,6 +31,7 @@ export class ElasticDatasource {
...
@@ -30,6 +31,7 @@ export class ElasticDatasource {
this
.
esVersion
=
instanceSettings
.
jsonData
.
esVersion
;
this
.
esVersion
=
instanceSettings
.
jsonData
.
esVersion
;
this
.
indexPattern
=
new
IndexPattern
(
instanceSettings
.
index
,
instanceSettings
.
jsonData
.
interval
);
this
.
indexPattern
=
new
IndexPattern
(
instanceSettings
.
index
,
instanceSettings
.
jsonData
.
interval
);
this
.
interval
=
instanceSettings
.
jsonData
.
timeInterval
;
this
.
interval
=
instanceSettings
.
jsonData
.
timeInterval
;
this
.
maxConcurrentShardRequests
=
instanceSettings
.
jsonData
.
maxConcurrentShardRequests
;
this
.
queryBuilder
=
new
ElasticQueryBuilder
({
this
.
queryBuilder
=
new
ElasticQueryBuilder
({
timeField
:
this
.
timeField
,
timeField
:
this
.
timeField
,
esVersion
:
this
.
esVersion
,
esVersion
:
this
.
esVersion
,
...
@@ -213,11 +215,15 @@ export class ElasticDatasource {
...
@@ -213,11 +215,15 @@ export class ElasticDatasource {
}
}
getQueryHeader
(
searchType
,
timeFrom
,
timeTo
)
{
getQueryHeader
(
searchType
,
timeFrom
,
timeTo
)
{
return
angular
.
toJson
({
var
query_header
:
any
=
{
search_type
:
searchType
,
search_type
:
searchType
,
"ignore_unavailable"
:
true
,
"ignore_unavailable"
:
true
,
index
:
this
.
indexPattern
.
getIndexList
(
timeFrom
,
timeTo
),
index
:
this
.
indexPattern
.
getIndexList
(
timeFrom
,
timeTo
),
});
};
if
(
this
.
esVersion
>=
56
)
{
query_header
[
"max_concurrent_shard_requests"
]
=
this
.
maxConcurrentShardRequests
;
}
return
angular
.
toJson
(
query_header
);
}
}
query
(
options
)
{
query
(
options
)
{
...
...
public/app/plugins/datasource/elasticsearch/partials/config.html
View file @
bd4d665d
...
@@ -25,6 +25,10 @@
...
@@ -25,6 +25,10 @@
<span
class=
"gf-form-label width-9"
>
Version
</span>
<span
class=
"gf-form-label width-9"
>
Version
</span>
<select
class=
"gf-form-input gf-size-auto"
ng-model=
"ctrl.current.jsonData.esVersion"
ng-options=
"f.value as f.name for f in ctrl.esVersions"
></select>
<select
class=
"gf-form-input gf-size-auto"
ng-model=
"ctrl.current.jsonData.esVersion"
ng-options=
"f.value as f.name for f in ctrl.esVersions"
></select>
</div>
</div>
<div
class=
"gf-form max-width-30"
ng-if=
"ctrl.current.jsonData.esVersion>=56"
>
<span
class=
"gf-form-label width-15"
>
Max concurrent Shard Requests
</span>
<input
class=
"gf-form-input"
type=
"text"
ng-model=
'ctrl.current.jsonData.maxConcurrentShardRequests'
placeholder=
""
required
></input>
</div>
<div
class=
"gf-form-inline"
>
<div
class=
"gf-form-inline"
>
<div
class=
"gf-form"
>
<div
class=
"gf-form"
>
<span
class=
"gf-form-label width-9"
>
Min interval
</span>
<span
class=
"gf-form-label width-9"
>
Min interval
</span>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment