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

Improve Solr metrics reporting

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 6.4, 7.0
    • metrics
    • None

    Description

      Following on from a discussion on the mailing list:
      http://search-lucene.com/m/IO0EI1qdyJF1/codahale&subj=Solr+metrics+in+Codahale+metrics+and+Graphite+

      It would be good to make Solr play more nicely with existing devops monitoring systems, such as Graphite or Ganglia. Stats monitoring at the moment is poll-only, either via JMX or through the admin stats page. I'd like to refactor things a bit to make this more pluggable.

      This patch is a start. It adds a new interface, InstrumentedBean, which extends SolrInfoMBean to return a [Metrics MetricRegistry, and a couple of MetricReporters (which basically just duplicate the JMX and admin page reporting that's there at the moment, but which should be more extensible). The patch includes a change to RequestHandlerBase showing how this could work. The idea would be to eventually replace the getStatistics() call on SolrInfoMBean with this instead.

      The next step would be to allow more MetricReporters to be defined in solrconfig.xml. The Metrics library comes with ganglia and graphite reporting modules, and we can add contrib plugins for both of those.

      There's some more general cleanup that could be done around SolrInfoMBean (we've got two plugin handlers at /mbeans and /plugins that basically do the same thing, and the beans themselves have some weirdly inconsistent data on them - getVersion() returns different things for different impls, and getSource() seems pretty useless), but maybe that's for another issue.

      Attachments

        1. screenshot-2.png
          425 kB
          Andrzej Bialecki
        2. SOLR-4735.patch
          222 kB
          Andrzej Bialecki
        3. SOLR-4735.patch
          181 kB
          Andrzej Bialecki
        4. SOLR-4735.patch
          55 kB
          Christine Poerschke
        5. SOLR-4735.patch
          53 kB
          Alan Woodward
        6. SOLR-4735.patch
          52 kB
          Alan Woodward
        7. SOLR-4735.patch
          47 kB
          Alan Woodward

        Issue Links

          Activity

            People

              ab Andrzej Bialecki
              romseygeek Alan Woodward
              Votes:
              8 Vote for this issue
              Watchers:
              26 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m