Skip to content
Snippets Groups Projects
Commit 10649589 authored by ale's avatar ale
Browse files

Add the possibility to disable smartmon in an emergency

parent c0875488
Branches
No related tags found
No related merge requests found
......@@ -6,9 +6,12 @@ import datetime
import decimal
import itertools
import re
import os
import shlex
import subprocess
GUARD_FILE = '/etc/smartmon.disable'
device_info_re = re.compile(r'^(?P<k>[^:]+?)(?:(?:\sis|):)\s*(?P<v>.*)$')
ata_error_count_re = re.compile(
......@@ -386,6 +389,10 @@ def collect_disks_smart_metrics():
def main():
# Guard file to stop this automation in an emergency.
if os.path.exists(GUARD_FILE):
sys.exit(0)
version_metric = Metric('smartctl_version', {
'version': smart_ctl_version()
}, True)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment