-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rework smart agent elasticsearch #542
base: master
Are you sure you want to change the base?
Changes from 5 commits
75102fb
f876839
1ab2f62
0da8270
10419a7
89ec70d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module: Elasticsearch | ||
name: heartbeat | ||
|
||
transformation: false | ||
aggregation: ".mean(by=['cluster'])" | ||
exclude_not_running_vm: true | ||
filtering: "filter('plugin', 'elasticsearch')" | ||
|
||
signals: | ||
signal: | ||
metric: elasticsearch.cluster.number-of-nodes | ||
rules: | ||
critical: |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
module: ElasticSearch | ||
name: "cluster status" | ||
aggregation: true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you have multiple clusters, this will do the transformation on all clusters 😃 |
||
transformation: ".mean(over='5m')" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do a mean on 5 minutes since thresholds are strict comparison and lasting is already set ? |
||
filtering: "filter('plugin', 'elasticsearch')" | ||
signals: | ||
signal: | ||
metric: "elasticsearch.cluster.status" | ||
rules: | ||
critical: | ||
threshold: 2 | ||
comparator: "==" | ||
description: "is red" | ||
lasting_duration: '5m' | ||
major: | ||
threshold: 1 | ||
comparator: "==" | ||
description: "is yellow" | ||
lasting_duration: '5m' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
module: ElasticSearch | ||
name: "cluster initializing shards" | ||
aggregation: true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you have multiple clusters, this will do the transformation on all clusters 😃 |
||
transformation: ".min(over='15m')" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Already managed by triggering rule |
||
filtering: "filter('plugin', 'elasticsearch')" | ||
signals: | ||
signal: | ||
metric: "elasticsearch.cluster.initializing-shards" | ||
rollup: average | ||
rules: | ||
critical: | ||
threshold: 1 | ||
comparator: ">" | ||
description: "is too high" | ||
lasting_duration: '15m' | ||
major: | ||
threshold: 0 | ||
comparator: ">" | ||
dependency: critical | ||
description: "is too high" | ||
lasting_duration: '15m' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
module: ElasticSearch | ||
name: "cluster relocating shards" | ||
aggregation: true | ||
transformation: ".min(over='15m')" | ||
filtering: "filter('plugin', 'elasticsearch')" | ||
signals: | ||
signal: | ||
metric: "elasticsearch.cluster.relocating-shards" | ||
rollup: average | ||
rules: | ||
critical: | ||
threshold: 0 | ||
comparator: ">" | ||
description: "is too high" | ||
lasting_duration: '15m' | ||
major: | ||
threshold: -1 | ||
comparator: ">" | ||
dependency: critical | ||
description: "is too high" | ||
lasting_duration: '15m' | ||
disabled: true |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
module: ElasticSearch | ||
name: "cluster unassigned shards" | ||
aggregation: true | ||
transformation: ".min(over='10m')" | ||
filtering: "filter('plugin', 'elasticsearch')" | ||
signals: | ||
signal: | ||
metric: "elasticsearch.cluster.unassigned-shards" | ||
rollup: average | ||
rules: | ||
critical: | ||
threshold: 0 | ||
comparator: ">" | ||
description: "is too high" | ||
lasting_duration: '10m' | ||
major: | ||
threshold: -1 | ||
comparator: ">" | ||
dependency: critical | ||
description: "is too high" | ||
lasting_duration: '10m' | ||
disabled: true |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
module: ElasticSearch | ||
name: "pending tasks" | ||
aggregation: true | ||
transformation: ".min(over='15m')" | ||
filtering: "filter('plugin', 'elasticsearch')" | ||
signals: | ||
signal: | ||
metric: "elasticsearch.cluster.pending-tasks" | ||
rollup: average | ||
rules: | ||
critical: | ||
threshold: 5 | ||
comparator: ">" | ||
description: "are too high" | ||
lasting_duration: '15m' | ||
major: | ||
threshold: 0 | ||
comparator: ">" | ||
dependency: critical | ||
description: "are too high" | ||
lasting_duration: '15m' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
module: ElasticSearch | ||
name: "cpu usage" | ||
aggregation: true | ||
transformation: ".min(over='30m')" | ||
filtering: "filter('node_name', '*') and filter('plugin', 'elasticsearch')" | ||
signals: | ||
signal: | ||
metric: "elasticsearch.process.cpu.percent" | ||
rollup: average | ||
rules: | ||
critical: | ||
threshold: 95 | ||
comparator: ">" | ||
description: "is too high" | ||
lasting_duration: '30m' | ||
major: | ||
threshold: 85 | ||
comparator: ">" | ||
dependency: critical | ||
description: "is too high" | ||
lasting_duration: '30m' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
module: ElasticSearch | ||
name: "file descriptors" | ||
aggregation: true | ||
transformation: ".max(over='15m')" | ||
filtering: "filter('node_name', '*') and filter('plugin', 'elasticsearch')" | ||
signals: | ||
A: | ||
metric: "elasticsearch.process.open_file_descriptors" | ||
rollup: average | ||
B: | ||
metric: "elasticsearch.process.max_file_descriptors" | ||
rollup: average | ||
signal: | ||
formula: "(A/B).scale(100)" | ||
rules: | ||
critical: | ||
threshold: 95 | ||
comparator: ">" | ||
description: "is too high" | ||
lasting_duration: '15m' | ||
major: | ||
threshold: 90 | ||
comparator: ">" | ||
dependency: critical | ||
description: "is too high" | ||
lasting_duration: '15m' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
module: ElasticSearch | ||
name: "JVM heap memory usage" | ||
aggregation: true | ||
transformation: ".mean(over='5m')" | ||
filtering: "filter('node_name', '*') and filter('plugin', 'elasticsearch')" | ||
signals: | ||
signal: | ||
metric: "elasticsearch.jvm.mem.heap-used-percent" | ||
rollup: average | ||
rules: | ||
critical: | ||
threshold: 90 | ||
comparator: ">" | ||
description: "is too high" | ||
lasting_duration: '5m' | ||
major: | ||
threshold: 80 | ||
comparator: ">" | ||
dependency: critical | ||
description: "is too high" | ||
lasting_duration: '5m' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
module: ElasticSearch | ||
name: "JVM memory young usage" | ||
aggregation: true | ||
transformation: ".mean(over='10m')" | ||
filtering: "filter('node_name', '*') and filter('plugin', 'elasticsearch')" | ||
signals: | ||
A: | ||
metric: "elasticsearch.jvm.mem.pools.young.used_in_bytes" | ||
rollup: average | ||
B: | ||
metric: "elasticsearch.jvm.mem.pools.young.max_in_bytes" | ||
rollup: average | ||
signal: | ||
formula: "(A/B).fill(0).scale(100)" | ||
rules: | ||
major: | ||
threshold: 90 | ||
comparator: ">" | ||
description: "is too high" | ||
lasting_duration: '10m' | ||
minor: | ||
threshold: 80 | ||
comparator: ">" | ||
description: "is too high" | ||
dependency: major | ||
lasting_duration: '10m' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
module: ElasticSearch | ||
name: "JVM memory old usage" | ||
aggregation: true | ||
transformation: ".mean(over='10m')" | ||
filtering: "filter('node_name', '*') and filter('plugin', 'elasticsearch')" | ||
signals: | ||
A: | ||
metric: "elasticsearch.jvm.mem.pools.old.used_in_bytes" | ||
rollup: average | ||
B: | ||
metric: "elasticsearch.jvm.mem.pools.old.max_in_bytes" | ||
rollup: average | ||
signal: | ||
formula: "(A/B).fill(0).scale(100)" | ||
rules: | ||
major: | ||
threshold: 90 | ||
comparator: ">" | ||
description: "is too high" | ||
lasting_duration: '10m' | ||
minor: | ||
threshold: 80 | ||
comparator: ">" | ||
description: "is too high" | ||
dependency: major | ||
lasting_duration: '10m' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
module: ElasticSearch | ||
name: "jvm gc old collection latency" | ||
aggregation: true | ||
transformation: ".mean(over='15m')" | ||
filtering: "filter('node_name', '*') and filter('plugin', 'elasticsearch')" | ||
signals: | ||
A: | ||
metric: "elasticsearch.jvm.gc.old-time" | ||
extrapolation: zero | ||
rollup: delta | ||
B: | ||
metric: "elasticsearch.jvm.gc.old-count" | ||
extrapolation: zero | ||
rollup: delta | ||
signal: | ||
formula: "(A/B).fill(0)" | ||
rules: | ||
major: | ||
threshold: 300 | ||
comparator: ">" | ||
description: "is too high" | ||
lasting_duration: '15m' | ||
minor: | ||
threshold: 200 | ||
comparator: ">" | ||
description: "is too high" | ||
dependency: major | ||
lasting_duration: '15m' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should use
elasticsearch.process.cpu.percent
because current metric is not present ifclusterHealthStatsMasterOnly: true