Consolidate SNMP checkmk/jdisc users into single switchmon user

Replaces the separate checkmk and jdisc SNMPv3 users with one
switchmon user, updating both the settings UI and config template
generation. The operatorauth SNMP group is unchanged.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-10 08:18:05 -05:00
parent 4625e60a6b
commit 0e9effe198
+8 -20
View File
@@ -748,20 +748,12 @@
<input type="text" id="s-radius" value="4VXMKUA62QZHFG3FTYNCZ4Y">
</div>
<div class="setting-item full">
<span class="setting-label">SNMP AUTH (checkmk)</span>
<input type="text" id="s-snmp-checkmk-auth" value="2b5yJLzRhEzxtRCg">
<span class="setting-label">SNMP AUTH (switchmon)</span>
<input type="text" id="s-snmp-switchmon-auth" value="7.gIeC2zMw6E6wX7sl-2">
</div>
<div class="setting-item full">
<span class="setting-label">SNMP PRIV (checkmk)</span>
<input type="text" id="s-snmp-checkmk-priv" value="9YW7fK7Cj8msh8VV">
</div>
<div class="setting-item full">
<span class="setting-label">SNMP AUTH (jdisc)</span>
<input type="text" id="s-snmp-jdisc-auth" value="eEEfQYfquytfwghs">
</div>
<div class="setting-item full">
<span class="setting-label">SNMP PRIV (jdisc)</span>
<input type="text" id="s-snmp-jdisc-priv" value="JR9qYGXyvBeX4fN9">
<span class="setting-label">SNMP PRIV (switchmon)</span>
<input type="text" id="s-snmp-switchmon-priv" value="haQE#qYeOEl!NIqkP3As">
</div>
</div>
</div>
@@ -933,10 +925,8 @@ function cfg() {
defaultPassword: document.getElementById('s-password').value.trim(),
engineId: document.getElementById('s-engine-id').value.trim(),
radius: document.getElementById('s-radius').value.trim(),
snmpCmkAuth: document.getElementById('s-snmp-checkmk-auth').value.trim(),
snmpCmkPriv: document.getElementById('s-snmp-checkmk-priv').value.trim(),
snmpJdAuth: document.getElementById('s-snmp-jdisc-auth').value.trim(),
snmpJdPriv: document.getElementById('s-snmp-jdisc-priv').value.trim(),
snmpSwitchmonAuth: document.getElementById('s-snmp-switchmon-auth').value.trim(),
snmpSwitchmonPriv: document.getElementById('s-snmp-switchmon-priv').value.trim(),
};
}
@@ -1064,13 +1054,11 @@ function buildConfig(sw, c) {
`snmp-server company ${hostname.toUpperCase()}`,
`snmp-server contact ${asset}`,
`snmp-server location ${location}`,
`snmp-server user checkmk engine-id ${engineId} sha ${c.snmpCmkAuth} priv aes ${c.snmpCmkPriv}`,
`snmp-server user jdisc engine-id ${engineId} sha ${c.snmpJdAuth} priv aes ${c.snmpJdPriv}`,
`snmp-server user switchmon engine-id ${engineId} sha ${c.snmpSwitchmonAuth} priv aes ${c.snmpSwitchmonPriv}`,
`no snmp-server community v3 public`,
`no snmp-server community v3 private`,
`no snmp-server user default_user engine-id ${engineId} `,
`snmp-server security-to-group model v3 name checkmk group operatorauth`,
`snmp-server security-to-group model v3 name jdisc group operatorauth`,
`snmp-server security-to-group model v3 name switchmon group operatorauth`,
`no snmp-server security-to-group model v1 name public`,
`no snmp-server security-to-group model v1 name private`,
`no snmp-server security-to-group model v2c name public`,