Configuration Packages

From OpenNMS
Jump to navigation Jump to search

Application-wide Defined Packages

OpenNMS services: Poller, Collector, and Thresholder, use the notion of packages for aggregation configuration behavior and applying it to a set of monitored entities. This use case is based on the requirement to re-factor the package configuration object into a definition that is defined in one place and shared by all services.

  • Other than removing duplication, packages are not consistent across configuration and, in some cases, are dependent on other configuration elements for attributes that should be defined in the package itself. Examples:
  1. The Poller configuration defines an RRD structure, yet, each service has its own interval specified and may not be consistent with the RRD step. Each package should have the polling interval defined for all services in the package. Any service that requires polling on a different interval, should be placed in a separate package (it has been my experience that this is typically the case for defining a new package, anyway).
  2. Services defined in the poller can each have their own defined RRD repository defined. This attribute should be moved to the package. Services that the user desires to not have latency data stored should be in a package that doesn't have a repository defined.
  3. The data collection configuration package has the interval that is missing in the poller's package configuration, yet doesn't have the RRD specification. However, the repository is defined with the RRD data in the data collection configuration. The RRD and repository configuration should be moved to the collection package and then would be consistent with the re-factored poller configuration defined above.
  • The packages should be defined in a packages-configuration.xml file and referenced by these other configurations as an attribute.
  • package-configuration.xml:
<packages default-package="normal" >

<!-- 5 minute interval -->
  <package name="normal" interval="300000" >
    <filter>IPLIKE *.*.*.*</filter>
    <include-range begin="1.1.1.1" end="254.254.254.254"/>
    <rrd step = "300">
      <rra>RRA:AVERAGE:0.5:1:2016</rra>
      <rra>RRA:AVERAGE:0.5:12:4464</rra>
      <rra>RRA:MIN:0.5:12:4464</rra>
      <rra>RRA:MAX:0.5:12:4464</rra>
    </rrd>
  </package>

<!-- 30 second interval -->
  <package name="fast" interval="3000" >
    <filter>routers</filter>
    <include-range begin="1.1.1.1" end="254.254.254.254"/>
    <rrd step = "30">
      <rra>RRA:AVERAGE:0.5:1:20160</rra>
      <rra>RRA:AVERAGE:0.5:12:44640</rra>
      <rra>RRA:MIN:0.5:12:44640</rra>
      <rra>RRA:MAX:0.5:12:44640</rra>
    </rrd>
  </package>

<!-- 50 minute interval -->
  <package name="real-slow" interval="3000000">
    <filter>categoryName == "Printers"</filter>
    <include-range begin="1.1.1.1" end="254.254.254.254"/>
    <rrd step = "3000">
      <rra>RRA:AVERAGE:0.5:1:201</rra>
      <rra>RRA:AVERAGE:0.5:12:446</rra>
      <rra>RRA:MIN:0.5:12:446</rra>
      <rra>RRA:MAX:0.5:12:446</rra>
    </rrd>
  </package>

</packages>
  • poller-configuration.xml:

<!-- see "fast" defined in package-configuration.xml -->
<package name="fast polling" package-config="fast" >
  <service name="ICMP" user-defined="false" status="on">
    <parameter key="retry" value="1"/>
    <parameter key="timeout" value="1000"/>
    <parameter key="ds-name" value="icmp"/>
  </service>
  <service name="HTTP" user-defined="false" status="on">
    <parameter key="retry" value="1"/>
    <parameter key="timeout" value="2000"/>
    <parameter key="ds-name" value="http"/>
  </service>
</package>

<!-- see "normal" defined in package-configuration.xml -->
<package name="default polling" package-config="normal" >
  <service name="ICMP" user-defined="false" status="on">
    <parameter key="retry" value="1"/>
    <parameter key="timeout" value="1000"/>
    <parameter key="ds-name" value="icmp"/>
  </service>
  <service name="HTTP" user-defined="false" status="on">
    <parameter key="retry" value="1"/>
    <parameter key="timeout" value="2000"/>
    <parameter key="ds-name" value="http"/>
  </service>
</package>