Monitoring with SNMP

An SNMP agent is installed on Guardium® systems, and read-only access is provided using the SNMP community name of guardiumsnmp. You can use SNMP commands within Guardium to display SQL Guard SNMP information.

When querying, a value of -1 (minus one) indicates a NULL in the database. The table at the end of this section lists the available SNMP OIDs.

SNMP Examples

From a Unix session, you can display SQL Guard SNMP information using the snmpget or snmpwalk commands. For more information about the snmpget and snmpwalk commands, call snmpget -h or snmpwalk -h. Various UI-based software packages are available to display SNMP information. Those alternatives are not described here.

Note: For version 3 SNMP commands, the securitylevel depends on how the SNMP user is created. On the Guardium appliance, you must set securitylevel to authPriv. For authPriv, you must provide an authentication type, encryption type, authentication password and encryption password.
Table 1. SNMP 3 examples
SNMP Examples
snmpget -v 3 -u SNMPV3USER -a MD5 -A password -x AES -X password -l authPriv 9.42.101.8 UCD-SNMP-MIB::dskAvail.1
snmpget -v 3 -u SNMPV3USER -a MD5 -A password -x AES -X password -l authPriv 9.42.101.8 UCD-SNMP-MIB::dskUsed.1
 

List total memory and used memory:

snmpget -v 3 -u SNMPV3USER -a MD5 -A password -x AES -X password -l authPriv 9.42.101.8 HOST-RESOURCES-MIB::hrStorageSize.1
snmpget -v 3 -u SNMPV3USER -a MD5 -A password -x AES -X password -l authPriv 9.42.101.8 HOST-RESOURCES-MIB::hrStorageUsed.1
 

List the available memory:

snmpwalk -v 3 -u SNMPV3USER -a MD5 -A password -x AES -X password -l authPriv 9.42.101.8 UCD-SNMP-MIB::memAvailReal.0
 

List values relating to CPU usage:

snmpwalk -v 3 -u SNMPV3USER -a MD5 -A password -x AES -X password -l authPriv 9.42.101.8 ssCpuRawUser
snmpwalk -v 3 -u <user name> -a <authenticaton type <MD5|SHA>> -A <authentication password> -x <encryption type <AES|DES>> -X <encryption password> -l <securityLevel <authNoPriv | AuthPriv | noauthNoPriv>> <server with snmp v3 enabled> ssCpuRawSystem
snmpwalk -v 3 -u SNMPV3USER -a MD5 -A password -x AES -X password -l authPriv 9.42.101.8 ssCpuRawSystem
snmpwalk -v 3 -u <user name> -a <authenticaton type <MD5|SHA>> -A <authentication password> -x <encryption type <AES|DES>> -X <encryption password> -l <securityLevel <authNoPriv | AuthPriv | noauthNoPriv>> <server with snmp v3 enabled> ssCpuRawNice
snmpwalk -v 3 -u SNMPV3USER -a MD5 -A password -x AES -X password -l authPriv 9.42.101.8 ssCpuRawNice
snmpwalk -v 3 -u <user name> -a <authenticaton type <MD5|SHA>> -A <authentication password> -x <encryption type <AES|DES>> -X <encryption password> -l <securityLevel <authNoPriv | AuthPriv | noauthNoPriv>> <server with snmp v3 enabled> ssCpuRawIdle
snmpwalk -v 3 -u SNMPV3USER -a MD5 -A password -x AES -X password -l authPriv 9.42.101.8 ssCpuRawIdle
Table 2. SNMP 2c examples
SNMP Examples

Display used and available disk space :

> snmpget -v 2c -c guardiumsnmp a1.corp.com UCD-SNMP-MIB::dskAvail.1
UCD-SNMP-MIB::dskAvail.1 = INTEGER: 1043856
> snmpget -v 2c -c guardiumsnmp a1.corp.com UCD-SNMP-MIB::dskUsed.1
UCD-SNMP-MIB::dskUsed.1 = INTEGER: 914856
 

List total memory and used memory:

> snmpget -v 2c -c guardiumsnmp a1.corp.com
HOST-RESOURCES-MIB::hrStorageSize.101
HOST-RESOURCES-MIB::hrStorageSize.101 = INTEGER: 2067352
> snmpget -v 2c -c guardiumsnmp a1.corp.com HOST-RESOURCES-MIB::hrStorageUsed.101
HOST-RESOURCES-MIB::hrStorageUsed.101 = INTEGER: 1017548
 

List the available memory:

> snmpwalk -v 2c -c guardiumsnmp a1.corp.com memAvailReal
UCD-SNMP-MIB::memAvailReal.0 = INTEGER: 1049564
 

List values relating to CPU usage:

> snmpwalk -v 2c -c guardiumsnmp a1.corp.com ssCpuRawUser
UCD-SNMP-MIB::ssCpuRawUser.0 = Counter32: 89240
> snmpwalk -v 2c -c guardiumsnmp a1.corp.com ssCpuRawSystem
UCD-SNMP-MIB::ssCpuRawSystem.0 = Counter32: 195310
> snmpwalk -v 2c -c guardiumsnmp a1.corp.com ssCpuRawNice
UCD-SNMP-MIB::ssCpuRawNice.0 = Counter32: 11
Note: Adding the RawUser, RawSystem, and RawNice numbers provides a good approximation of total CPU usage.
> snmpwalk -v 2c -c guardiumsnmp a1.corp.com ssCpuRawIdle
UCD-SNMP-MIB::ssCpuRawIdle.0 = Counter32: 26734332

Guardium SNMP OID

Table 3. Guardium SNMP OID
SNMP OID Description

.1.3.6.1.4.1.2021.9.1.7.1

UCD-SNMP-MIB::dskAvail.1

Disk space available in / directory

 

.1.3.6.1.4.1.2021.9.1.7.2

UCD-SNMP-MIB::dskAvail.2

Disk space available in /var directory

 

.1.3.6.1.4.1.2021.9.1.8.1

UCD-SNMP-MIB::dskUsed.1

Disk space used in / directory

 

.1.3.6.1.4.1.2021.9.1.8.2

UCD-SNMP-MIB::dskUsed.2

Disk space used in /var directory

 

.1.3.6.1.2.1.25.2.3.1.5.1

HOST-RESOURCES-MIB::hrStorageSize.1

Total memory available

 

.1.3.6.1.2.1.25.2.3.1.6.1

HOST-RESOURCES-MIB::hrStorageUsed.1

Memory in use

 

.1.3.6.1.4.1.2021.8.1.101.1

UCD-SNMP-MIB::extOutput.1

Open monitored session count

 

.1.3.6.1.4.1.2021.8.1.101.2

UCD-SNMP-MIB::extOutput.2

Requests logged by the current sniffer process (set to zero for each restart)

 

.1.3.6.1.4.1.2021.8.1.101.3

UCD-SNMP-MIB::extOutput.3

Last session timestamp

 

.1.3.6.1.4.1.2021.8.1.101.4

UCD-SNMP-MIB::extOutput.4

Last construct timestamp

 

.1.3.6.1.4.1.2021.8.1.101.5

UCD-SNMP-MIB::extOutput.5

Memory used by the sniffer process

 

.1.3.6.1.4.1.2021.8.1.101.7

UCD-SNMP-MIB::extOutput.7

Packets in on ETH1/ out on ETH2; usually only one number (inbound) when a SPAN port or TAP is used

 

.1.3.6.1.4.1.2021.8.1.101.8

UCD-SNMP-MIB::extOutput.8

Packets in on ETH3/ out on ETH4; usually only one number (inbound) when a SPAN port or TAP is used

 

.1.3.6.1.4.1.2021.8.1.101.9

UCD-SNMP-MIB::extOutput.9

Packets in on ETH5/ out on ETH6; usually only one number (inbound) when a SPAN port or TAP is used

 

Other MIBs accessible in the machine are: SNMPv2-MIB, IF-MIB, RFC1213-MIB, and HOST-RESOURCES-MIB.