Skip to content

Commit

Permalink
Add report-cassandra into monitoring (#3019)
Browse files Browse the repository at this point in the history
* Update additional-scrape-configs.yaml

* Update cassandraRules.yaml

* Update alertrules.yaml

* Update cassandraRules.yaml

* Update cassandraRules.yaml

* Update cassandraRules.yaml

* Update cassandraRules.yaml

* Update cassandraRules.yaml

* Update alertrules.yaml

* Update alertrules.yaml

* Update alertrules.yaml

* Update common.yml
  • Loading branch information
raghupathiguduri authored Dec 8, 2021
1 parent 4556a2b commit 5c6cd0e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ scrapeconfig:
metrics_path: /metrics
static_configs:
- targets: ["{{ groups['cassandra'] | difference(["localhost"]) | map('regex_replace', '^(.*)$', '\\1:8080' ) | list | join("\", \"") }}"]

{% if 'report-cassandra' in groups and groups['report-cassandra'] %}
- job_name: 'report-cassandra-exporter'
metrics_path: /metrics
static_configs:
- targets: ["{{ groups['report-cassandra'] | difference(["localhost"]) | map('regex_replace', '^(.*)$', '\\1:8080' ) | list | join("\", \"") }}"]
{% endif %}

{% if 'druid' in groups and groups['druid'] %}
- job_name: 'druid-exporter'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,21 @@ spec:
groups:
- name: alertrules.appes
rules:
- alert: cassandra_node_down_fatal
- alert: cassandra_node_down_fatal_Core
annotations:
message: cassandra_node_down_fatal
summary: {{`"There are only {{$value}}`}} < {{ .Values.cassandra_server_count }} {{` Cassandra nodes running"`}}
expr: cassandra_stats{name="org:apache:cassandra:db:storageservice:livenodes"} < {{ .Values.cassandra_server_count }}
expr: cassandra_stats{name="org:apache:cassandra:db:storageservice:livenodes",job="cassandra-exporter"} < {{ .Values.cassandra_server_count }}
for: 5m
labels:
severity: fatal
{{- if .Values.report_cassandra_server_count }}
- alert: cassandra_node_down_fatal_Report
annotations:
message: cassandra_node_down_fatal
summary: {{`"There are only {{$value}}`}} < {{ .Values.report_cassandra_server_count }} {{` Cassandra nodes running"`}}
expr: cassandra_stats{name="org:apache:cassandra:db:storageservice:livenodes",job="report-cassandra-exporter"} < {{ .Values.report_cassandra_server_count }}
for: 5m
labels:
severity: fatal
{{- end }}
3 changes: 3 additions & 0 deletions private_repo/ansible/inventory/dev/Core/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -248,3 +248,6 @@ grafana_google_oauth_client_secret: "xxxxxxxxxxxxxxxxxxxxxxxx"
# [email protected]
# [email protected]
grafana_login_whitelisted_emails: ""

Add below var to monitor report-cassandra server
report_cassandra_server_count: "{{ groups['report-cassandra'] | length }}"

0 comments on commit 5c6cd0e

Please sign in to comment.