Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-14564

Fix stock graphite-telemetry-interface.groovy script file

    XMLWordPrintable

Details

    • Story
    • Status: Resolved (View Workflow)
    • Minor
    • Resolution: Fixed
    • None
    • 30.0.2
    • None
    • Security Level: Default (Default Security Scheme)
    • None
    • 3
    • Horizon 22 - July 21 - Aug 4

    Description

      The graphite-telemetry-interface.groovy file shipped in OpenNMS, in etc/telemetryd-adapters, has some bugs. This is frustrating as they are hard to debug and the file as-is should "just work". Bugs are:

      • both string.split(".") entries should be changed to string.split("{}{}\.") (split() actually takes a regex, not a plain string)
      • interfaceLabel should be ifaceLabel as declared
      • graphitMsg should be graphiteMsg

      To test you can run something like this using netcat, assuming Graphite is enabled in telemetryd-configuration.xml.

      echo "eth0.my-metric 100 `date +%s`" | nc -u -w1 -4 -s localhost localhost 2003

      Also should note that anything logged in the script using log is output in karaf.log, and also that you may need to change entries to log.error for them to show up (depending on karaf logging configuration, debug and warn may not show up in the log).

      Attachments

        Activity

          People

            stheleman Scott Theleman
            stheleman Scott Theleman
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: