Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-10407

Create API endpoint for widgets

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.1.0
    • 2.1.0
    • ambari-server
    • None

    Description

      Request for getting a user created widget instance (private) /api/v1/users/jaimin/widgets/NAMENODE_HEAP

      Response

      {
        href: "http://c6401.ambari.apache.org:8080/api/v1/users/jaimin/widgets/NAMENODE_HEAP",
        cluster_name: "c1",
        widget_name: "NAMENODE_HEAP1",
        widget_type: “GAUGE”,
        display_name: "NameNode Heap",
        service_name: “HDFS”,
        component_name: “NAMENODE”,
        page_names: [“HDFS_SUMMARY”,”DASHBOARD”],
        description: "", 
        sharable: true,
        author: “jaimin”,
        metrics: {
          numerator_metric: "jvmMemoryHeapUsed",
          denominator_metric: "jvmMemoryHeapMax"
        },
        
        expression: [{
          name: result,
          template: “${numerator_metric}/${denominator_metric}”
        }],
        properties: {
         “warning_threshold”: 0.9,
         “error_threshold”:   0.7,
        }
      }
      

      NOTE: It should be able to query and get all the widgets that belongs to a particular page and either have a specific value for author_name or are having sharable set to true. something like following

      /api/v1/users?Widgets/sharable=true|Widgets/author=jaimin&page_names=HDFS_SUMMARY&fields=Widgets/*
      

      Attachments

        1. AMBARI-10407.patch
          65 kB
          Jaimin Jetly

        Issue Links

          Activity

            People

              ikozlov Ivan Kozlov
              swagle Siddharth Wagle
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: