ECS: OBS: xDoctor: How to setup SNMP v2c and v3 monitoring support
Summary: Monitoring the ECS with Simple Network Management Protocol (SNMP) can be enabled for SNMP v2c or SNMP v3 depending on security requirements. The following describes how to set up snmpd servers that can be queried for node-level information, such as Memory and CPU usage. Enabling SNMP query support is an optional step and is not a requirement of ECS configuration. ...
Instructions
IMPORTANT! A new feature has been released in xDoctor 4-8.104.0 and above. This knowledge base (KB) is now automated with xDoctor. How to setup SNMP v2c and v3 monitoring support. If the script is unable to configure SNMP v2c or SNMP v3, it provides a detailed summary of its findings.
For more information, follow ECS: ObjectScale: How to run KB Automation Scripts (Auto Pilot)
- Run the automation command from the master node with xDoctor 4-8.104.0 and above.
Command:
Note: Only --target-rack is supported for this action. This script is in the xDoctor4.8-104.0 release, which features version 3.0 of the Ansible automation scripts.
# sudo xdoctor autopilot --kb 20769 --target-rack <rack-color>
Note: To list and obtain Rack colors run command:
# sudo getclusterinfo
Registered Racks
================
Ip Address epoxy seg mac seg color seg id NAN Hostname
=============== ===== ================= ========== ======= ============
169.254.1.1 False xx:xx:xx:xx:xx:00 red 1 provo-red.nanlocal
169.254.5.1 False xx:xx:xx:xx:xx:00 magenta 5 provo-magenta.nanlocal
169.254.6.1 False xx:xx:xx:xx:xx:00 cyan 6 provo-cyan.nanlocal
169.254.7.1 False xx:xx:xx:xx:xx:00 azure 7 provo-azure.nanlocal
169.254.8.1 False xx:xx:xx:xx:xx:00 violet 8 provo-violet.nanlocal
169.254.9.1 False xx:xx:xx:xx:xx:00 rose 9 provo-rose.nanlocal
169.254.10.1 False xx:xx:xx:xx:xx:00 orange 10 provo-orange.nanlocal
169.254.11.1 False xx:xx:xx:xx:xx:00 chartreuse 11 provo-chartreuse.nanlocal
Example:
admin@ecsnode1:~> sudo xdoctor autopilot --kb 20769 --target-rack red
Checking for existing screen sessions...
Starting screen session 'autopilot_kb_20769_20250626_152920'...
Screen session 'autopilot_kb_20769_20250626_152920' started successfully.
Attaching to screen session 'autopilot_kb_20769_20250626_152920'...
...
...
Using /etc/ansible/ansible.cfg as config file
VERSION: 3.0
Playbook tasks: 123
Role tasks: 28
Total tasks: 151 across 1 host(s)
PLAY [red] *****************************************************************************************************************************
Detected 8 hosts for this play.
...
...
<truncated>
2. Choose the respective SNMP v2c or v3 option Menu selection depending on SNMP configuration action.
(2) SNMP v2c
(3) SNMP v3
(0) Exit
SNMP v2c Configuration:
Example:
2.1: If configuring SNMP v2c, Type 2 in the prompt for SNMP protocol selection.
TASK [Select the SNMP version to configure] ************************************************************************************************************************************************************************************************************************************
[Select the SNMP version to configure]
*******************************************************************************
Enter the SNMP version to configure:
(2) SNMP v2c
(3) SNMP v3
(0) Exit
*******************************************************************************
2.2: Select SNMP protocol (UDP or TCP), in this example, using UDP default, Type 1 in prompt (option (1).
Example:
TASK [Select SNMP protocol to use (1) for UDP (Default) and (2) for TCP] **************************************************************************************************************************************************************************************
[Select SNMP protocol to use (1) for UDP (Default) and (2) for TCP]
*******************************************************************************
Select the protocol to use:
(1) for UDP (Default)
(2) for TCP
(0) Exit
*******************************************************************************
2.3: Select action to perform. (Review and Remove hosts or New configuration) for SNMP v2c.
Example:
- Add a new SNMP configuration to the rack using Option (1)
TASK [Select action (review and remove hosts or new configuration)] ***
[Select action (review and remove hosts or new configuration)]
*******************************************************************************
Enter the action to perform:
(1) Add new SNMP configuration to the rack
(2) Add addtional SNMP hosts to exsisting configurations
(3) Review and remove current SNMP configurations
(0) Exit
*******************************************************************************
:
2.4: Enter SNMP v2c CDIR notation (X.X.X.X./XX) or single IP (X.X.X.X) in the prompt.
Example:
TASK [Pause for CIDR or single IP input] **********************************************************************************************************************************************************************************************************************
[Pause for CIDR or single IP input]
*******************************************************************************
Please enter the CIDR notation or a single IP address.
If no input is provided, the default value of 0.0.0.0/0 will be used.
NOTICE! This default value allows access from any IP address.
*******************************************************************************
:
2.5: Enter the community string (Default: public) in prompt
Example:
TASK [Prompt for community string input] ****
[Prompt for community string input]
*******************************************************************************
Enter the community string (Default: public)
*******************************************************************************
:
public
2.6: Task Summary displays SNMP v2c Configuration details with SNMP v2c test results (snmpget).
Example:
TASK [Display summary information] **********************************************************************************************
ok: [169.254.1.2] => {
"msg": [
"*******************************************************************************",
"Summary of SNMPv2c Configuration:",
"*******************************************************************************",
"Nodes changed: ['169.254.1.2', '169.254.1.1', '169.254.1.3', '169.254.1.4', '169.254.1.5', '169.254.1.6', '169.254.1.7']",
"IP/CIDR: 0.0.0.0/0",
"Community String: public",
"IP Range: 0.0.0.0",
"Subnet Mask: 0.0.0.0",
"SNMP v2c Test Result: HOST-RESOURCES-MIB::hrSystemProcesses.0 = Gauge32: 792",
"*******************************************************************************"
]
}
3. If configuring SNMP v3, Type 3 in prompt.
Example:
TASK [Select the SNMP version to configure] ******************************************************************************
[Select the SNMP version to configure]
*******************************************************************************
Enter the SNMP version to configure:
(2) SNMP v2c
(3) SNMP v3
(0) Exit
*******************************************************************************
:
3.1: Select SNMP protocol to use (1) for UDP (Default) and (2) for TCP for SNMP V3 configuration.
Example:
TASK [Select SNMP protocol to use (1) for UDP (Default) and (2) for TCP] **************************************************************************************************************************************************************************************
[Select SNMP protocol to use (1) for UDP (Default) and (2) for TCP]
*******************************************************************************
Select the protocol to use:
(1) for UDP (Default)
(2) for TCP
(0) Exit
*******************************************************************************
:
3.2: Add the new SNMP v3 configuration to the rack. Type 1 in prompt.
Example:
TASK [Select action (review and remove hosts or new configuration)] *****************
[Select action (review and remove hosts or new configuration)]
*******************************************************************************
Enter the action to perform:
(1) Add new SNMP configuration to the rack
(0) Exit
*******************************************************************************
:
3.3: Enter SNMPv3 Authentication Passphrase: Must be at least eight characters long.
Example:
TASK [Prompt for SNMPv3 Authentication Passphrase] *****************************
[Prompt for SNMPv3 Authentication Passphrase]
*******************************************************************************
Enter SNMPv3 Authentication Passphrase: Must be at least 8 characters long
*******************************************************************************
:
3.4: Enter Authentication Protocol (MD5 or SHA) in the prompt for SNMP v3.
Example: Using option (1) SHA
TASK [Prompt for Authentication Protocol (MD5 or SHA)] ************************
[Prompt for Authentication Protocol (MD5 or SHA)]
*******************************************************************************
Enter Authentication Protocol to be used:
(1) SHA
(2) MD5
(0) Exit
*******************************************************************************
:
3.5: Enter SNMP v3 Privacy Passphrase: Must be at least eight characters long.
Example:
TASK [Prompt for Privacy Passphrase] *******************************************
[Prompt for Privacy Passphrase]
*******************************************************************************
Enter Privacy Passphrase: Must be at least 8 characters long
*******************************************************************************
:
3.6: SNMP v3 Privacy Protocol to be used.
Note: AES192 and AES256 are not supported.
Example: Using Selection (2) AES128
TASK [Prompt for Privacy Protocol to be used] *********************************
[Prompt for Privacy Protocol to be used]
*******************************************************************************
Enter Privacy Protocol to be used:
(1) DES
(2) AES128
(0) Exit
*******************************************************************************
:
3.7: Enter SNMPv3 username in the prompt.
Example:
TASK [Prompt for SNMPv3 user] ************************
[Prompt for SNMPv3 user]
Enter SNMPv3 user:
3.8: Display Summary for SNMP v3 configuration details
Example:
TASK [Display summary information] ****************************************************************************************************************************************************************************************************************************
ok: [169.254.1.2] => {
"msg": [
"*******************************************************************************",
"Summary of SNMPv3 Configuration:",
"*******************************************************************************",
"Nodes changed: ['169.254.1.2', '169.254.1.1', '169.254.1.3', '169.254.1.4', '169.254.1.5', '169.254.1.6', '169.254.1.7']",
"SNMPv3 User: ecs_user_snmpv3_test245",
"Authentication Passphrase: ChangeMe1234",
"Authentication Protocol: SHA",
"Privacy Passphrase: ChangeMe1234",
"Privacy Protocol: AES128",
"Validation from control node: HOST-RESOURCES-MIB::hrSystemProcesses.0 = Gauge32: 785",
"*******************************************************************************"
]
}
- Exiting Automation without making any configuration changes.
4. Select option 0 to exit automation without making configuration changes on various menu prompts.
Example: A
TASK [Select the SNMP version to configure] ************************************************************************************************************************************************************************************************************************************
[Select the SNMP version to configure]
*******************************************************************************
Enter the SNMP version to configure:
(2) SNMP v2c
(3) SNMP v3
(0) Exit
Example: B
TASK [Select SNMP protocol to use (1) for UDP (Default) and (2) for TCP] *******************************************************************************************************************************************************************************************************
[Select SNMP protocol to use (1) for UDP (Default) and (2) for TCP]
*******************************************************************************
Select the protocol to use:
(1) for UDP (Default)
(2) for TCP
(0) Exit
Example: C:
TASK [Prompt user to select SNMP configuration to remove] **********************************************************************************************************************************************************************************************************************
[Prompt user to select SNMP configuration to remove]
*******************************************************************************
Enter the letter of the SNMP configuration you want to remove:
(a) IP/CIDR: 10.60.18.163, Community: public
(b) IP/CIDR: 0.0.0.0/0, Community: public
(0) Exit
*******************************************************************************
Example D:
TASK [Select action (review and remove hosts or new configuration)] ************************************************************************************************************************************************************************************************************
[Select action (review and remove hosts or new configuration)]
*******************************************************************************
Enter the action to perform:
(1) Add new SNMP configuration to the rack
(0) Exit
*******************************************************************************