config.yaml lives in the project root and is optional .
A missing config.yaml fails silently
When config.yaml is absent, load_config returns built-in defaults with no
warning (src/config.py:73). Those defaults name placeholder credential slots
(network_1 through network_4) that will not match your real secrets files,
so every device fails authentication. config.yaml is commonly git-ignored,
which means this bites on fresh clones and new machines. Check it exists before
debugging anything else.
Merging is one level deep : for each top-level key present in your file,
dict.update() is applied over the defaults. A paths: block with one key keeps
the other default paths. A credentials: block replaces sets wholesale, so a
partial credentials block silently drops every set you didn’t list.
Full example, showing real defaults:
pre_check_dir : " PRE_CHECK "
post_check_dir : " POST_CHECK "
secrets_dir_linux : " /opt/automation/secrets_v3 "
secrets_dir_windows : " D: \\ Prod_Automation \\ env \\ prod \\ secrets_v3 "
file : " network_inventory.db "
ssh_client_id : " OpenSSH_9.5 "
banner_timeout : 60 # seconds
retention_days : 30 # 0 = keep forever
include_monthly_archive : true
healthcheck : # percent; >= crit -> CRIT, >= warn -> WARN
max_workers : 1 # raise this; 1 means fully sequential
bot_token : "" # or env TELEGRAM_BOT_TOKEN
chat_id : "" # or env TELEGRAM_CHAT_ID
smtp_host : "" # or env SMTP_HOST
smtp_user : "" # or env SMTP_USER
smtp_password : "" # or env SMTP_PASSWORD
from_address : "" # defaults to smtp_user
sets : # slot names, never passwords
- user : " cisco_admin_user "
password : " cisco_admin_pass "
- user : " alcatel_admin_user "
password : " alcatel_admin_pass "
vendors : # vendor -> Netmiko device_type
validation : # substrings that must appear in a valid config
Key Default Description max_workers1Parallel SSH connections. Override per run with --workers N.
Key Default Description ssh_client_id"OpenSSH_9.5"SSH client identification string announced to devices. Legacy OS SSH servers (Alcatel AOS6 on OpenSSH_5.0, Cisco IOS XR) hang up without a banner when they see paramiko’s own paramiko_<version> identifier. Set to "" to use paramiko’s default. banner_timeout60Seconds to wait for the SSH banner during handshake. auth_timeout60Seconds to wait for authentication to complete. command_timeout30Seconds to wait for a command response. write_timeout120Seconds to wait for a config write to complete.
Key Default Description retention_days30Delete backups older than this. 0 keeps all backups. include_monthly_archivetrueKeep a monthly archive copy.
Thresholds (percent) for the --healthcheck report. A metric at or over warn
reports WARN; at or over crit reports CRIT.
Key Default Description cpu_warn80CPU % warning threshold. cpu_crit90CPU % critical threshold. mem_warn85Memory % warning threshold. mem_crit95Memory % critical threshold.
Key Default Description config_dirconfigCommand files and device inventory. secrets_dir_windowsD:\Prod_Automation\env\prod\secrets_v3DPAPI credential directory. secrets_dir_linux/opt/automation/secrets_v3Credential directory on Linux. logs_dirLOGSSSH session log output. backup_dirBACKUPFull config backups. summary_dirSUMMARYPer-run summary CSVs. pre_check_dirPRE_CHECKDevice state before each change. post_check_dirPOST_CHECKDevice state after each change.
Key Default Description filenetwork_inventory.dbSQLite inventory path. Export with --export FILE.
Key Default Description enabledtrueWrite run logs. levelINFOPython logging level.
Lists credential slot names , tried in order until one authenticates. See
Credential setup for how a slot resolves and
which files the setup script creates. Never put real passwords here.
Maps a vendor column value to a Netmiko device_type. Override only if you
need a different driver for a platform.
Variable Overrides SECRETS_DIRpaths.secrets_dir_windows / paths.secrets_dir_linuxCRED_{SLOT}The file for that credential slot TELEGRAM_BOT_TOKEN, TELEGRAM_CHAT_IDTelegram notification settings SMTP_HOST, SMTP_USER, SMTP_PASSWORDEmail notification settings