Including an XML file inside another
Subscribe

From OpenNMS

Jump to: navigation, search

This used to be in Apache2 configuration. I haven't tested it but it's a neat trick.

Updating Datacollection.xml with local file information

Below is the code to be added to the datacollection.xml file to include a local file in the configuration. I use this local file to test new collections and for equipment not included in the standard Opennms datacollection.xml file. I really don't like editing the standard files (I always seem to forgot a < or >). The snippet is the first 20 lines of my edited datacollection.xml file.

 Eyeglass:/$OPENNMS_HOME/etc # head -20 datacollection-config.xml
<xml version="1.0">
<!DOCTYPE root [
    <!ENTITY localconfig SYSTEM "./etc/local.datacollection-config-groups.xml" >
]>
<datacollection-config
        rrdRepository = "$OPENMS_HOME/opennms/share/rrd/snmp/">
        <snmp-collection name="default"
                maxVarsPerPdu = "50"
                snmpStorageFlag = "select">
                <rrd step = "300">
                        <rra>RRA:AVERAGE:0.5:1:8928</rra>
              
          <rra>RRA:AVERAGE:0.5:12:8784</rra>
                        <rra>RRA:MIN:0.5:12:8784</rra>
                        <rra>RRA:MAX:0.5:12:8784</rra>
                </rrd>
                <groups>
  &localconfig;
                        <group  name = "mib2-interfaces" ifType = "all">
  • 10-11-04 - One caveat. It appear that the data is still collected but not available for reporting.
  • 10/20/05 - Will look into what this reporting issue is
  • 10/24/05 - Me thinks this was due to my misunderstanding the snmp-graph syntax. I was trying to use the above syntax to edit the snmp-graph file.