add postgresql metrics to telegraf/grafana
All checks were successful
bundlewrap/pipeline/head This commit looks good

This commit is contained in:
Franzi 2021-05-02 13:09:01 +02:00
parent 1bc47fa231
commit 3b1d1f7e94
Signed by: kunsi
GPG key ID: 12E3D2136B818350
3 changed files with 617 additions and 0 deletions

View file

@ -30,6 +30,33 @@ defaults = {
},
}
if node.has_bundle('telegraf'):
defaults['telegraf'] = {
'input_plugins': {
'builtin': {
'postgresql': [{
'address': repo.vault.password_for(f'{node.name} postgresql telegraf').format_into('postgres://telegraf:{}@localhost:5432/telegraf?sslmode=disable'),
'ignored_databases': [
'template0',
'template1',
],
}],
},
},
}
defaults['postgresql'].update({
'roles': {
'telegraf': {
'password': repo.vault.password_for(f'{node.name} postgresql telegraf'),
},
},
'databases': {
'telegraf': {
'owner': 'telegraf',
},
},
})
if node.has_bundle('zfs'):
defaults['zfs'] = {
'datasets': {