Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-9960

MetricsHandler should support multiple prefixes.

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 6.4, 7.0
    • Fix Version/s: 6.4, 7.0
    • Component/s: metrics
    • Security Level: Public (Default Security Level. Issues are Public)
    • Labels:
      None

      Description

      Some consumers of the /admin/metrics API need to retrieve only a number of specific metrics they are interested in, which don't share the same prefix. Additionally, selecting by "group" or "type" is insufficient when users need to retrieve metrics for a specific collection (all collections handled by a node belong to the same group "core").

      Concrete examples of this kind of use are in SOLR-9857 and SOLR-9858.

      The modification needed to support this in MetricsHandler is simple:

      • support multiple "prefix" parameters
      • support also "registryPrefix" parameter as an alternative to "group".
      1. SOLR-9960.patch
        11 kB
        Andrzej Bialecki

        Activity

        Hide
        ab Andrzej Bialecki added a comment -

        Patch that implements the change. Parameters "prefix" and "registry" can be used as multi-valued or comma-separated list (like the "group") to indicate the multiple prefixes to match (logical OR) or multiple registry prefixes to match. For example:

        registry=solr.core,solr.node
        

        selects all registries for all cores, and a node registry, whereas these parameters:

        registry=solr.core.collection1&prefix=ADMIN,UPDATE
        

        selects metrics from all shards and replicas belonging to "collection1", but only for metrics with names starting with these two prefixes.

        Show
        ab Andrzej Bialecki added a comment - Patch that implements the change. Parameters "prefix" and "registry" can be used as multi-valued or comma-separated list (like the "group") to indicate the multiple prefixes to match (logical OR) or multiple registry prefixes to match. For example: registry=solr.core,solr.node selects all registries for all cores, and a node registry, whereas these parameters: registry=solr.core.collection1&prefix=ADMIN,UPDATE selects metrics from all shards and replicas belonging to "collection1", but only for metrics with names starting with these two prefixes.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 53d5af17dac5e2c27f1304b029cbd09461ea197b in lucene-solr's branch refs/heads/master from Andrzej Bialecki
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=53d5af1 ]

        SOLR-9960 MetricsHandler should support multiple prefixes.

        Show
        jira-bot ASF subversion and git services added a comment - Commit 53d5af17dac5e2c27f1304b029cbd09461ea197b in lucene-solr's branch refs/heads/master from Andrzej Bialecki [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=53d5af1 ] SOLR-9960 MetricsHandler should support multiple prefixes.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit e37b777e1abf3b4b7eae3b38b16e0b767517945d in lucene-solr's branch refs/heads/branch_6x from Andrzej Bialecki
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=e37b777 ]

        SOLR-9960 MetricsHandler should support multiple prefixes.

        Show
        jira-bot ASF subversion and git services added a comment - Commit e37b777e1abf3b4b7eae3b38b16e0b767517945d in lucene-solr's branch refs/heads/branch_6x from Andrzej Bialecki [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=e37b777 ] SOLR-9960 MetricsHandler should support multiple prefixes.

          People

          • Assignee:
            ab Andrzej Bialecki
            Reporter:
            ab Andrzej Bialecki
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development