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

OpenNMS Admin Guide HostResourceSwRunMonitor service-name not exact match string

    XMLWordPrintable

Details

    • Doc Sprint - Aug 4 - Sept 1
    • DB

    Description

      Hello, I was using the Admin Guide reference of HostResourceSwRunMonitor

      http://docs.opennms.org/opennms/releases/18.0.1/guide-admin/guide-admin.html#_hostresourceswrunmonitor

      The guide says that the service-name parameter is "The name of the process to be monitored. This parameter’s value is case-sensitive and is evaluated as an exact match."

      However, the code at https://github.com/vishwaabhinav/OpenNMS/blob/master/opennms-services/src/main/java/org/opennms/netmgt/poller/monitors/HostResourceSwRunMonitor.java shows this value is interpreted as a regular expression.

      private boolean match(String expectedText, String currentText) {
      268 if (expectedText.startsWith("~"))

      { 269 return currentText.matches(expectedText.replaceFirst("~", "")); 270 }


      271 return currentText.equalsIgnoreCase(expectedText);
      272 }

      matches expects a regex

      Thanks,
      Tim

      Attachments

        Issue Links

          Activity

            People

              mmahacek Mark Mahacek
              timmillerdyck Tim Miller Dyck (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.