monit #4

Merged
stillbeben merged 19 commits from monit into main 2022-01-04 18:25:08 +00:00
Showing only changes of commit 18b2ebbcc0 - Show all commits

View file

@ -148,6 +148,33 @@ def monitoring(metadata):
},
}
@metadata_reactor.provides(
'monit/services/nginx/http',
)
def monithttp(metadata):
http = {}
for vname, vconfig in metadata.get('nginx/vhosts', {}).items():
domain = vconfig.get('domain', vname)
if vconfig['ssl']:
scheme = 'https'
else:
scheme = 'http'
http[domain] = {
'scheme': scheme,
}
return {
'monit': {
'services': {
'nginx': {
'http': http,
},
},
},
}
@metadata_reactor.provides(
'firewall/port_rules/80',