snmpAgent

Last Updated : Jan 12, 2022 |
This API is used to view Product ID and configure snmp agent.
Prolog information
Syntax
snmpAgent view-product-id
snmpAgent add -syslocation [alphanumeric value] -contact [alphanumeric value] -v1 [true | false] -communityname1 [alphanumeric value] -v2c [true | false] -communityname2 [alphanumeric value] -v3 [true | false] -username [alphanumeric value] -authProtocol [None | MD5 | SHA] -authPassword [alphanumeric value] -privacyProtocol [None | AES | DES] -privacyPassword [alphanumeric value] -ipaccess [noAccess | specificAccess | allAccess] -multipleIPaddr ["ip1 ip2 ip3 ip4 ip5"]
Examples are as follows:
snmpAgent view-product-id
snmpAgent add -syslocation pune -contact 1234 -v1 true -communityname1 agent1 -v2c true -communityname2 agent1v2 -v3 true -username agent1v3 -authProtocol MD5 -authPassword abcd12345 -privacyProtocol  AES -privacyPassword abcd1234 -ipaccess specificAccess -multipleIPaddr "1.0.0.1 1.2.3.4 1.0.9.6"
where:
Argument
Description
view-product-id
Displays the product ID.
add
Adds or updates an SNMP agent.
authProtocol
Allowed values are: None, MD5, and SHA.
authPassword
Password length must be between 8 to 12 characters.
It must contain at least:
  • one digit
  • one uppercase alphabet
  • one lowercase alphabet
  • one special character which includes @, #, %, &, *, -, +, =, ^
The password must not contain any white spaces.
privacyProtocol
Allowed values – None, AES, and DES.
privacyPassword
The password length must be exactly 8 characters.
It must contain at least:
  • one digit
  • one uppercase alphabet
  • one lowercase alphabet
  • one special character which includes @, #, %, &, *, -, +, =, ^
The password must not contain any white spaces.
ipaccess
Allowed values – noAccess, specificAccess, and allAccess.
multipleIPaddr
Maximum of 5 IPs are allowed. If more then 1 ip is entered, make sure to enter in “x.x.x.x y.y.y.y”(within double quotes separated by space).
Return codes:
Return code
Description
4
v1 , v2c, or v3 can either be true or false.
5
community name or user name can not be left empty, if v1 ,v2c v3 is selected.
6
Password is required if protocol is not none.
7
Syslocation/contact/communityname1/communityname2c/username/ipaddress format error. Allowed values: Alphanumeric chars, underscore (_), space, dot, coma, and hyphen (-). Maximum 255 characters are allowed.
8
Auth protocol can only be either 'None', 'MD5', 'SHA'.
9
Auth password length 8 to 12 characters and alphanumeric.
10
Privacy protocol can only be either 'None', 'DES', 'AES'.
11
Privacy password length exactly 8 characters and alphanumeric.
12
Authorization protocol and password are required.
13
Execute with root user.
14
Invalid IP address.
15
More than 5 IPs are not allowed.
16
If IPaccess is specificAccess, please mention IP addresses.
17
$STANDARD_PORTS file not found.
18
firewallStdPortUpdater ACCEPT/REJECT command failed to execute.
19
'noAccess' , 'allAccess', 'specificAccess' are only allowed values for ipaccess.
20
Failed to restart service <service name>.