Opennms
為什麼這個小的datacollection-config.xml 在opennms 中無效?
<?xml version="1.0"?> <datacollection-config rrdRepository="/var/lib/opennms/rrd/snmp/"> <snmp-collection name="default" snmpStorageFlag="select"> <rrd step="300"> <rra>RRA:AVERAGE:0.5:1:2016</rra> <rra>RRA:AVERAGE:0.5:12:1488</rra> <rra>RRA:AVERAGE:0.5:288:366</rra> <rra>RRA:MAX:0.5:288:366</rra> <rra>RRA:MIN:0.5:288:366</rra> </rrd> <resourceType name="testResourceType" label="ciscotestgroup" > <persistenceSelectorStrategy class="org.opennms.netmgt.collectd.PersistAllSelectorStrategy"/> <storageStrategy class="org.opennms.netmgt.dao.support.FrameRelayStorageStrategy"/> </resourceType> <group name="ciscotestgroup" ifType="all"> <mibObj oid=".1.3.6.1.2.1.2.2.1.10" instance="ifIndex" alias="ifInOctets" type="counter" /> </group> <systemDef name="cisco-routers-test"> <sysoidMask>.1.3.6.1.4.1.9.1.</sysoidMask> <collect> <includeGroup>ciscotestgroup</includeGroup> </collect> </systemDef>
你好朋友,
我正在嘗試數週,以僅從 cisco 路由器中的所有介面獲取所需的小部分 snmp 數據。用 opennms wiki 驗證幫助不大。仍然沒有使用上述 datacollection-config.xml 文件重新啟動。
如果我用下面的替換,opennms 正在啟動和工作。我懷疑資源類型名稱和組實例變數。任何人請告訴我上述配置文件中的邏輯/技術錯誤……(我將 ifIndex 替換為 testResourceType,但仍然無法正常工作)
謝謝。
<?xml version="1.0"?> <datacollection-config rrdRepository="/var/lib/opennms/rrd/snmp/"> <snmp-collection name="default" snmpStorageFlag="select"> <rrd step="300"> <rra>RRA:AVERAGE:0.5:1:2016</rra> <rra>RRA:AVERAGE:0.5:12:1488</rra> <rra>RRA:AVERAGE:0.5:288:366</rra> <rra>RRA:MAX:0.5:288:366</rra> <rra>RRA:MIN:0.5:288:366</rra> </rrd> <resourceType name="frCircuitIfIndex" label="Frame-Relay Circuit (RFC1315)"> <persistenceSelectorStrategy class="org.opennms.netmgt.collectd.PersistAllSelectorStrategy"/> <storageStrategy class="org.opennms.netmgt.dao.support.FrameRelayStorageStrategy"/> </resourceType> <groups> <group name="cisco-frame-relay" ifType="all"> <mibObj oid=".1.3.6.1.4.1.9.9.49.1.2.2.1.1" instance="frCircuitIfIndex" alias="frIfName" type="string" /> <mibObj oid=".1.3.6.1.4.1.9.9.49.1.2.2.1.2" instance="frCircuitIfIndex" alias="frIfType" type="string" /> <mibObj oid=".1.3.6.1.4.1.9.9.49.1.2.2.1.3" instance="frCircuitIfIndex" alias="frSubifIndex" type="string" /> <mibObj oid=".1.3.6.1.4.1.9.9.49.1.2.1.1.1" instance="frCircuitIfIndex" alias="frDEins" type="counter" /> <mibObj oid=".1.3.6.1.4.1.9.9.49.1.2.1.1.2" instance="frCircuitIfIndex" alias="frDEouts" type="counter" /> <mibObj oid=".1.3.6.1.4.1.9.9.49.1.2.1.1.3" instance="frCircuitIfIndex" alias="frDropPktsOuts" type="counter" /> </group> <group name="rfc1315-frame-relay" ifType="all"> <mibObj oid=".1.3.6.1.2.1.10.32.2.1.1" instance="frCircuitIfIndex" alias="frIfIndex" type="string" /> <mibObj oid=".1.3.6.1.2.1.10.32.2.1.2" instance="frCircuitIfIndex" alias="frDlci" type="string" /> <mibObj oid=".1.3.6.1.2.1.10.32.2.1.3" instance="frCircuitIfIndex" alias="frState" type="string" /> <mibObj oid=".1.3.6.1.2.1.10.32.2.1.4" instance="frCircuitIfIndex" alias="frReceivedFECNs" type="Counter" /> <mibObj oid=".1.3.6.1.2.1.10.32.2.1.5" instance="frCircuitIfIndex" alias="frReceivedBECNs" type="Counter" /> <mibObj oid=".1.3.6.1.2.1.10.32.2.1.6" instance="frCircuitIfIndex" alias="frSentFrames" type="Counter" /> <mibObj oid=".1.3.6.1.2.1.10.32.2.1.7" instance="frCircuitIfIndex" alias="frSentOctets" type="Counter" /> <mibObj oid=".1.3.6.1.2.1.10.32.2.1.8" instance="frCircuitIfIndex" alias="frReceivedFrames" type="Counter" /> <mibObj oid=".1.3.6.1.2.1.10.32.2.1.9" instance="frCircuitIfIndex" alias="frReceivedOctets" type="Counter" /> </group> </groups> <systems> <systemDef name="Cisco Routers"> <sysoidMask>.1.3.6.1.4.1.9.1.</sysoidMask> <collect> <includeGroup>rfc1315-frame-relay</includeGroup> <includeGroup>cisco-frame-relay</includeGroup> </collect> </systemDef> </systems>
我相信封閉
<systems>
和<groups>
標籤是強制性的,但在您的範例中缺失。<groups> <group name="ciscotestgroup" ifType="all"> <mibObj oid=".1.3.6.1.2.1.2.2.1.10" instance="ifIndex" alias="ifInOctets" type="counter" /> </group> </groups> <systems> <systemDef name="cisco-routers-test"> <sysoidMask>.1.3.6.1.4.1.9.1.</sysoidMask> <collect> <includeGroup>ciscotestgroup</includeGroup> </collect> </systemDef> </systems>