{% extends "base.html" %}
{% block content %}
{% from 'include/input_macros.html' import input, checkbox, select, copy_to_clipboard %}
{% 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 and/or Slack' %}
{% set is_auto_start_enabled = s.8.0.17 %}
{% set is_checker_enabled = s.8.0.19 %}
{% set is_metrics_enabled = s.8.0.21 %}
{% set action_service = 'nginx' %}
{% if s.5.0.1 == 'active' or s.5.0.1 == 'Up' %}
{% set additional_status_class = 'div-server-head-up' %}
{% else %}
{% set additional_status_class = 'div-server-head-down' %}
{% endif %}
{% elif service == 'keepalived' %}
{% set checker_desc = 'Checker monitors Keepalived services. If Keepalived service is down, Checker will alert via Telegram and/or Slack' %}
{% set is_auto_start_enabled = s.8.0.22 %}
{% set action_service = 'keepalived' %}
{% set is_checker_enabled = s.8.0.23 %}
{% 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 == 'apache' %}
{% set checker_desc = 'Checker monitors Apache services. If Apache service is down, Checker will alert via Telegram and/or Slack' %}
{% set is_auto_start_enabled = s.8.0.25 %}
{% set action_service = 'apache' %}
{% set is_checker_enabled = s.8.0.26 %}
{% set is_metrics_enabled = s.8.0.27 %}
{% if 'Apache' in s.4.0 %}
{% 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, its backends and maxconn. If some backend or HAProxy service is down, Checker will alert via Telegram and/or Slack' %}
{% set is_auto_start_enabled = s.8.0.12 %}
{% set is_checker_enabled = s.8.0.8 %}
{% set is_metrics_enabled = s.8.0.9 %}
{% set action_service = 'hap' %}
{% if s.5 != False %}
{% set additional_status_class = 'div-server-head-up' %}
{% else %}
{% set additional_status_class = 'div-server-head-down' %}
{% endif %}
{% endif %}
{% if not serv %}
{{s.1}}
{% else %}
{{s.1}}
{% endif %}
{% if s.6|int() >= 1 %}
= 1 %}
class="shield green" title="Autostart is enabled">
{% else %}
class="shield red" title="Autostart is enabled, but Keep alive service is not running">
{% endif %}
{% endif %}
{% if s.8.0.20 == 1 %}
{% endif %}
{% for set in service_settings %}
{% if set.server_id == s.0 and set.setting == 'dockerized' and set.value == '1' %}
{% endif %}
{% endfor %}
{% if role <= 3 %}
{% if service != 'keepalived' %}
{% endif %}
{% endif %}
{% if s.3 is none %}
No description
{% else %}
{{s.3}}
{% endif %}
{% if service == 'nginx' or service == 'keepalived' %}
Version: {{s.5.0.0}} Process_num: {{s.5.0.3}}
{% if s.5.0.1 == 'active' or s.5.0.1 == 'Up' %}
Started:
{% else %}
Stopped:
{% endif %}
{{s.5.0.2}}
{% elif service == 'apache' %}
{% if s.4.0 is defined %}
{{s.4.0.split(' ')[0].split('Server')[1]}} {{s.4.0.split(' ')[1]}} {{s.4.2}}
{{s.4.1.split(' ')[0].split('Server')[1]}} {% for i in s.4.1.split(' ')[1:5] %} {{i}}{% endfor %}
{% else %}
Cannot get information about Apache
{% endif %}
{% 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: {{ copy_to_clipboard(value=s.7.0.1, style='font-weight: bold') }}
{% endif %}
{% if s.9.0 == '1' %}
VRRP:
{% 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 %}
{% 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 %}
{% endif %}
{% if role <= 2 and service != 'keepalived' and service != 'apache' %}
{% set id = 'metrics-' + s.8.0.0|string() %}
{% if is_metrics_enabled == 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 %}
{% if role <= 2 and service != 'apache' %}
{% 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 == 'nginx' or service == 'apache' %}
Configs
{% else %}
Config
{% endif %}
Compare
{% if service != 'nginx' and service != 'keepalived' and service != 'apache' %}
Map
{% endif %}
{% if service != 'keepalived' and service != 'apache' %}
Stat
{% endif %}
{% if service != 'keepalived' %}
Logs
{% endif %}
{% if role <= 2 %}
Versions
{% endif %}
{% if serv %}
{% if service == 'haproxy' %}
Backends:
{% elif service == 'keepalived' %}
VRRP addresses:
{% else %}
Virtual hosts:
{% endif %}
{% endif %}
{% endfor %}
{% if serv %}
{% if service == 'haproxy' or service == 'nginx' %}
Time range:
{% endif %}
{% for s in servers %}
{% if service == 'haproxy' %}