Skip to content

bugcy013/pgstatmib

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PostgreSQL Statistics MIB for SNMP
==================================

pgStatMIB ::= { iso(1) org(3) dod(6) internet(1) private(4) enterprises(1) pgsql(27645) 3 }

enterprises.pgsql.pgStatMIB => 1.3.6.1.4.1.27645.3


MIB Tree Designed so Far
------------------------

enterprises.pgsql (1.3.6.1.4.1.27645)
|
+--pgStatMIB(3)
   |
   +--pgstatServer(1)
   |  |
   |  +-- -R-- Integer32 pgstatServerDatabaseCount(1)
   |  +-- -R-- Unsigned  pgstatServerTotalSize(2)
   |  +-- -R-- Gauge     pgstatServerTotalBackends(3)
   |  +-- -R-- Counter   pgstatServerTotalCommits(4)
   |  +-- -R-- Counter   pgstatServerTotalRollbacks(5)
   |  +-- -R-- Counter   pgstatServerTotalBlocksRead(6)
   |  +-- -R-- Counter   pgstatServerTotalBlocksHit(7)
   |  +-- -R-- Unsigned  pgstatServerRollbackRatio(8)
   |  |        Range: 0..10000
   |  +-- -R-- Unsigned  pgstatServerCacheHitRatio(9)
   |           Range: 0..10000
   |
   +--pgstatDatabase(2)
   |  |
   |  +--pgstatDatabaseEntry(1)
   |     |  Index: pgstatDatabaseId
   |     |
   |     +-- -R-- Integer32 pgstatDatabaseId(1)
   |     |        Range: 1..2147483647
   |     +-- -R-- String    pgstatDatabaseName(2)
   |     |        Textual Convention: DisplayString
   |     |        Size: 0..64
   |     +-- -R-- Gauge     pgstatDatabaseBackends(3)
   |     +-- -R-- Counter   pgstatDatabaseCommits(4)
   |     +-- -R-- Counter   pgstatDatabaseRollbacks(5)
   |     +-- -R-- Counter   pgstatDatabaseBlocksRead(6)
   |     +-- -R-- Counter   pgstatDatabaseBlocksHit(7)
   |     +-- -R-- Counter   pgstatDatabaseTuplesReturned(8)
   |     +-- -R-- Counter   pgstatDatabaseTuplesFetched(9)
   |     +-- -R-- Counter   pgstatDatabaseTuplesInserted(10)
   |     +-- -R-- Counter   pgstatDatabaseTuplesUpdated(11)
   |     +-- -R-- Counter   pgstatDatabaseTuplesDeleted(12)
   |     +-- -R-- Unsigned  pgstatDatabaseRollbackRatio(21)
   |     |        Range: 0..10000
   |     +-- -R-- Unsigned  pgstatDatabaseCacheHitRatio(22)
   |     |        Range: 0..10000
   |     +-- -R-- Counter   pgstatDatabaseTuplesModified(23)
   |
   +--pgstatBgWriter(10)
      |
      +-- -R-- Counter   pgstatBgWriterCheckpointsTimed(1)
      +-- -R-- Counter   pgstatBgWriterCheckpointsRequested(2)
      +-- -R-- Counter   pgstatBgWriterBuffersCheckpoint(3)
      +-- -R-- Counter   pgstatBgWriterBuffersClean(4)
      +-- -R-- Counter   pgstatBgWriterMaxWrittenClean(5)
      +-- -R-- Counter   pgstatBgWriterBuffersBackend(6)
      +-- -R-- Counter   pgstatBgWriterBuffersAllocated(7)


Usage Samples
-------------

$ snmpget localhost pgstatServerRollbackRatio.0 pgstatServerCacheHitRatio.0
PGSTAT-MIB::pgstatServerRollbackRatio.0 = Gauge32: 0
PGSTAT-MIB::pgstatServerCacheHitRatio.0 = Gauge32: 9979

$ snmpwalk localhost pgstatServer
PGSTAT-MIB::pgstatServerDatabaseCount.0 = INTEGER: 6
PGSTAT-MIB::pgstatServerTotalSize.0 = Gauge32: 77145528
PGSTAT-MIB::pgstatServerTotalBackends.0 = Gauge32: 1
PGSTAT-MIB::pgstatServerTotalCommits.0 = Counter32: 733954
PGSTAT-MIB::pgstatServerTotalRollbacks.0 = Counter32: 8
PGSTAT-MIB::pgstatServerTotalBlocksRead.0 = Counter32: 12042
PGSTAT-MIB::pgstatServerTotalBlocksHit.0 = Counter32: 5653678
PGSTAT-MIB::pgstatServerRollbackRatio.0 = Gauge32: 0
PGSTAT-MIB::pgstatServerCacheHitRatio.0 = Gauge32: 9979

$ snmpwalk localhost pgstatDatabase
PGSTAT-MIB::pgstatDatabaseId.16385 = INTEGER: 16385
PGSTAT-MIB::pgstatDatabaseId.31490 = INTEGER: 31490
PGSTAT-MIB::pgstatDatabaseName.16385 = STRING: rodrigo
PGSTAT-MIB::pgstatDatabaseName.31490 = STRING: bench
PGSTAT-MIB::pgstatDatabaseBackends.16385 = Gauge32: 1
PGSTAT-MIB::pgstatDatabaseBackends.31490 = Gauge32: 50
PGSTAT-MIB::pgstatDatabaseCommits.16385 = Counter32: 5481
PGSTAT-MIB::pgstatDatabaseCommits.31490 = Counter32: 32843
PGSTAT-MIB::pgstatDatabaseRollbacks.16385 = Counter32: 0
PGSTAT-MIB::pgstatDatabaseRollbacks.31490 = Counter32: 6
PGSTAT-MIB::pgstatDatabaseBlocksRead.16385 = Counter32: 416
PGSTAT-MIB::pgstatDatabaseBlocksRead.31490 = Counter32: 8015
PGSTAT-MIB::pgstatDatabaseBlocksHit.16385 = Counter32: 89343
PGSTAT-MIB::pgstatDatabaseBlocksHit.31490 = Counter32: 1486061
PGSTAT-MIB::pgstatDatabaseTuplesReturned.16385 = Counter32: 1524714
PGSTAT-MIB::pgstatDatabaseTuplesReturned.31490 = Counter32: 1365789
PGSTAT-MIB::pgstatDatabaseTuplesFetched.16385 = Counter32: 11013
PGSTAT-MIB::pgstatDatabaseTuplesFetched.31490 = Counter32: 324244
PGSTAT-MIB::pgstatDatabaseTuplesInserted.16385 = Counter32: 0
PGSTAT-MIB::pgstatDatabaseTuplesInserted.31490 = Counter32: 127745
PGSTAT-MIB::pgstatDatabaseTuplesUpdated.16385 = Counter32: 0
PGSTAT-MIB::pgstatDatabaseTuplesUpdated.31490 = Counter32: 82903
PGSTAT-MIB::pgstatDatabaseTuplesDeleted.16385 = Counter32: 0
PGSTAT-MIB::pgstatDatabaseTuplesDeleted.31490 = Counter32: 0
PGSTAT-MIB::pgstatDatabaseSize.16385 = Gauge32: 5407012
PGSTAT-MIB::pgstatDatabaseSize.31490 = Gauge32: 42672420
PGSTAT-MIB::pgstatDatabaseRollbackRatio.16385 = Gauge32: 0
PGSTAT-MIB::pgstatDatabaseRollbackRatio.31490 = Gauge32: 2
PGSTAT-MIB::pgstatDatabaseCacheHitRatio.16385 = Gauge32: 9954
PGSTAT-MIB::pgstatDatabaseCacheHitRatio.31490 = Gauge32: 9946
PGSTAT-MIB::pgstatDatabaseTuplesModified.16385 = Counter32: 0
PGSTAT-MIB::pgstatDatabaseTuplesModified.31490 = Counter32: 210648

$ snmpget localhost pgstatDatabaseBackends.16448 -On
.1.3.6.1.4.1.27645.3.2.1.3.16448 = Gauge32: 10

$ snmpget localhost pgstatDatabaseRollbacks.11874 -Of
.iso.org.dod.internet.private.enterprises.pgsql.pgStatMIB.pgstatDatabaseTable.pgstatDatabaseEntry.pgstatDatabaseRollbacks.11874 = Counter32: 100

$ snmptable localhost -Cl -CB -Ci -OX -Cb -Cc 16 -Cw 80 pgstatDatabaseTable
SNMP table: PGSTAT-MIB::pgstatDatabaseTable

Id              Name            Backends        Commits         Rollbacks       
BlocksRead      BlocksHit       TuplesReturned  TuplesFetched   TuplesInserted  
TuplesUpdated   TuplesDeleted   Size            RollbackRatio   CacheHitRatio   
TuplesModified  

index: [11564]
11564           postgres        1               5536            0               
577             93815           1527457         13737           0               
0               0               5407012         0               9939            
0               

index: [16385]
16385           rodrigo         0               5481            0               
416             89343           1524714         11013           0               
0               0               5407012         0               9954            
0               

index: [31490]
31490           bench           0               32843           6               
8015            1486061         1365789         324244          127745          
82903           0               42672420        2               9946            
210648          

$ snmpwalk localhost pgstatBgWriter
PGSTAT-MIB::pgstatBgWriterCheckpointsTimed.0 = Counter32: 544
PGSTAT-MIB::pgstatBgWriterCheckpointsRequested.0 = Counter32: 6
PGSTAT-MIB::pgstatBgWriterBuffersCheckpoint.0 = Counter32: 11347
PGSTAT-MIB::pgstatBgWriterBuffersClean.0 = Counter32: 0
PGSTAT-MIB::pgstatBgWriterMaxWrittenClean.0 = Counter32: 0
PGSTAT-MIB::pgstatBgWriterBuffersBackend.0 = Counter32: 6754
PGSTAT-MIB::pgstatBgWriterBuffersAllocated.0 = Counter32: 7450

$ snmpget localhost pgstatBgWriterCheckpointsRequested.0
PGSTAT-MIB::pgstatBgWriterCheckpointsRequested.0 = Counter32: 6

$ snmpgetnext localhost pgstatBgWriterBuffersCheckpoint
PGSTAT-MIB::pgstatBgWriterBuffersCheckpoint.0 = Counter32: 11347


Status of Expected Sub-Trees
----------------------------

pgstatServer: DONE!

pgstatDatabases: still need data caching

pgstatAllTables
pgstatSysTables
pgstatUsrTables: specified

pgstatIOAllTables
pgstatIOSysTables
pgstatIOUsrTables

pgstatAllIndexes
pgstatSysIndexes
pgstatUsrIndexes: specified

pgstatIOAllIndexes
pgstatIOSysIndexes
pgstatIOUsrIndexes

pgstatIOAllSequences
pgstatIOSysSequences
pgstatIOUsrSequences

pgstatActivity
pgstatBgWriter: DONE!

pgstatDatabaseConflicts
pgstatReplication

pgstatUserFunctions

About

PostgreSQL Statistics MIB for SNMP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published