ad4fcd1cfd
First-party plugins for Fabled Scryer (https://github.com/bvandeusen/fabledscryer). traefik: Prometheus metrics scraping, stats history, access log parsing (GeoIP optional) unifi: UniFi controller integration — WAN health, devices, clients, DPI, events ups: UPS monitoring via NUT (Network UPS Tools), Ansible shutdown automation Each plugin follows the Fabled Scryer plugin contract: setup(app), get_scheduled_tasks(), get_blueprint() index.yaml lists all three plugins in the catalog format. Populate checksum_sha256 entries once release zips are published via GitHub Releases. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
49 lines
1.7 KiB
Python
49 lines
1.7 KiB
Python
"""Traefik extended stats: bandwidth, certs, global stats
|
|
|
|
Revision ID: traefik_002_stats
|
|
Revises: traefik_001_initial
|
|
Create Date: 2026-03-19
|
|
"""
|
|
from typing import Sequence, Union
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
revision: str = "traefik_002_stats"
|
|
down_revision: Union[str, None] = "traefik_001_initial"
|
|
branch_labels: Union[str, Sequence[str], None] = None
|
|
depends_on: Union[str, Sequence[str], None] = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
op.add_column(
|
|
"traefik_metrics",
|
|
sa.Column("response_bytes_rate", sa.Float, nullable=False, server_default="0"),
|
|
)
|
|
|
|
op.create_table(
|
|
"traefik_certs",
|
|
sa.Column("serial", sa.String(255), primary_key=True),
|
|
sa.Column("cn", sa.String(512), nullable=True),
|
|
sa.Column("sans", sa.Text, nullable=True),
|
|
sa.Column("not_after", sa.DateTime(timezone=True), nullable=False),
|
|
sa.Column("scraped_at", sa.DateTime(timezone=True), nullable=False),
|
|
)
|
|
|
|
op.create_table(
|
|
"traefik_global_stats",
|
|
sa.Column("id", sa.String(36), primary_key=True),
|
|
sa.Column("scraped_at", sa.DateTime(timezone=True), nullable=False),
|
|
sa.Column("open_conns_total", sa.Float, nullable=True),
|
|
sa.Column("config_reloads_total", sa.Float, nullable=True),
|
|
sa.Column("config_last_reload_success", sa.Float, nullable=True),
|
|
sa.Column("process_memory_bytes", sa.Float, nullable=True),
|
|
)
|
|
op.create_index("ix_traefik_global_stats_scraped", "traefik_global_stats", ["scraped_at"])
|
|
|
|
|
|
def downgrade() -> None:
|
|
op.drop_index("ix_traefik_global_stats_scraped", "traefik_global_stats")
|
|
op.drop_table("traefik_global_stats")
|
|
op.drop_table("traefik_certs")
|
|
op.drop_column("traefik_metrics", "response_bytes_rate")
|