Skip to content
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

Update platform_ec2_metrics.j2 #181

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions legend/metrics_library/metrics/platform_ec2_metrics.j2
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ panels:
formatY1: percent
targets:
{% for dimension in data %}
- query: SELECT 100 - mean(\"value\") FROM \"cpu_value\" WHERE (\"type\" = \'percent\' AND \"type_instance\" = \'idle\' AND \"host\" =~ /^{{ dimension.host }}/ AND \"type\" = \'percent\') AND $timeFilter GROUP BY time($interval), \"host\" fill(null)
- query: SELECT 100 - mean(`value`) FROM `cpu_value` WHERE (`type` = 'percent' AND `type_instance` = 'idle' AND `host` =~ /^{{ dimension.host }}/ AND `type` = 'percent') AND $timeFilter GROUP BY time($interval), `host` fill(null)
alias_by: $tag_host
ref_no: 1
{% endfor %}
Expand All @@ -29,7 +29,7 @@ panels:
formatY1: percent
targets:
{% for dimension in data %}
- query: SELECT mean(\"value\") FROM \"memory_value\" WHERE (\"type_instance\" = \'used\' AND \"host\" =~ /^{{ dimension.host }}/ AND \"type\" = \'percent\') AND $timeFilter GROUP BY time($interval), \"host\" fill(null)
- query: SELECT mean(`value`) FROM `memory_value` WHERE (`type_instance` = 'used' AND `host` =~ /^{{ dimension.host }}/ AND `type` = 'percent') AND $timeFilter GROUP BY time($interval), `host` fill(null)
alias_by: $tag_host
ref_no: 1
{% endfor %}
Expand All @@ -48,7 +48,7 @@ panels:
formatY1: percent
targets:
{% for dimension in data %}
- query: SELECT mean(\"value\") FROM \"df_value\" WHERE (\"type_instance\" = \'used\' AND \"host\" =~ /^{{ dimension.host }}/ AND \"type\" = \'percent_bytes\') AND $timeFilter GROUP BY time($interval), \"host\" fill(null)
- query: SELECT mean(`value`) FROM `df_value` WHERE (`type_instance` = 'used' AND `host` =~ /^{{ dimension.host }}/ AND `type` = 'percent_bytes') AND $timeFilter GROUP BY time($interval), `host` fill(null)
alias_by: $tag_host
ref_no: 1
{% endfor %}
Expand All @@ -66,7 +66,7 @@ panels:
description: Disk IO Read/Write Operations
targets:
{% for dimension in data %}
- query: SELECT non_negative_derivative(mean(\"value\"), 1m) FROM \"disk_read\" WHERE (\"type\" = \'disk_ops\' AND \"host\" =~ /^{{ dimension.host }}/) AND $timeFilter GROUP BY time($interval), \"host\" fill(null)
- query: SELECT non_negative_derivative(mean(`value`), 1m) FROM `disk_read` WHERE (`type` = 'disk_ops' AND `host` =~ /^{{ dimension.host }}/) AND $timeFilter GROUP BY time($interval), `host` fill(null)
alias_by: $tag_host
{% endfor %}

Expand All @@ -75,7 +75,7 @@ panels:
description: Disk IO Read/Write Operations
targets:
{% for dimension in data %}
- query: SELECT non_negative_derivative(mean(\"value\"), 1m) FROM \"disk_write\" WHERE (\"type\" = \'disk_ops\' AND \"host\" =~ /^{{ dimension.host }}/) AND $timeFilter GROUP BY time($interval), \"host\" fill(null)
- query: SELECT non_negative_derivative(mean(`value`), 1m) FROM `disk_write` WHERE (`type` = 'disk_ops' AND `host` =~ /^{{ dimension.host }}/) AND $timeFilter GROUP BY time($interval), `host` fill(null)
alias_by: $tag_host
{% endfor %}

Expand All @@ -85,7 +85,7 @@ panels:
formatY1: bytes
targets:
{% for dimension in data %}
- query: SELECT non_negative_derivative(mean(\"value\"), 1s) FROM \"interface_rx\" WHERE (\"type\" = \'if_octets\' AND \"host\" =~ /^{{ dimension.host }}/) AND $timeFilter GROUP BY time($interval), \"host\" fill(null)
- query: SELECT non_negative_derivative(mean(`value`), 1s) FROM `interface_rx` WHERE (`type` = 'if_octets' AND `host` =~ /^{{ dimension.host }}/) AND $timeFilter GROUP BY time($interval), `host` fill(null)
alias_by: $tag_host
{% endfor %}

Expand All @@ -95,7 +95,7 @@ panels:
formatY1: bytes
targets:
{% for dimension in data %}
- query: SELECT non_negative_derivative(mean(\"value\"), 1s) FROM \"interface_tx\" WHERE (\"type\" = \'if_octets\' AND \"host\" =~ /^{{ dimension.host }}/) AND $timeFilter GROUP BY time($interval), \"host\" fill(null)
- query: SELECT non_negative_derivative(mean(`value`), 1s) FROM `interface_tx` WHERE (`type` = 'if_octets' AND `host` =~ /^{{ dimension.host }}/) AND $timeFilter GROUP BY time($interval), `host` fill(null)
alias_by: $tag_host
{% endfor %}

Expand All @@ -104,6 +104,6 @@ panels:
description: CPU saturation. [https://scoutapm.com/blog/understanding-load-averages]
targets:
{% for dimension in data %}
- query: SELECT mean(\"value\") FROM \"load_longterm\" WHERE (\"type\" = \'load\' AND \"host\" =~ /^{{ dimension.host }}/) AND $timeFilter GROUP BY time($interval), \"host\" fill(null)
- query: SELECT mean(`value`) FROM `load_longterm` WHERE (`type` = 'load' AND `host` =~ /^{{ dimension.host }}/) AND $timeFilter GROUP BY time($interval), `host` fill(null)
alias_by: $tag_host
{% endfor %}