Opennms Graph

  • Category: 電腦相關
  • Last Updated: Tuesday, 20 December 2016 23:32
  • Published: Thursday, 06 October 2016 11:04
  • Written by sam

Custom Graph for SQLConn, SQLMem(Free)

mssql UserConnections

mssql FreeMemoryKB

CODE:

Add to

/etc/opennms/snmp-graph.properties.d# vi microsoft-wmi-graph.properties
reports=
***********
wmi.sam.sqlconn, \
wmi.sam.sqlmem

report.wmi.sam.sqlconn.name=SQLConn (WMISAM)
report.wmi.sam.sqlconn.columns=samsqlConn
report.wmi.sam.sqlconn.type=nodeSnmp
report.wmi.sam.sqlconn.command=--title="SQLConn (WMISAM)" \
 --lower-limit 0 \
 DEF:SQLConn={rrd1}:samsqlConn:AVERAGE \
 LINE2:SQLConn#0000ff:"SQLConn " \
 GPRINT:SQLConn:AVERAGE:"Avg \\: %10.2lf %s" \
 GPRINT:SQLConn:MIN:"Min \\: %10.2lf %s" \
 GPRINT:SQLConn:MAX:"Max \\: %10.2lf %s\\n" \

report.wmi.sam.sqlmem.name=SQLMem (WMISAM)
report.wmi.sam.sqlmem.columns=samsqlRam
report.wmi.sam.sqlmem.type=nodeSnmp
report.wmi.sam.sqlmem.command=--title="SQLMem (WMISAM)" \
 --lower-limit 0 \
 DEF:SQLMem={rrd1}:samsqlRam:AVERAGE \
 CDEF:Mem=SQLMem,10240,/ \
 LINE2:Mem#00ff00:"SQLMem G" \
 GPRINT:Mem:AVERAGE:"Avg \\: %10.2lf %s" \
 GPRINT:Mem:MIN:"Min \\: %10.2lf %s" \
 GPRINT:Mem:MAX:"Max \\: %10.2lf %s\\n"