bundlewrap/bundles/octoprint/metadata.py

43 lines
1,009 B
Python
Raw Normal View History

2020-09-20 13:05:17 +00:00
defaults = {
2020-11-13 11:37:26 +00:00
'backups': {
'paths': {
'/opt/octoprint',
},
},
2020-09-20 13:05:17 +00:00
'users': {
'octoprint': {
'home': '/opt/octoprint',
'sudo_commands': {
'/usr/bin/vcgencmd',
'/opt/octoprint/systemd-wrapper',
},
'groups': {
'dialout',
'gpio',
},
2020-09-20 13:05:17 +00:00
},
},
}
2020-11-21 19:35:29 +00:00
@metadata_reactor.provides(
'icinga2_api/octoprint/services',
)
2020-11-21 19:35:29 +00:00
def icinga(metadata):
if 'api_key' not in metadata.get('octoprint', {}):
2020-11-21 19:35:29 +00:00
return {}
return {
'icinga2_api': {
'octoprint': {
'services': {
'OCTOPRINT UPDATE': {
'command_on_monitored_host': '/usr/local/share/icinga/plugins/check_octoprint_update',
'vars.notification.mail': True,
2020-11-21 19:35:29 +00:00
'retry_interval': '60m',
},
},
},
},
}