Fix typo and make pg and mysql similar

This commit is contained in:
Samuel Berthe 2020-03-25 16:44:49 +01:00
parent db906f4a8c
commit 329583ac36
No known key found for this signature in database
GPG key ID: 64863511FFBD0E3C

View file

@ -302,18 +302,18 @@ groups:
doc_url: https://github.com/prometheus/mysqld_exporter doc_url: https://github.com/prometheus/mysqld_exporter
rules: rules:
- name: MySQL down - name: MySQL down
description: MySQL down on {{ $labels.instance }} description: MySQL instance is down on {{ $labels.instance }}
query: 'mysql_up == 0' query: 'mysql_up == 0'
severity: error severity: error
- name: MySQL connections number is high - name: MySQL too many connections
description: MySQL connections numbers approach the maximum number of connexion possible : more than 80% of connection are in use on {{ $labels.instance }} description: 'More than 80% of MySQL connections are in use on {{ $labels.instance }}'
query: '(mysql_global_status_threads_connected / mysql_global_variables_max_connections) * 100 > 80' query: '(mysql_global_status_threads_connected / mysql_global_variables_max_connections) * 100 > 80'
severity: error
- name: MySQL slow query count
description: MySQL server is having some slow query. The count is higher than 0 on {{ $labels.instance }}
query: '(mysql_global_status_slow_queries > 0'
severity: warning severity: warning
- name: MySQL restart - name: MySQL slow queries
description: MySQL server is having some slow queries.
query: 'mysql_global_status_slow_queries > 0'
severity: warning
- name: MySQL restarted
description: MySQL has just been restarted, less than one minute ago on {{ $labels.instance }}. description: MySQL has just been restarted, less than one minute ago on {{ $labels.instance }}.
query: 'mysql_global_status_uptime < 60' query: 'mysql_global_status_uptime < 60'
severity: warning severity: warning
@ -360,8 +360,8 @@ groups:
query: 'rate(pg_stat_database_deadlocks{datname!~"template.*|postgres"}[1m]) > 0' query: 'rate(pg_stat_database_deadlocks{datname!~"template.*|postgres"}[1m]) > 0'
severity: warning severity: warning
- name: Postgresql slow queries - name: Postgresql slow queries
description: PostgreSQL executes slow queries (> 1min) description: PostgreSQL executes slow queries
query: 'rate(pg_slow_queries[1m]) * 60 > 10' query: 'pg_slow_queries > 0'
severity: warning severity: warning
- name: Postgresql high rollback rate - name: Postgresql high rollback rate
description: Ratio of transactions being aborted compared to committed is > 2 % description: Ratio of transactions being aborted compared to committed is > 2 %