Monitoring with SNMP

There is an SNMP agent installed on Guardium® systems, and read-only access is provided using the SNMP community name of guardiumsnmp.

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. (Use snmpget -h or snmpwalk -h to display command syntax.) Various UI-based software packages are available for displaying SNMP information. Those alternatives are not described here.

Table 1. SNMP Examples
SNMP Examples

Disk space used and available:

> 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

 

To 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

 

To list the available memory:

> snmpwalk -v 2c -c guardiumsnmp a1.corp.com memAvailReal

UCD-SNMP-MIB::memAvailReal.0 = INTEGER: 1049564

 

To 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 2. 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.