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