{% extends "base.html" %}
{% block content %}
{% from 'include/input_macros.html' import input, checkbox, select, copy_to_clipboard %}
{% if serv %}
{% endif %}
{% if serv %}
{% else %}
{% endif %}
{% if servers|length == 0 %}
{% include 'include/getstarted.html' %}
{% endif %}
{% for s in servers %}
{% if serv %}
{% endif %}
{% if service == 'nginx' %}
{% set checker_desc = 'Checker monitors Nginx services. If Nginx service is down, Checker will alert via Telegram' %}
{% set is_auto_start_enabled = s.8.0.17 %}
{% set is_checker_enabled = s.8.0.19 %}
{% if s.5.0.1 == 'active' %}
{% set additional_status_class = 'div-server-head-up' %}
{% else %}
{% set additional_status_class = 'div-server-head-down' %}
{% endif %}
{% elif service == 'keepalived' %}
{% if s.5.0.1 == 'active' %}
{% set additional_status_class = 'div-server-head-up' %}
{% else %}
{% set additional_status_class = 'div-server-head-down' %}
{% endif %}
{% elif service == 'haproxy' %}
{% set checker_desc = 'Checker monitors HAProxy services and its backends. If some backend or HAProxy service is down, Checker will alert via Telegram' %}
{% set is_auto_start_enabled = s.8.0.12 %}
{% set is_checker_enabled = s.8.0.8 %}
{% if s.5 != False %}
{% set additional_status_class = 'div-server-head-up' %}
{% else %}
{% set additional_status_class = 'div-server-head-down' %}
{% endif %}
{% endif %}
{% if service == 'nginx' or service == 'keepalived' %}
{% if s.5.0.1 == 'active' %}
{% else %}
{% endif %}
{% else %}
{% if s.5 != False %}
{% else %}
{% endif %}
{% endif %}
{% if not serv %}
{{s.1}}
{% else %}
{{s.1}}
{% endif %}
{% if s.6|int() >= 1 and service != 'keepalived' %}
= 1 %}
class="shield green" title="Auto start enabled">
{% else %}
class="shield red" title="Auto start enabled, but keep alive service does not work">
{% endif %}
{% endif %}
{% if s.8.0.20 == 1 %}
{% endif %}
{% if role <= 2 %}
{% if service == 'nginx' %}
{% set action_service = 'nginx' %}
{% elif service == 'keepalived' %}
{% set action_service = 'keepalived' %}
{% else %}
{% set action_service = 'hap' %}
{% endif %}
{% endif %}
{{s.3}}
{% if service == 'nginx' or service == 'keepalived' %}
Version: {{s.5.0.0}} Process_num: {{s.5.0.3}}
{% if s.5.0.1 == 'active' %}
Uptime:
{% else %}
Downtime:
{% endif %}
{{s.5.0.2}}
{% else %}
{% if s.5.0 is defined %}
{{s.5.0.0}} {{s.5.0.1}}
{{s.5.0.2}}
{% else %}
Cannot get information about HAProxy
{% endif %}
{% endif %}
Last edit:
IP: {{ copy_to_clipboard(value=s.2, style='font-weight: bold') }}
{% if s.7.0.0 != None %}
Master for: {{ s.7.0.1 }}
{% endif %}
{% if s.9.0 == '1' %}
VRRP status:
{% if s.9.1 == 'MASTER' or s.9.1 == 'BACKUP' or s.9.1 == 'INIT' or s.9.1 == 'FAULT' %}
{{s.9.1}}
{% else %}
Error
{% endif %}
{% endif %}
{% if role <= 2 and service != 'keepalived' %}
{% set id = 'alert-' + s.8.0.0|string() %}
{% if is_checker_enabled == 1 %}
{{ checkbox(id, title=checker_desc, value='1', desc='Checker', checked='checked') }}
{% else %}
{{ checkbox(id, title=checker_desc, value='1', desc='Checker') }}
{% endif %}
{% if service == 'haproxy' %}
{% set id = 'metrics-' + s.8.0.0|string() %}
{% if s.8.0.9 == 1 %}
{{ checkbox(id, title='Collecting metrics is enabled', value='1', desc='Metrics', checked='checked') }}
{% else %}
{{ checkbox(id, title='Enable collecting metrics', value='1', desc='Metrics') }}
{% endif %}
{% endif %}
{% set id = 'active-' + s.8.0.0|string() %}
{% if is_auto_start_enabled == 1 %}
{{ checkbox(id, title='Auto Start is enabled', value='1', desc='Auto Start', checked='checked') }}
{% else %}
{{ checkbox(id, title='Enable Auto Start', value='1', desc='Auto Start') }}
{% endif %}
{% endif %}
{% if service != 'keepalived' %}
Config
{% else %}
Config
{% endif %}
Compare
{% if service != 'nginx' and service != 'keepalived' %}
Map
{% endif %}
{% if service != 'keepalived' %}
StatLog
{% endif %}
{% if role <= 2 %}
Versions
{% endif %}
{% if serv %}
{% if service == 'haproxy' %}
Backends:
{% elif service == 'keepalived' %}
VRRP addresses:
{% else %}
Virtual hosts:
{% endif %}