feat: add SNMPv3 credential logging for debugging
Log SNMPv3 credentials being sent to agents (with passwords redacted) to help diagnose authentication issues. Shows security level, username, auth/priv protocols, and whether passwords are present.
This commit is contained in:
parent
3b0c2a36dd
commit
7f7b722965
1 changed files with 13 additions and 0 deletions
|
|
@ -490,6 +490,19 @@ defmodule ToweropsWeb.AgentChannel do
|
|||
end
|
||||
|
||||
defp build_v3_snmp_device(device, snmp_config) do
|
||||
Logger.info(
|
||||
"Building SNMPv3 device message",
|
||||
device_id: device.id,
|
||||
device_name: device.name,
|
||||
device_ip: device.ip_address,
|
||||
security_level: snmp_config.security_level || "",
|
||||
username: snmp_config.username || "",
|
||||
auth_protocol: snmp_config.auth_protocol || "",
|
||||
auth_password_present: !is_nil(snmp_config.auth_password) && snmp_config.auth_password != "",
|
||||
priv_protocol: snmp_config.priv_protocol || "",
|
||||
priv_password_present: !is_nil(snmp_config.priv_password) && snmp_config.priv_password != ""
|
||||
)
|
||||
|
||||
%SnmpDevice{
|
||||
ip: device.ip_address,
|
||||
version: device.snmp_version,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue