42 lines
1.2 KiB
Python
42 lines
1.2 KiB
Python
#!/usr/bin/env python3
|
|
# -*- coding: utf-8 -*-
|
|
"""
|
|
MAC Watcher - Configuration
|
|
"""
|
|
|
|
# --- SNMP / Switch ---
|
|
switch_ip_addr = "10.0.0.2"
|
|
switch_snmp_community = "public"
|
|
snmp_poll_interval = 30 # seconds between SNMP queries
|
|
snmpwalk_bin = "/usr/bin/snmpwalk" # full path to snmpwalk binary
|
|
|
|
# --- Email alerts ---
|
|
mail_server_domain = "smtp.maildomain.dev"
|
|
mail_server_port = 587
|
|
mail_server_password = "__PW_DB__"
|
|
mail_from_address = "sender@domain.com"
|
|
mail_from_name = "MAC-Watcher"
|
|
mail_to_address = "dummy@example.com"
|
|
mail_to_name = "Joe Doe"
|
|
|
|
# --- Trusted MAC addresses (whitelist) ---
|
|
# Case-insensitive. Normalized to uppercase at startup.
|
|
# MACs not in this list trigger an email alert.
|
|
# All MACs seen in the last SNMP readout are exposed via Prometheus regardless.
|
|
# Format: "AA:BB:CC:DD:EE:FF" # device description
|
|
trusted_mac_addresses = [
|
|
"00:EE:00:EE:40:EE", # Router
|
|
"00:EE:C2:EE:82:EE", # Smartphone
|
|
]
|
|
|
|
# --- MAC vendor lookup cache ---
|
|
vendor_cache_file = "mac_vendor_cache.json"
|
|
|
|
# --- Prometheus exporter ---
|
|
exporter_prefix = "mac_watcher_"
|
|
exporter_host = "10.0.0.12"
|
|
exporter_port = 9200
|
|
|
|
# --- Logging ---
|
|
log_level = "INFO" # DEBUG, INFO, WARNING, ERROR
|