2021-03-21 09:30:04 +00:00
|
|
|
from bundlewrap.metadata import atomic
|
|
|
|
|
2020-11-14 13:05:28 +00:00
|
|
|
defaults = {
|
|
|
|
'apt': {
|
|
|
|
'packages': {
|
|
|
|
'netdata': {},
|
|
|
|
},
|
|
|
|
},
|
2020-12-21 08:50:15 +00:00
|
|
|
'icinga2_api': {
|
|
|
|
'netdata': {
|
|
|
|
'services': {
|
|
|
|
'NETDATA PROCESS': {
|
|
|
|
'command_on_monitored_host': '/usr/lib/nagios/plugins/check_procs -C netdata -c 1:',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2020-11-14 13:05:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2021-01-07 17:44:38 +00:00
|
|
|
@metadata_reactor.provides(
|
2021-03-21 09:30:04 +00:00
|
|
|
'iptables/port_rules/19999',
|
2021-01-07 17:44:38 +00:00
|
|
|
)
|
2020-11-14 13:05:28 +00:00
|
|
|
def iptables(metadata):
|
|
|
|
return {
|
|
|
|
'iptables': {
|
2021-03-21 09:30:04 +00:00
|
|
|
'port_rules': {
|
|
|
|
'19999': atomic(metadata.get('netdata/restrict-to', set('*'))),
|
2020-11-14 13:05:28 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|