bundles: various fixes for telegraf plugins
Some checks failed
bundlewrap/pipeline/head There was a failure building this commit

This commit is contained in:
Franzi 2021-04-24 11:45:58 +02:00
parent a980e22ecb
commit 6772b3b5d0
Signed by: kunsi
GPG key ID: 12E3D2136B818350
11 changed files with 39 additions and 10 deletions

View file

@ -52,6 +52,9 @@ plugin {
sieve_pipe_bin_dir = /var/mail/vmail/sieve/bin sieve_pipe_bin_dir = /var/mail/vmail/sieve/bin
sieve_extensions = +vnd.dovecot.pipe sieve_extensions = +vnd.dovecot.pipe
old_stats_refresh = 30 secs
old_stats_track_cmds = yes
% if node.has_bundle('rspamd'): % if node.has_bundle('rspamd'):
sieve_before = /var/mail/vmail/sieve/global/spam-global.sieve sieve_before = /var/mail/vmail/sieve/global/spam-global.sieve
@ -122,7 +125,7 @@ protocol lmtp {
} }
protocol imap { protocol imap {
mail_plugins = $mail_plugins imap_zlib imap_sieve mail_plugins = $mail_plugins imap_zlib imap_sieve imap_old_stats
mail_max_userip_connections = 50 mail_max_userip_connections = 50
imap_idle_notify_interval = 29 mins imap_idle_notify_interval = 29 mins
} }
@ -133,3 +136,12 @@ protocol sieve {
sieve_storage = /var/mail/vmail/sieve/%d/%n/ sieve_storage = /var/mail/vmail/sieve/%d/%n/
} }
} }
% if node.has_bundle('telegraf'):
service old-stats {
inet_listener {
address = 127.0.0.1
port = 24242
}
}
% endif

View file

@ -49,7 +49,9 @@ if node.has_bundle('telegraf'):
defaults['telegraf'] = { defaults['telegraf'] = {
'input_plugins': { 'input_plugins': {
'builtin': { 'builtin': {
'dovecot': [{}], 'dovecot': [{
'type': 'global',
}],
}, },
}, },
} }

View file

@ -78,7 +78,7 @@ if node.has_bundle('telegraf'):
defaults['icinga2']['api_users']['telegraf'] = { defaults['icinga2']['api_users']['telegraf'] = {
'password': repo.vault.password_for(f'{node.name} icinga2 api telegraf'), 'password': repo.vault.password_for(f'{node.name} icinga2 api telegraf'),
'permissions': { 'permissions': {
'objects/Services', 'objects/query/Service',
}, },
} }

View file

@ -56,7 +56,7 @@ if node.has_bundle('telegraf'):
'exec': { 'exec': {
'postfix': { 'postfix': {
'commands': ['postfix-telegraf-queue'], 'commands': ['postfix-telegraf-queue'],
'interval': '15s', 'interval': '30s',
'data_format': 'influx', 'data_format': 'influx',
'timeout': '5s', 'timeout': '5s',
}, },

View file

@ -13,6 +13,9 @@ server-id=${my_hostname}
default-ttl=60 default-ttl=60
setuid=pdns
setgid=pdns
% if is_secondary: % if is_secondary:
allow-notify-from=${','.join(sorted(my_primary_servers))} allow-notify-from=${','.join(sorted(my_primary_servers))}

View file

@ -44,6 +44,9 @@ if node.has_bundle('telegraf'):
'powerdns': [{}], 'powerdns': [{}],
}, },
}, },
'additional_groups': {
'pdns',
},
} }

View file

@ -2,6 +2,7 @@ defaults = {
'apt': { 'apt': {
'packages': { 'packages': {
'smartmontools': {}, 'smartmontools': {},
'nvme-cli': {},
}, },
}, },
'icinga2_api': { 'icinga2_api': {

View file

@ -46,6 +46,9 @@ def telegraf(metadata):
}], }],
}, },
}, },
'additional_capabilities': {
'CAP_NET_ADMIN',
},
}, },
} }

View file

@ -4,11 +4,9 @@ server:
verbosity: 0 verbosity: 0
% if node.has_bundle('netdata'): % if node.has_bundle('netdata') or node.has_bundle('telegraf'):
# FIXME reenable this once debian has 1.19 statistics-interval: 1
# statistics-interval: 1 extended-statistics: yes
# extended-statistics: yes
statistics-interval: 300
% else: % else:
statistics-interval: 300 statistics-interval: 300
% endif % endif
@ -47,7 +45,7 @@ server:
tls-cert-bundle: "/etc/ssl/certs/ca-certificates.crt" tls-cert-bundle: "/etc/ssl/certs/ca-certificates.crt"
remote-control: remote-control:
% if node.has_bundle('netdata'): % if node.has_bundle('netdata') or node.has_bundle('telegraf'):
control-enable: yes control-enable: yes
% else: % else:
control-enable: no control-enable: no

View file

@ -29,9 +29,13 @@ if node.has_bundle('telegraf'):
'builtin': { 'builtin': {
'unbound': [{ 'unbound': [{
'thread_as_tag': True, 'thread_as_tag': True,
'use_sudo': True
}], }],
}, },
}, },
'sudo_commands': {
'/usr/sbin/unbound-control',
},
} }

View file

@ -38,6 +38,9 @@ if node.has_bundle('telegraf'):
'wireguard': [{}], 'wireguard': [{}],
}, },
}, },
'additional_capabilities': {
'CAP_NET_ADMIN',
},
} }