bundles/postgresql: add pg_query_mon
This commit is contained in:
parent
56ff2a794f
commit
1ac6559b9f
2 changed files with 8 additions and 0 deletions
|
@ -7,6 +7,9 @@ defaults = {
|
|||
'/var/tmp/postgresdumps',
|
||||
},
|
||||
},
|
||||
'bash_functions': {
|
||||
'pg_query_mon': "watch -n 2 \"echo \\\"SELECT pid, age(clock_timestamp(), query_start), usename, query FROM pg_stat_activity WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' ORDER BY query_start desc;\\\" | psql postgres\""
|
||||
},
|
||||
'icinga2_api': {
|
||||
'postgresql': {
|
||||
'services': {
|
||||
|
|
|
@ -33,3 +33,8 @@ alias s='sudo -i'
|
|||
% for k, v in sorted(node.metadata.get('bash_aliases', {}).items()):
|
||||
alias ${k}='${v}'
|
||||
% endfor
|
||||
% for k, v in sorted(node.metadata.get('bash_functions', {}).items()):
|
||||
${k}() {
|
||||
${v}
|
||||
}
|
||||
% endfor
|
||||
|
|
Loading…
Reference in a new issue