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',
|
'/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': {
|
'icinga2_api': {
|
||||||
'postgresql': {
|
'postgresql': {
|
||||||
'services': {
|
'services': {
|
||||||
|
|
|
@ -33,3 +33,8 @@ alias s='sudo -i'
|
||||||
% for k, v in sorted(node.metadata.get('bash_aliases', {}).items()):
|
% for k, v in sorted(node.metadata.get('bash_aliases', {}).items()):
|
||||||
alias ${k}='${v}'
|
alias ${k}='${v}'
|
||||||
% endfor
|
% endfor
|
||||||
|
% for k, v in sorted(node.metadata.get('bash_functions', {}).items()):
|
||||||
|
${k}() {
|
||||||
|
${v}
|
||||||
|
}
|
||||||
|
% endfor
|
||||||
|
|
Loading…
Reference in a new issue