diff --git a/plugins/postgresql/postgres_queries3_ b/plugins/postgresql/postgres_queries3_ new file mode 100755 index 00000000..7909383a --- /dev/null +++ b/plugins/postgresql/postgres_queries3_ @@ -0,0 +1,111 @@ +#!/usr/bin/env perl + +# postgres_queries3: see stats on number of rows +# read, inserted, updated and deleted on a per table basis +# +# Author: +# Samuel Smith leon36 gmail com +# +# Created: +# 20140701 +# +# Usage: +# Place in /etc/munin/plugins/ (or link it there using ln -s) +# Place table names after '_' and delimit with '-' +# EX: postgres_queries3_table1-table2-table3 +# +# Parameters: +# config (required) +# conf: +# [postgres_*] +# user postgres +# +# +# General info: +# Require permission for database access and read (no writes are processed). +# Recommended user is PostgreSQL database owner. +# On debian systems install libipc-run3-perl +# +# Log info: +# 20140701 - Initial +# + + +use strict; +use IPC::Run3 qw( run3 ); + + +my %values; + +my $query = \<