diff --git a/flask-monit/monitor.py b/flask-monit/monitor.py index c936aa6..4835c87 100644 --- a/flask-monit/monitor.py +++ b/flask-monit/monitor.py @@ -12,7 +12,7 @@ LOGGER_NAME = __name__ app = Flask(__name__) -@app.route('/', methods=['GET']) +@app.route('/health', methods=['GET']) def home_view(): # We check whether weechat is running url_regex = re.compile( @@ -30,8 +30,8 @@ def home_view(): for line in lines: if line.strip() == settings.PS_COMMAND: return 'OK\n', 200 - except subprocess.CalledProcessError as exn: - return 'Internal error: {}\n'.format(exn), 500 + except subprocess.CalledProcessError: + pass return 'Weechat not running\n', 406