Uploaded image for project: 'Percona Monitoring and Management'
  1. Percona Monitoring and Management
  2. PMM-6710

pmm-admin: Allow user-specified custom 'group' name when adding external services

Details

    • Improvement
    • Status: Done
    • High
    • Resolution: Done
    • None
    • 2.12.0
    • PMM Admin
    • 0.5
    • Platform Sprint 28, Platform Sprint 29 (2.12+a2)
    • Yes
    • Yes
    • Yes
    • Implex

    Description

      Warning: group - Working name, might  change   before implementation

      Goal: improve the User experience for adding  and viewing External services 

      new Term:

      External group - a custom name for the one or group of Services. specified by User based on his preferences  

      Use story

      As a PMM user, I need to be able to add External Service with specified external group so that I can easily see them on dashboards

       
      Use case: 

      The user has a cluster of Web servers with Mysql, Redis, and java.  Redis and Java have installed exporters. All servers in the cluster are the same. 
      User want to have all this be monitored.  and to use one command on all servers. 

      In his case, it  will be 

      #pmm-admin add mysql
      #pmm-admin add external --group=redis --listen-port=9121  

      He wants this to be automated and added to his "automation" deployment script
      He also expects this 2 external services will be presented on Node Dashboards as 2 separate different objects based on their external subtypes

      UI
      CLI
      #pmm-admin add external --group=redis --listen-port=9121
      GROUP - optional flag , default = "external"

      Will add External service with service-name = $NODE_NAME-redis , 
      Also,  user can set --service-name so some specific name  
      We need to have an optional label in data  ="external_group=redis"   for better Dashboard presentation

      Group should be case insensitive, convert to lower case.

      Suggested implementation:

      Add flag group to commands in pmm-admin.

      1. pmm-admin inventory add service external.
        1. Flag
        2. Request to pmm-managed
        3. Message
      2. pmm-admin add external 
        1. Flag
        2. Request to pmm-managed
        3. Message
      3. pmm-admin list will expose external group as Type of the service like: "external:<external_group>"
      4. pmm-admin inventory list services

       

      How to demonstrate:

      pmm-admin repo

      Scenario: Inventory add empty subtype
          When: user run pmm-admin inventory add service external command with --group=<empty>
          Then: pmm-admin should set group=external by default and create external service
      Scenario: Inventory add group matching existing type
          When: user run pmm-admin inventory add service external command with --group=redis/prometheus/e.t.c.
          Then: pmm-adming should set group provided by user and create external service
      Scenario: Inventory add group not matching existing type
          When: user run pmm-admin inventory add command with --group=redis/prometheus
          Then: a new service should be added with group = group provided by user converted to lowercase
      Scenario: pmm-admin list no extra flags 
          When: user run pmm-admin list with no extra flags
           And: there are external services with groups
          Then: external services type shown as "external:<external_group>"
       Scenario: pmm-admin list --json (if exists, this is only an example)
           When: user run pmm-admin list --json
            And: there are external services with groups
           Then: we should have two separate fields for `service_type` and for `group`

      Attachments

        Issue Links

          Activity

            People

              andrii.skomorokhov Andrii Skomorokhov (Inactive)
              taras.kozub Taras Kozub
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 2 days
                  2d

                  Smart Checklist