Duplicate measurement definitions in JON CLI

Solution Verified - Updated -

Issue

  • I am trying to script some operations via the JON CLI, and am running the following:

      var resourceTypeName = "Operating System";
      var measurementName = "Process CPU Time per Minute";
      var mdc = MeasurementDefinitionCriteria();
      mdc.addFilterResourceTypeName(resourceTypeName); 
      mdc.addFilterDisplayName(measurementName);
      var mdefs = MeasurementDefinitionManager.findMeasurementDefinitionsByCriteria(mdc);
    
  • When I run that, I get 4 duplicate measurement definitions.

  • I cannot determine a way to programmatically differentiate which of these is the proper one to use for subsequently looking up a measurement schedule.

Environment

  • JBoss Operations Network (JON) 2.3.x
  • JBoss Operations Network Command Line Interface (CLI)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.