debug: log SNMPv3 credential lengths sent to agent
Added logging to show what SNMPv3 parameters are being sent from Phoenix to the agent, including password lengths to verify they're decrypted properly.
This commit is contained in:
parent
ae64ec2576
commit
b36da6f327
1 changed files with 11 additions and 0 deletions
|
|
@ -381,6 +381,17 @@ defmodule ToweropsWeb.AgentChannel do
|
|||
end
|
||||
|
||||
defp build_v3_snmp_device(device, snmp_config) do
|
||||
# Log what we're sending to agent (mask passwords)
|
||||
Logger.info(
|
||||
"Sending SNMPv3 credentials to agent for #{device.name}: " <>
|
||||
"username=#{snmp_config.username}, " <>
|
||||
"security_level=#{snmp_config.security_level}, " <>
|
||||
"auth_protocol=#{snmp_config.auth_protocol}, " <>
|
||||
"priv_protocol=#{snmp_config.priv_protocol}, " <>
|
||||
"auth_password_length=#{if snmp_config.auth_password, do: byte_size(snmp_config.auth_password), else: 0}, " <>
|
||||
"priv_password_length=#{if snmp_config.priv_password, do: byte_size(snmp_config.priv_password), else: 0}"
|
||||
)
|
||||
|
||||
%SnmpDevice{
|
||||
ip: device.ip_address,
|
||||
version: device.snmp_version,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue