1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +00:00

Whitespace cleanup

* remove trailing whitespace
* remove empty lines at the end of files
This commit is contained in:
Lars Kruse 2018-08-02 02:03:42 +02:00
parent ef851f0c34
commit 17f784270a
604 changed files with 2927 additions and 2945 deletions

View file

@ -1,6 +1,6 @@
#!/bin/bash
#
# plugin to monitor difference between st_last_event_ts and st_last_received_ts
# plugin to monitor difference between st_last_event_ts and st_last_received_ts
# in sl_status table (based on slony_ and slony_lag_)
#
# http://blog.endpoint.com/2009/07/slony-slstatus-and-diagnosing.html
@ -14,7 +14,7 @@
# st_last_received_event_ts: the timestamp on the sl_event in that pair
# st_lag_num_events: difference between st_last_event and st_last_received
# st_lag_time: difference between st_last_event_ts and st_last_received_ts
#
#
#
# Configuration variables:
#
@ -54,7 +54,7 @@ if [ "$1" = "config" ]; then
echo "graph_title Slony lag time for ${PGDATABASE}"
echo "graph_vlabel \${graph_period}"
psql -h ${PGHOST} -d ${PGDATABASE} -U ${PGUSER} -tc "SELECT no_id,regexp_replace(pa_conninfo, '.*host=(.*?) .*$', '\\1') FROM ${PGSCHEMA}.sl_node JOIN ${PGSCHEMA}.sl_path ON (pa_server=no_id) WHERE pa_client=${PGSCHEMA}.getlocalnodeid('${PGSCHEMA}'::name);" | while read node_id sep host
psql -h ${PGHOST} -d ${PGDATABASE} -U ${PGUSER} -tc "SELECT no_id,regexp_replace(pa_conninfo, '.*host=(.*?) .*$', '\\1') FROM ${PGSCHEMA}.sl_node JOIN ${PGSCHEMA}.sl_path ON (pa_server=no_id) WHERE pa_client=${PGSCHEMA}.getlocalnodeid('${PGSCHEMA}'::name);" | while read node_id sep host
do
test -z "${node_id}" && continue
echo "${node_id}.label ${host}"
@ -68,7 +68,7 @@ if [ "$1" = "config" ]; then
fi
psql -h ${PGHOST} -d ${PGDATABASE} -U ${PGUSER} -tc "SELECT st_received, extract(epoch FROM st_lag_time)::integer FROM ${PGSCHEMA}.sl_status ORDER BY 1;" | while read node_id sep time
do
do
test -z "${node_id}" && continue
echo "${node_id}.value ${time}"
done