ACME – OpenNMS Datacollection

Posted: 12th Dezember 2011 by Thorben Hemmler in OpenNMS

### datacollection.xml ###

 

<resourceType name=“agentIndex“ label=“ACME-Voice Agent“ resourceLabel=“${agentHostname}“>
<persistenceSelectorStrategy/>
<storageStrategy/>
</resourceType>

<group name=“acme-voice“ ifType=“ignore“>
<mibObj oid=“.1.3.6.1.4.1.9148.3.2.1.2.1.1.2″ instance=“agentIndex“ alias=“agentHostname“ type=“string“/>
<mibObj oid=“.1.3.6.1.4.1.9148.3.2.1.2.1.1.4″ instance=“agentIndex“ alias=“actSessionsIn“ type=“gauge“/>
<mibObj oid=“.1.3.6.1.4.1.9148.3.2.1.2.1.1.6″ instance=“agentIndex“ alias=“actSessionsOut“ type=“gauge“/>
<mibObj oid=“.1.3.6.1.4.1.9148.3.2.1.2.1.1.8″ instance=“agentIndex“ alias=“totalSessionsIn“ type=“gauge“/>
<mibObj oid=“.1.3.6.1.4.1.9148.3.2.1.2.1.1.12″ instance=“agentIndex“ alias=“totalSessionsOut“ type=“gauge“/>
<mibObj oid=“.1.3.6.1.4.1.9148.3.2.1.2.1.1.22″ instance=“agentIndex“ alias=“agentStatus“ type=“integer“/>
</group>

<group name=“acme-voice-host“ ifType=“ignore“>
<mibObj oid=“.1.3.6.1.4.1.9148.3.3.1.3.1.1.4″ instance=“1″ alias=“acmetemp“ type=“integer“/>
<mibObj oid=“.1.3.6.1.4.1.9148.3.2.1.1.1″ instance=“0″ alias=“acmecpu“ type=“integer“/>
<mibObj oid=“.1.3.6.1.4.1.9148.3.2.1.1.2″ instance=“0″ alias=“acmememory“ type=“integer“/>
</group>

<systemDef name=“Acme-Voice“>
<sysoidMask>.1.3.6.1.4.1.9148.</sysoidMask>
<collect>
<includeGroup>acme-voice</includeGroup>
<includeGroup>acme-voice-host</includeGroup>
</collect>
</systemDef>

### snmp-graph.properties ###

reports= acme.activesessions, acme.totalsessions, acme.agentstatus, acme.host.temp, acme.host.cpu, acme.host.memory, \

report.acme.activesessions.name=Active Sessions
report.acme.activesessions.columns=actSessionsIn,actSessionsOut
report.acme.activesessions.type=agentIndex
report.acme.activesessions.propertiesValues=agentHostname
report.acme.activesessions.command=–title=“Active Sessions: {agentHostname}“ \
–vertical-label=“Sessions“ \
DEF:actIn={rrd1}:actSessionsIn:AVERAGE \
DEF:minActIn={rrd1}:actSessionsIn:MIN \
DEF:maxActIn={rrd1}:actSessionsIn:MAX \
DEF:actOut={rrd2}:actSessionsOut:AVERAGE \
DEF:minActOut={rrd2}:actSessionsOut:MIN \
DEF:maxActOut={rrd2}:actSessionsOut:MAX \
CDEF:actOutNeg=0,actOut,- \
AREA:actIn#00ff00:“In “ \
GPRINT:actIn:AVERAGE:“Avg \\: %8.2lf %s“ \
GPRINT:actIn:MIN:“Min \\: %8.2lf %s“ \
GPRINT:actIn:MAX:“Max \\: %8.2lf %s\\n“ \
AREA:actOutNeg#0000ff:“Out“ \
GPRINT:actOut:AVERAGE:“Avg \\: %8.2lf %s“ \
GPRINT:actOut:MIN:“Min \\: %8.2lf %s“ \
GPRINT:actOut:MAX:“Max \\: %8.2lf %s\\n“

report.acme.totalsessions.name=Total Sessions
report.acme.totalsessions.columns=totalSessionsIn, totalSessionsOut
report.acme.totalsessions.type=agentIndex
report.acme.totalsessions.propertiesValues=agentHostname
report.acme.totalsessions.command=–title=“Total Sessions: {agentHostname}“ \
–vertical-label=“Sessions“ \
DEF:totIn={rrd1}:totalSessionsIn:AVERAGE \
DEF:minTotIn={rrd1}:totalSessionsIn:MIN \
DEF:maxTotIn={rrd1}:totalSessionsIn:MAX \
DEF:totOut={rrd2}:totalSessionsOut:AVERAGE \
DEF:minTotOut={rrd2}:totalSessionsOut:MIN \
DEF:maxTotOut={rrd2}:totalSessionsOut:MAX \
CDEF:totOutNeg=0,totOut,- \
AREA:totIn#00ff00:“In “ \
GPRINT:totIn:AVERAGE:“Avg \\: %8.2lf %s“ \
GPRINT:totIn:MIN:“Min \\: %8.2lf %s“ \
GPRINT:totIn:MAX:“Max \\: %8.2lf %s\\n“ \
AREA:totOutNeg#0000ff:“Out“ \
GPRINT:totOut:AVERAGE:“Avg \\: %8.2lf %s“ \
GPRINT:totOut:MIN:“Min \\: %8.2lf %s“ \
GPRINT:totOut:MAX:“Max \\: %8.2lf %s\\n“

report.acme.agentstatus.name=Agentstatus
report.acme.agentstatus.columns=agentStatus
report.acme.agentstatus.type=agentIndex
report.acme.agentstatus.propertiesValues=agentHostname
report.acme.agentstatus.command=–title=“Status of Agent: {agentHostname}“ \
–vertical-label Agentstatus \
DEF:status={rrd1}:agentStatus:AVERAGE \
DEF:minStatus={rrd1}:agentStatus:MIN \
DEF:maxStatus={rrd1}:agentStatus:MAX \
LINE2:status#0000ff:“Status of Agents“ \
GPRINT:status:AVERAGE:“ Avg \\: %8.2lf %s“ \
GPRINT:status:MIN:“Min \\: %8.2lf %s“ \
GPRINT:status:MAX:“Max \\: %8.2lf %s\\n“

report.acme.host.temp.name=Temperatur
report.acme.host.temp.columns=acmetemp
report.acme.host.temp.type=nodeSnmp
report.acme.host.temp.command=–title=“Temp“ \
–vertical-label=“Temp in Cel“ \
DEF:temp={rrd1}:acmetemp:AVERAGE \
DEF:minTemp={rrd1}:acmetemp:MIN \
DEF:maxTemp={rrd1}:acmetemp:MAX \
LINE2:temp#0000ff:“Temp in Cel“ \
GPRINT:temp:AVERAGE:“ Avg \\: %8.2lf %s“ \
GPRINT:temp:MIN:“Min \\: %8.2lf %s“ \
GPRINT:temp:MAX:“Max \\: %8.2lf %s\\n“

report.acme.host.cpu.name=CPU_Auslastung
report.acme.host.cpu.columns=acmecpu
report.acme.host.cpu.type=nodeSnmp
report.acme.host.cpu.command=–title=“CPU“ \
–vertical-label=“CPU in Prozent“ \
DEF:cpu={rrd1}:acmecpu:AVERAGE \
DEF:mincpu={rrd1}:acmecpu:MIN \
DEF:maxcpu={rrd1}:acmecpu:MAX \
LINE2:cpu#0000ff:“CPU in Prozent“ \
GPRINT:cpu:AVERAGE:“ Avg \\: %8.2lf %s“ \
GPRINT:cpu:MIN:“Min \\: %8.2lf %s“ \
GPRINT:cpu:MAX:“Max \\: %8.2lf %s\\n“

report.acme.host.memory.name=Memory
report.acme.host.memory.columns=acmememory
report.acme.host.memory.type=nodeSnmp
report.acme.host.memory.command=–title=“Memory“ \
–vertical-label=“Memory in Prozent“ \
DEF:mem={rrd1}:acmememory:AVERAGE \
DEF:minMem={rrd1}:acmememory:MIN \
DEF:maxMem={rrd1}:acmememory:MAX \
LINE2:mem#0000ff:“Memory in Prozent“ \
GPRINT:mem:AVERAGE:“ Avg \\: %8.2lf %s“ \
GPRINT:mem:MIN:“Min \\: %8.2lf %s“ \
GPRINT:mem:MAX:“Max \\: %8.2lf %s\\n“