[Pgtreats-devel] [pgtreats commit] r296 - trunk/tools/system.monitoring

svn-commit at lists.omniti.com svn-commit at lists.omniti.com
Tue Dec 6 11:22:09 EST 2011


Author: depesz
Date: 2011-12-06 11:22:09 -0500 (Tue, 06 Dec 2011)
New Revision: 296

Added:
   trunk/tools/system.monitoring/config-sample.cfg
Removed:
   trunk/tools/system.monitoring/system_monitoring-sample-config.cfg
Log:
cleanup name after repo reorganization.


Copied: trunk/tools/system.monitoring/config-sample.cfg (from rev 295, trunk/tools/system.monitoring/system_monitoring-sample-config.cfg)
===================================================================
--- trunk/tools/system.monitoring/config-sample.cfg	                        (rev 0)
+++ trunk/tools/system.monitoring/config-sample.cfg	2011-12-06 16:22:09 UTC (rev 296)
@@ -0,0 +1,99 @@
+# Global configuration, log directory
+GLOBAL.logdir=/var/log/system_monitoring/
+GLOBAL.pidfile=/var/log/system_monitoring/pidfile
+GLOBAL.env.PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+GLOBAL.env.PGUSER=postgres
+GLOBAL.env.PGDATABASE=template1
+
+GLOBAL.var.psql               = psql -qAX -F"	" -c
+GLOBAL.var.activity_query     = select now(), * from pg_stat_activity where current_query <> $$<IDLE>$$
+GLOBAL.var.locks_query        = select * FROM pg_locks
+GLOBAL.var.database_query     = SELECT *, pg_database_size(oid) as size FROM pg_database
+GLOBAL.var.indexes_query      = SELECT *, pg_relation_size(indexrelid) as size FROM pg_stat_all_indexes
+GLOBAL.var.indexes_io_query   = SELECT * FROM pg_statio_all_indexes
+GLOBAL.var.tables_query       = SELECT *, pg_table_size(relid) as size, pg_total_relation_size(relid) as total_size FROM pg_stat_all_tables
+GLOBAL.var.tables_io_query    = SELECT * FROM pg_statio_all_tables
+
+# Checks configuration
+check.iostat.type=persistent
+check.iostat.exec=iostat -kx 5
+
+check.vmstat.type=persistent
+check.vmstat.exec=vmstat 5
+
+check.mpstat.type=persistent
+check.mpstat.exec=mpstat 5
+
+check.ps.type=periodic
+check.ps.exec=ps axo user,pid,ppid,pgrp,%cpu,%mem,rss,lstart,nice,nlwp,sgi_p,cputime,tty,wchan:25,args
+check.ps.interval=30
+
+check.df.type=periodic
+check.df.exec=df -x tmpfs -x usbfs -l -P
+check.df.interval=60
+
+check.loadavg.type=periodic
+check.loadavg.exec=< /proc/loadavg
+check.loadavg.interval=10
+
+check.mem.type=periodic
+check.mem.exec=< /proc/meminfo
+check.mem.interval=10
+
+check.cpu.type=periodic
+check.cpu.exec=< /proc/stat
+check.cpu.header=/proc/stat content
+check.cpu.interval=10
+
+check.pg_stat_activity.type=periodic
+check.pg_stat_activity.exec=@psql 'COPY ( @activity_query ) TO STDOUT'
+check.pg_stat_activity.header=!@psql '@activity_query LIMIT 0' | sed -ne '1p'
+check.pg_stat_activity.interval=30
+
+check.pg_locks.type=periodic
+check.pg_locks.exec=@psql 'COPY ( @locks_query ) TO STDOUT'
+check.pg_locks.header=!@psql '@locks_query limit 0' | sed -ne '1p'
+check.pg_locks.interval=30
+
+check.pg_stat_database.type=periodic
+check.pg_stat_database.exec=@psql 'COPY ( @database_query ) TO STDOUT'
+check.pg_stat_database.header=!@psql '@database_query LIMIT 0' | sed -ne '1p'
+check.pg_stat_database.interval=300
+
+check.pg_stat_all_indexes.type=periodic
+check.pg_stat_all_indexes.exec=@psql 'COPY ( @indexes_query ) TO STDOUT'
+check.pg_stat_all_indexes.header=!@psql '@indexes_query LIMIT 0' | sed -ne '1p'
+check.pg_stat_all_indexes.interval=300
+
+check.pg_stat_all_tables.type=periodic
+check.pg_stat_all_tables.exec=@psql 'COPY ( @tables_query ) TO STDOUT'
+check.pg_stat_all_tables.header=!@psql '@tables_query LIMIT 0' | sed -ne '1p'
+check.pg_stat_all_tables.interval=300
+
+check.pg_statio_all_indexes.type=periodic
+check.pg_statio_all_indexes.exec=@psql 'COPY ( @indexes_io_query ) TO STDOUT'
+check.pg_statio_all_indexes.header=!@psql '@indexes_io_query LIMIT 0' | sed -ne '1p'
+check.pg_statio_all_indexes.interval=300
+
+check.pg_statio_all_tables.type=periodic
+check.pg_statio_all_tables.exec=@psql 'COPY ( @tables_io_query ) TO STDOUT'
+check.pg_statio_all_tables.header=!@psql '@tables_io_query LIMIT 0' | sed -ne '1p'
+check.pg_statio_all_tables.interval=300
+
+# Compress logs older than 1 hour
+check.cleanup.type=periodic
+check.cleanup.interval=300
+check.cleanup.exec=find . -type f -name '*.log' -mmin +60 -exec gzip {} +
+check.cleanup.ignore=1
+
+# Remove logs older than 2 weeks ( 14 * 24 * 60 )
+check.cleanup2.type=periodic
+check.cleanup2.interval=86400
+check.cleanup2.exec=find . -type f -name '*.log.gz' -mmin +20160 -delete
+check.cleanup2.ignore=1
+
+# Remove empty directories, left over after removed logfiles
+check.cleanup3.type=periodic
+check.cleanup3.interval=86400
+check.cleanup3.exec=find . -depth -type d -mmin +1440 -delete 2>/dev/null
+check.cleanup3.ignore=1

Deleted: trunk/tools/system.monitoring/system_monitoring-sample-config.cfg
===================================================================
--- trunk/tools/system.monitoring/system_monitoring-sample-config.cfg	2011-12-06 16:21:29 UTC (rev 295)
+++ trunk/tools/system.monitoring/system_monitoring-sample-config.cfg	2011-12-06 16:22:09 UTC (rev 296)
@@ -1,99 +0,0 @@
-# Global configuration, log directory
-GLOBAL.logdir=/var/log/system_monitoring/
-GLOBAL.pidfile=/var/log/system_monitoring/pidfile
-GLOBAL.env.PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
-GLOBAL.env.PGUSER=postgres
-GLOBAL.env.PGDATABASE=template1
-
-GLOBAL.var.psql               = psql -qAX -F"	" -c
-GLOBAL.var.activity_query     = select now(), * from pg_stat_activity where current_query <> $$<IDLE>$$
-GLOBAL.var.locks_query        = select * FROM pg_locks
-GLOBAL.var.database_query     = SELECT *, pg_database_size(oid) as size FROM pg_database
-GLOBAL.var.indexes_query      = SELECT *, pg_relation_size(indexrelid) as size FROM pg_stat_all_indexes
-GLOBAL.var.indexes_io_query   = SELECT * FROM pg_statio_all_indexes
-GLOBAL.var.tables_query       = SELECT *, pg_table_size(relid) as size, pg_total_relation_size(relid) as total_size FROM pg_stat_all_tables
-GLOBAL.var.tables_io_query    = SELECT * FROM pg_statio_all_tables
-
-# Checks configuration
-check.iostat.type=persistent
-check.iostat.exec=iostat -kx 5
-
-check.vmstat.type=persistent
-check.vmstat.exec=vmstat 5
-
-check.mpstat.type=persistent
-check.mpstat.exec=mpstat 5
-
-check.ps.type=periodic
-check.ps.exec=ps axo user,pid,ppid,pgrp,%cpu,%mem,rss,lstart,nice,nlwp,sgi_p,cputime,tty,wchan:25,args
-check.ps.interval=30
-
-check.df.type=periodic
-check.df.exec=df -x tmpfs -x usbfs -l -P
-check.df.interval=60
-
-check.loadavg.type=periodic
-check.loadavg.exec=< /proc/loadavg
-check.loadavg.interval=10
-
-check.mem.type=periodic
-check.mem.exec=< /proc/meminfo
-check.mem.interval=10
-
-check.cpu.type=periodic
-check.cpu.exec=< /proc/stat
-check.cpu.header=/proc/stat content
-check.cpu.interval=10
-
-check.pg_stat_activity.type=periodic
-check.pg_stat_activity.exec=@psql 'COPY ( @activity_query ) TO STDOUT'
-check.pg_stat_activity.header=!@psql '@activity_query LIMIT 0' | sed -ne '1p'
-check.pg_stat_activity.interval=30
-
-check.pg_locks.type=periodic
-check.pg_locks.exec=@psql 'COPY ( @locks_query ) TO STDOUT'
-check.pg_locks.header=!@psql '@locks_query limit 0' | sed -ne '1p'
-check.pg_locks.interval=30
-
-check.pg_stat_database.type=periodic
-check.pg_stat_database.exec=@psql 'COPY ( @database_query ) TO STDOUT'
-check.pg_stat_database.header=!@psql '@database_query LIMIT 0' | sed -ne '1p'
-check.pg_stat_database.interval=300
-
-check.pg_stat_all_indexes.type=periodic
-check.pg_stat_all_indexes.exec=@psql 'COPY ( @indexes_query ) TO STDOUT'
-check.pg_stat_all_indexes.header=!@psql '@indexes_query LIMIT 0' | sed -ne '1p'
-check.pg_stat_all_indexes.interval=300
-
-check.pg_stat_all_tables.type=periodic
-check.pg_stat_all_tables.exec=@psql 'COPY ( @tables_query ) TO STDOUT'
-check.pg_stat_all_tables.header=!@psql '@tables_query LIMIT 0' | sed -ne '1p'
-check.pg_stat_all_tables.interval=300
-
-check.pg_statio_all_indexes.type=periodic
-check.pg_statio_all_indexes.exec=@psql 'COPY ( @indexes_io_query ) TO STDOUT'
-check.pg_statio_all_indexes.header=!@psql '@indexes_io_query LIMIT 0' | sed -ne '1p'
-check.pg_statio_all_indexes.interval=300
-
-check.pg_statio_all_tables.type=periodic
-check.pg_statio_all_tables.exec=@psql 'COPY ( @tables_io_query ) TO STDOUT'
-check.pg_statio_all_tables.header=!@psql '@tables_io_query LIMIT 0' | sed -ne '1p'
-check.pg_statio_all_tables.interval=300
-
-# Compress logs older than 1 hour
-check.cleanup.type=periodic
-check.cleanup.interval=300
-check.cleanup.exec=find . -type f -name '*.log' -mmin +60 -exec gzip {} +
-check.cleanup.ignore=1
-
-# Remove logs older than 2 weeks ( 14 * 24 * 60 )
-check.cleanup2.type=periodic
-check.cleanup2.interval=86400
-check.cleanup2.exec=find . -type f -name '*.log.gz' -mmin +20160 -delete
-check.cleanup2.ignore=1
-
-# Remove empty directories, left over after removed logfiles
-check.cleanup3.type=periodic
-check.cleanup3.interval=86400
-check.cleanup3.exec=find . -depth -type d -mmin +1440 -delete 2>/dev/null
-check.cleanup3.ignore=1



More information about the Pgtreats-devel mailing list