Files
FabledSteward/plugins/syslog/migrations/versions/syslog_004_device_address.py
T
bvandeusenandClaude Opus 5.5 fcd58224de
CI / lint (push) Successful in 2s
CI / unit (push) Successful in 1m32s
CI / integration (push) Successful in 1m42s
CI / publish (push) Successful in 20s
feat(syslog): a device through Docker's address is placed by its name, or a device address set on it (#6096)
The SNMP poll asks each device's sysName in the same GET and keeps it
(snmp_003_sys_name). A syslog source told apart by name finds its own
address from the SNMP device (reported or given name) or host of that
name, so its lines reach the SNMP device's and host's pages again; the
edit page gains Device address, which always wins (syslog_004).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 12:24:58 -04:00

25 lines
702 B
Python

"""Syslog: a source's own device address, for lines that come through Docker's
Revision ID: syslog_004_device_address
Revises: syslog_003_sender
Create Date: 2026-10-19
"""
from typing import Sequence, Union
import sqlalchemy as sa
from alembic import op
revision: str = "syslog_004_device_address"
down_revision: Union[str, None] = "syslog_003_sender"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
def upgrade() -> None:
op.add_column("syslog_sources",
sa.Column("device_address", sa.String(255), nullable=False, server_default=""))
def downgrade() -> None:
op.drop_column("syslog_sources", "device_address")