bundlewrap/bundles/octoprint/metadata.py

40 lines
900 B
Python

defaults = {
'backups': {
'paths': {
'/opt/octoprint',
},
},
'users': {
'octoprint': {
'home': '/opt/octoprint',
'sudo_commands': {
'/usr/bin/vcgencmd',
'/opt/octoprint/systemd-wrapper',
},
'groups': {
'dialout',
'gpio',
},
},
},
}
@metadata_reactor
def icinga(metadata):
if not metadata.get('octoprint/api_key', None):
return {}
return {
'icinga2_api': {
'octoprint': {
'services': {
'OCTOPRINT UPDATE': {
'command_on_monitored_host': '/usr/local/share/icinga/plugins/check_octoprint_update',
'retry_interval': '60m',
},
},
},
},
}