Skip to content

Commit

Permalink
Monitoring: fix dovecot rate charts, reduce storage to 60 days
Browse files Browse the repository at this point in the history
Signed-off-by: Thilo Fromm <[email protected]>
  • Loading branch information
t-lo committed Dec 14, 2023
1 parent faa9e21 commit 60352d7
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
8 changes: 4 additions & 4 deletions grafana/dashboards/dovecot.json
Original file line number Diff line number Diff line change
Expand Up @@ -297,14 +297,14 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "rate(dovecot_auth_success_total[30s])*30",
"expr": "rate(dovecot_auth_success_total[1m])*60",
"instant": false,
"legendFormat": "{{user}}",
"range": true,
"refId": "A"
}
],
"title": "Successful Authentications (1s rate, 30s avg)",
"title": "Successful Authentications (1s rate, 1m avg)",
"transformations": [],
"type": "timeseries"
},
Expand Down Expand Up @@ -616,14 +616,14 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "rate(dovecot_auth_failures_total[30s])*30",
"expr": "rate(dovecot_auth_failures_total[1m])*60",
"instant": false,
"legendFormat": "{{user}}",
"range": true,
"refId": "A"
}
],
"title": "Failed Authentications (1s rate, 30s avg)",
"title": "Failed Authentications (1s rate, 1m avg)",
"transformations": [],
"type": "timeseries"
},
Expand Down
14 changes: 7 additions & 7 deletions grafana/dashboards/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -705,14 +705,14 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "rate(dovecot_auth_success_count[30s])*30",
"expr": "rate(dovecot_auth_success_count[1m])*60",
"instant": false,
"legendFormat": "Avg. success per second",
"range": true,
"refId": "A"
}
],
"title": "Successful Authentications (1s rate, 30s avg)",
"title": "Successful Authentications (1s rate, 1m avg)",
"transformations": [],
"type": "timeseries"
},
Expand Down Expand Up @@ -1086,14 +1086,14 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "rate(dovecot_auth_failures_count[30s])*30",
"expr": "rate(dovecot_auth_failures_count[1m])*60",
"instant": false,
"legendFormat": "Avg. fails per second",
"range": true,
"refId": "A"
}
],
"title": "Failed Authentications (1s rate, 30s avg)",
"title": "Failed Authentications (1s rate, 1m avg)",
"transformations": [],
"type": "timeseries"
},
Expand Down Expand Up @@ -1611,7 +1611,7 @@
"uid": "PBFA97CFB590B2093"
},
"editorMode": "code",
"expr": "rate(dovecot_sieve_action_count[30s])*30",
"expr": "rate(dovecot_sieve_action_count[1m])*60",
"legendFormat": "Sieve actions",
"range": true,
"refId": "A"
Expand All @@ -1622,7 +1622,7 @@
"uid": "PBFA97CFB590B2093"
},
"editorMode": "code",
"expr": "rate(dovecot_sieve_error_count[30s])*30",
"expr": "rate(dovecot_sieve_error_count[1m])*60",
"hide": false,
"legendFormat": "Sieve errors",
"range": true,
Expand All @@ -1634,7 +1634,7 @@
"uid": "PBFA97CFB590B2093"
},
"editorMode": "code",
"expr": "rate(dovecot_sieve_action_duration_seconds_sum[30s])*30",
"expr": "rate(dovecot_sieve_action_duration_seconds_sum[1m])*60",
"hide": false,
"legendFormat": "Sieve action duration",
"range": true,
Expand Down
12 changes: 6 additions & 6 deletions prometheus/prometheus.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
global:
scrape_interval: 5s
evaluation_interval: 5s
scrape_interval: 30s
evaluation_interval: 30s

scrape_configs:
- job_name: 'postfix'
scrape_interval: 5s
scrape_interval: 30s
static_configs:
- targets: ['mailserver:9154']

- job_name: 'dovecot'
scrape_interval: 5s
scrape_interval: 30s
static_configs:
- targets: ['mailserver:9900']

- job_name: 'fail2ban'
scrape_interval: 5s
scrape_interval: 30s
static_configs:
- targets: ['mailserver:9191']

- job_name: 'pushgateway'
scrape_interval: 5s
scrape_interval: 30s
static_configs:
- targets: ['mailserver-prometheus-pushgateway:9091']
2 changes: 1 addition & 1 deletion systemd/start_monitoring_prometheus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ exec docker run --rm --network mailserver-monitoring-internal \
prom/prometheus:latest \
--config.file=/prometheus.yaml \
--storage.tsdb.path=/prometheus-data \
--storage.tsdb.retention.time=200d \
--storage.tsdb.retention.time=60d \
--web.enable-lifecycle

0 comments on commit 60352d7

Please sign in to comment.