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',
|
2020-09-20 13:12:18 +00:00
|
|
|
'sudo_commands': {
|
|
|
|
'/usr/bin/vcgencmd',
|
2020-09-22 16:52:11 +00:00
|
|
|
'/opt/octoprint/systemd-wrapper',
|
2020-09-20 13:12:18 +00:00
|
|
|
},
|
2020-09-22 17:16:38 +00:00
|
|
|
'groups': {
|
2020-09-26 13:16:09 +00:00
|
|
|
'dialout',
|
2020-09-22 17:16:38 +00:00
|
|
|
'gpio',
|
|
|
|
},
|
2020-09-20 13:05:17 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
2020-11-21 19:35:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
@metadata_reactor
|
|
|
|
def icinga(metadata):
|
2020-11-22 08:07:28 +00:00
|
|
|
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',
|
2020-12-05 08:17:21 +00:00
|
|
|
'vars.notification.mail': True,
|
2020-11-21 19:35:29 +00:00
|
|
|
'retry_interval': '60m',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|