add postgresql metrics to telegraf/grafana
All checks were successful
bundlewrap/pipeline/head This commit looks good
All checks were successful
bundlewrap/pipeline/head This commit looks good
This commit is contained in:
parent
1bc47fa231
commit
3b1d1f7e94
3 changed files with 617 additions and 0 deletions
|
@ -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': {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue