home.hass add metadata
This commit is contained in:
parent
c407a4520a
commit
107fd6872b
2 changed files with 58 additions and 1 deletions
|
@ -21,3 +21,44 @@ defaults = {
|
|||
},
|
||||
},
|
||||
}
|
||||
@metadata_reactor.provides(
|
||||
'icinga2_api/homeassistant/services/HOMESSISTANT UPDATE',
|
||||
)
|
||||
def icinga_check_for_new_release(metadata):
|
||||
return {
|
||||
'icinga2_api': {
|
||||
'homeassistant': {
|
||||
'services': {
|
||||
'HOMEASSISTANT UPDATE': {
|
||||
'command_on_monitored_host': '/usr/local/share/icinga/plugins/check_github_for_new_release homeassistant/core {}'.format(metadata.get('homeassistant/version')),
|
||||
'vars.notification.mail': True,
|
||||
'check_interval': '60m',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@metadata_reactor.provides(
|
||||
'nginx/vhosts/homeassistant',
|
||||
)
|
||||
def nginx(metadata):
|
||||
if not node.has_bundle('nginx'):
|
||||
raise DoNotRunAgain
|
||||
|
||||
return {
|
||||
'nginx': {
|
||||
'vhosts': {
|
||||
'homeassistant': {
|
||||
'domain': metadata.get('homeassistant/domain'),
|
||||
'website_check_path': '/',
|
||||
'website_check_string': 'Homeassistant',
|
||||
'locations': {
|
||||
'/': {
|
||||
'target': 'http://127.0.0.1:8123',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue