{% extends "base.html" %} {% from "_log_levels.html" import log_levels_form %} {% block title %}Logs · NEXXVU{% endblock %} {% block scripts %}{% endblock %} {% block content %}

Settings

Logs {{ fresh_tag("logs:ingest-lane") }}

Syslog from the inventory's devices (UDP 514). A device is set up from its Tools › Logs; these settings apply to every ecosystem and device unless an ecosystem or a device has its own.

All settings
{% include "_settings_navigation.html" %}

Logs

{% if notice %}
{{ notice }}
{% endif %} {% if error %}{% endif %} {% if not syslog %}

Logs are not available on this Portal.

{% else %} {% set r = syslog.receiver %}{% set st = r.stats or {} %} {% if tab == 'overview' %}
Receiver

{{ 'Listening on UDP 514' if r.running else 'Not running' }}

{% if not r.running %}Another program may use port 514 on this server, or the Portal was updated a moment ago.{% endif %}{% if r.running and st.tls %}

{{ 'TLS on TCP 6514' if st.tls == 'listening' else 'TLS: ' ~ st.tls }} {{ fresh_tag("logs:tls") }}

{{ st.tls_connections or 0 }} TLS connection{{ '' if st.tls_connections == 1 else 's' }}{% if st.tls_open %}, {{ st.tls_open }} open now{% endif %}{% if st.tls_refused %} · {{ st.tls_refused }} refused (not an allowed sender){% endif %}{% if st.tls_failed %} · {{ st.tls_failed }} failed (TLS or framing{% if st.tls_last_error %}; last: {{ st.tls_last_error }}{% endif %}){% endif %}{% endif %}
Received since it started

{{ st.accepted or 0 }} messages

{{ ((st.bytes or 0) / 1048576)|round(1) }} MB{% if st.started %} · since {{ st.started|replace('T', ' ')|replace('Z', ' UTC') }}{% endif %}
Not kept

{{ (st.dropped_public or 0) + (st.dropped_rate or 0) + (st.dropped_daily or 0) + (st.dropped_sources or 0) + syslog.last.over_limit + syslog.unknown|sum(attribute=1) }}

over a device's limits {{ (st.dropped_rate or 0) + (st.dropped_daily or 0) + syslog.last.over_limit }} · not in the inventory {{ syslog.unknown|sum(attribute=1) }} · public address {{ st.dropped_public or 0 }}{% if st.allowed_public is defined %} ({{ st.allowed_public }} approved internet device address{{ '' if st.allowed_public == 1 else 'es' }} accepted){% endif %}{% if st.allow_unreadable %}

The receiver cannot read its list of approved internet devices ({{ st.allow_unreadable }}): their logs are dropped. Update this Portal.

{% endif %}
Stored in

{{ 'The data server' if syslog.remote else 'This Portal' }}

{{ syslog.local_count }} messages on the Portal
Devices sending

{{ syslog.devices|selectattr('last_at')|list|length }}

See the devices
{% if syslog.last.error %}
{{ syslog.last.error }}
{% endif %}

Open the log viewer All devices, live. Each device also has a Logs tab, and each ecosystem a Logs page.

To have a device send its log here, open the device, then Tools › Logs: NEXXVU configures MikroTik, Ubuntu and Proxmox with the administrator account you enter for that step.

{% elif tab == 'rules' %}{% set rv = rules %} {% if not rv %}

Rules are not available on this Portal.

{% else %} {% set back = '/settings/logs?tab=rules' %} {% if rv.pending %}

Waiting for your approval {{ rv.pending|length }}

{% if admin %}{% with bar_id='bulk-pending' %}{% include "_address_bulk_bar.html" %}{% endwith %}{% endif %}
{% import "_ai_analysis.html" as ai with context %}{% set AIQ = ai_analysis(rv.pending|map(attribute='address')|list) %}{% for e in rv.pending %}{% endfor %}
AddressRuleMessagesWhen (UTC)Last messageDecision
{{ e.address }}{{ ai.inline(AIQ.get(e.address), e.address) }}{% if admin %}
{% with address=e.address %}{% include "_address_row_actions.html" %}{% endwith %}{% endif %}
{{ e.rule_name }}{{ e.count }}{{ e.at|replace('T', ' ')|replace('Z', '') }}{{ e.sample }} {% if admin %}
{% endif %}
{% endif %}

Rules

{% if admin %}
+ New rule
{{ fresh_tag("logs:new-rule-left") }}
{% endif %}

IF matching messages arrive N times within M minutes (per address, per device or in total) THEN NEXXVU acts: a notice, an e-mail to the administrators, watching the address, or blocking it - after your approval, or by itself if you choose. Each rule has a Preview of what it would have done with the logs already stored.

{% if rv.rules %}
{% for r in rv.rules %}{% endfor %}
RuleIfThenFiredOn
{{ r.name }}{{ r['if'] }}{{ r.then }}{{ r.triggered }}{% if r.last_triggered_at %}
{{ r.last_triggered_at|replace('T', ' ')|replace('Z', '') }}{% endif %}
{% if admin %}
{% else %}{{ 'On' if r.enabled else 'Off' }}{% endif %}
{% else %}

No rule yet. Start from one of the examples under + New rule.

{% endif %} {% if rv.recent %}

What the rules did

{% if admin %}{% with bar_id='bulk-fired' %}{% include "_address_bulk_bar.html" %}{% endwith %}{% endif %}
{% import "_ai_analysis.html" as ai with context %}{% set AIX = ai_analysis(rv.recent|map(attribute='address')|select|list) %}{% for e in rv.recent %}{% endfor %}
When (UTC)RuleForMessagesActionsStatusAddress actions
{% if e.address %}{% endif %}{{ e.at|replace('T', ' ')|replace('Z', '') }}{{ e.rule_name }}{% if e.address %}{{ e.address }}{{ ai.inline(AIX.get(e.address), e.address) }}{% else %}{{ e.group_key if e.group_key != e.asset_id else 'device' }}{% endif %}{{ e.count }}{{ e.actions|join(', ') }}{{ e.status }}{% if e.decided_by %} by {{ e.decided_by }}{% endif %}{% if admin and e.address %}{% with address=e.address %}{% include "_address_row_actions.html" %}{% endwith %}{% endif %}
{% endif %} {% if admin and (rv.pending or rv.recent) %}{% include "_address_shared_dialogs.html" %}{% endif %} {% endif %} {% elif tab == 'devices' %} {% if syslog.devices %}
{% set own = syslog.device_overrides|map(attribute='scope_id')|list %} {% for d in syslog.devices %}{% endfor %}
DeviceSends fromMessagesLast message (UTC)Own settings
{{ d.name }}{{ d.address or '—' }}{{ d.messages or 0 }}{{ (d.last_at or 'none yet')|replace('T', ' ')|replace('Z', '') }}{{ 'yes' if d.asset_id in own else '' }}
{% else %}

No device sends its log yet. Set one up from the device's Tools › Logs.

{% endif %} {% if syslog.unknown %}

Sending, but not in the inventory

These addresses send syslog here. Their messages are not kept until a device with this address is in the inventory.

{% for address, count in syslog.unknown %}{% endfor %}
AddressMessages since the Portal started
{{ address }}{{ count }}
{% endif %} {% else %}
{{ log_levels_form(syslog.settings, none, '/settings/logs', 'portal', session.csrf_token, none, admin) }}

With a data server connected, logs are stored in its logs database and kept as set on Data server › Logs; "Keep on the Portal" applies to what stays on the Portal. Documents logs follow Resources.

{% if syslog.ecosystem_overrides or syslog.device_overrides %}

With their own settings

{% endif %} {% endif %} {% endif %}
{% endblock %}