SNMP Agent Legacy
SNMP Agent Configuration For Quantastor Version older than 6.1
qs-util SNMP Utility Commands
The qs-util command line utility has a number of helper commands to make enabling SNMP and verifying the configuration easier. Here's a list of those commands, you can also run 'qs-util' at the console to see a full list of these commands. Note that you must run many of these commands as root so be sure to do a 'sudo -i' before running them.
SNMP Commands qs-util snmpenable : Configures the SNMP agent to startup automatically at system startup. qs-util snmpdisable : Configures the SNMP agent to not start automatically at system startup (default). qs-util snmpactivate : Turns on the SNMP agent qs-util snmprestart : Restarts the SNMP service and agent qs-util snmpwalkall : Walks the entire SNMP mib qs-util snmpwalkvolumes : Walks the volumes via the SNMP mib qs-util snmpwalkalerts : Walks the alerts via the SNMP mib qs-util snmpmib : Displays the contents of the SNMP mib
Configuring the SNMP Agent user account
You must edit the /etc/snmp/snmpd.conf configuration file to contain the plain text username and password for the account that will be used for communication between the SNMP agent and the QuantaStor core services. We recommend creating a 'snmpuser' account with the 'System Monitor' role so that even if someone gets the plain text password for the SNMP agent they still cannot make configuration changes to the system. If you are not logged into the web management interface you can create a new management user account at the command line like so:
qs user-add snmpuser snmppass "System Monitor" server=localhost,admin,password
Run the qs-util snmpactivate which starts the qs snmp agent and copies the correct Quantastor template /etc/snmp/snmp.conf file into place.
sudo qs-util snmpactivate
In the /etc/snmp/snmpd.conf file you will see lines in there that look like this:
createUser snmpuser MD5 snmppass DES group nmsGroup usm snmpuser
Edit the snmpd.conf file to match the new user account username and password you gave in the previous step. For example, replace 'snmpuser' with the username of the account you created via the QuantaStor manager web interface or command line interface, and replace 'snmppass' with the password you gave to that account. When the SNMP agent starts up, it will use the credentials for the first createUser entry in the snmpd.conf file for all communication with the QuantaStor service. So even if you have multiple createUser entries in the snmpd.conf file like "admin" but the first createUser entry is "snmpuser" then "snmpuser" credentials are used for all the SNMP agent to qs_service communication.
Now it is time to restart the SNMP daemon and agent like so:
sudo qs-util snmprestart