{# plugins/syslog/templates/syslog/index.html — whether Steward is listening, the sources whose lines are kept, and the devices sending that haven't been added: counted, never stored, until an admin adds one (#5999). #} {% extends "base.html" %} {% from "_macros.html" import page_header, status_badge, empty_state %} {% block title %}Syslog — Steward{% endblock %} {% macro tone(level) -%}{% if level is not none and level <= 3 %}tone-crit{% elif level == 4 %}tone-warn{% endif %}{%- endmacro %} {% block content %} {% set admin = session.user_role == 'admin' %} {{ page_header("Syslog", (sources|length ~ " source" ~ ("s" if sources|length != 1 else "")) if sources else none) }}
{% if listener.error %}{{ status_badge('down', 'Not listening') }} {% elif listener.listening %}{{ status_badge('up', 'Listening') }} {% elif not listener.protocols %}{{ status_badge('inactive', 'Off') }} {% else %}{{ status_badge('pending', 'Starting') }}{% endif %}

Listener

{% if listener.protocols %}{{ listener.protocols|join(" and ") }} port {{ listener.port }}{% endif %} {% if admin %}Settings{% endif %}
{% if listener.error %}

{{ listener.error }}

Tried again every minute. Another program may hold the port, or it is below 1024, which Steward can't open: choose another in Settings.

{% elif not listener.protocols %}

UDP and TCP are both off in Settings, so nothing is received.

{% else %}

Point a device's remote syslog at this server, {{ listener.protocols|join(" or ") }} port {{ listener.port }}. {%- if listener.bound_at %} Open since {{ listener.bound_at|ago }}: {{ "{:,}".format(listener.received) }} line{{ "s" if listener.received != 1 }} received{% if listener.connections %}, {{ listener.connections }} TCP sender{{ "s" if listener.connections != 1 }} connected{% endif %}.{% endif %}

{% endif %} {% if listener.dropped %}

{{ "{:,}".format(listener.dropped) }} line{{ "s" if listener.dropped != 1 }} lost: they arrived faster than they could be read.

{% endif %} {% if listener.senders_full %}

Steward knows {{ listener.max_senders }} senders, the most it keeps; a new one is counted, not offered{% if listener.unoffered %} ({{ "{:,}".format(listener.unoffered) }} line{{ "s" if listener.unoffered != 1 }} so far){% endif %}. Remove ones you don't need.

{% endif %}
{% if offered %}

Sending, not added

These devices are sending syslog. Their lines are counted and not kept until you add them.

{% if admin %}{% endif %} {% for s in offered %} {% if admin %} {% endif %} {% endfor %}
SenderLinesLast heardNewest line
{{ s.address }}{% if s.hostname_seen %}
calls itself {{ s.hostname_seen }}
{% endif %}
{{ "{:,}".format(s.lines_total) }} {{ s.last_seen_at|ago }} {{ s.severity or "" }} {{ s.last_line or "—" }}
{{ csrf_field() }}
{{ csrf_field() }}
{% endif %}

Sources

{% if not sources %} {{ empty_state("No sources yet. Point a NAS, router or other device at this server's syslog port: it shows above as sending, and Add keeps its lines.") }} {% else %} {% if admin %}{% endif %} {% for s in sources %} {% if admin %}{% endif %} {% endfor %}
SourceHostLinesLast heardNewest line
{{ s.name }}
{{ s.address }}
{% if s.host %}{{ s.host.name }}{% else %}—{% endif %} {{ "{:,}".format(s.lines_total) }} {{ s.last_seen_at|ago }} {{ s.severity or "" }} {{ s.last_line or "—" }}Edit

Lines counts every line since the device was first heard, added or not.

{% endif %}
{% if ignored %}
Ignored ({{ ignored|length }}) {% if admin %}{% endif %} {% for s in ignored %} {% if admin %}{% endif %} {% endfor %}
SenderLinesLast heard
{{ s.address }}{% if s.hostname_seen %}
calls itself {{ s.hostname_seen }}
{% endif %}
{{ "{:,}".format(s.lines_total) }} {{ s.last_seen_at|ago }}
{{ csrf_field() }}
{% endif %} {% endblock %}