Merge ~stub/charm-telegraf:pgarchiver into ~telegraf-charmers/charm-telegraf:master

Proposed by Stuart Bishop
Status: Merged
Approved by: Stuart Bishop
Approved revision: 676caf7dbb55094dd4061f51d63fc48a561c6d4e
Merged at revision: c6b6f6880852914d18d5af1cbb8112e634b80712
Proposed branch: ~stub/charm-telegraf:pgarchiver
Merge into: ~telegraf-charmers/charm-telegraf:master
Diff against target: 22 lines (+13/-0)
1 file modified
templates/postgresql.tmpl (+13/-0)
Reviewer Review Type Date Requested Status
Joel Sing (community) +1 Approve
Canonical IS Reviewers Pending
Review via email: mp+362715@code.launchpad.net

Commit message

pg_stat_archiver PostgreSQL metrics

pg_stat_archiver provides non-streaming WAL shipping metrics

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Joel Sing (jsing) wrote :

LGTM

review: Approve (+1)
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision c6b6f6880852914d18d5af1cbb8112e634b80712

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/templates/postgresql.tmpl b/templates/postgresql.tmpl
2index db721d5..2eee7f8 100644
3--- a/templates/postgresql.tmpl
4+++ b/templates/postgresql.tmpl
5@@ -132,6 +132,19 @@
6 pg_xlog_location_diff(pg_current_xlog_insert_location(), replay_location)::integer AS lag_bytes
7 FROM pg_stat_replication"""
8 {% endif %}
9+
10+[[inputs.postgresql_extensible.query]]
11+ withdbname=false
12+ tagvalue=""
13+ version=904
14+ sqlquery="""
15+ SELECT
16+ archived_count AS archive_archived_count,
17+ EXTRACT(EPOCH FROM last_archived_time) AS archive_last_archived_time,
18+ failed_count AS archive_failed_count,
19+ EXTRACT(EPOCH FROM last_failed_time) AS archive_last_failed_time
20+ FROM pg_stat_archiver"""
21+
22 {% endif %}
23
24

Subscribers

People subscribed via source and target branches

to all changes: