Icon

Comments have been closed on this page. Please use AppMon & UEM Open Q & A forum for questions about this plugin.

Overview

 

The Dynatrace Remote Monitoring Plugin for SOLR enables remote monitoring for applications using the SOLR Search Engine. The monitoring plugin accesses SOLR statistics using the SOLR administration interface, so no JMX access is required.

Name and Version

SOLR Remote Monitoring Plugin

Compatible with

Dynatrace >= 5.6

Author

David Lopes (original version)

Dave Mauney (various improvements)

License

Dynatrace BSD

Support Level

Community Supported
For questions:

Download

com.dynatrace.diagnostics.plugin.solr_1.0.1.jar

com.dynatrace.diagnostics.plugin.solr_1.0.0.jar

Description

The Dynatrace Remote Monitoring Plugin for SOLR enables remote monitor plugin monitoring for applications using the SOLR Search Engine. The monioring pluing accesses SOLR statistics using the SOLR administration interface, so no JMX access is required.

v1.01 Changes

1. Support for http/https protocols
2. Support for "/dataimport" handler, and the following new metrics under the "Data Import Stats" metric group:
"Documents Added/Updated"
"Documents Deleted"
"Time Taken"
"Total Documents Processed"
"Total Documents Skipped"
"Total Requests made to DataSource"
"Total Rows Fetched"
3. Support for new "Five Min Rate Requests Per Second" metric (no multiplication) as well as the original "Five Min Rate Requests" metric (with multiplication by 60)
4. Refactored SolrRemote class to better handle nulls, unsubscribed measures, etc. and to report execptions in a more consistent manner
5. Improved formatting/indentation


Screenshots

 

Installation

...

Installation

Import the Plugin into the dynaTrace Server via the dynaTrace Server Settings menu -> Plugins -> Install Plugin. For details how to do this please refer to the Dynatrace documentation.

Usage

Set the appropriate port (8983 is the default).

Change the list of Query Handlers to specify those you wish to monitor.  If a Query Handler does not exist for a given Core, it will be ignored.  

Select a protocol (http or https).

Run the monitor on an appropriate schedule and you can then access the measures for custom dashboards.

Examples of the Configuration, Measures Returned, and an example dashboard are provided in the Screenshots section.

Screenshots

Monitor Configuration Dialog

Measures Returned

Example Dashboards

Contribution

Feel free to contribute on GitHub

.

  1. Anonymous (login to see details)

    If the SOLR instance requires authentication does the plugin support authenticating itself with userid/password?

  2. Anonymous (login to see details)

    Hi Jeff,

    From what I have observed in the code, David Lopes had some code for SSL and Proxy in place, but not yet fully functional.

    I believe some enhancements would be needed to add this capability.

    Thanks,

    dave

  3. Anonymous (login to see details)

    Dave M.  The plugin is working just fine without needing to authenticate itself (which I was a bit surprised.)  Two questions:

    • Every time I run the monitor, it ends in a status of failed, even though it is successfully running and interrogating my SOLR instance (and populating measures)
    • The "sample" dashboards that were shown in the screenshots.  Are they available?  I am doing this on behalf of the SOLR admin at my work and those screenshots would give a place to start from.
  4. Anonymous (login to see details)

    Hi Jeff,

    I posted a copy of my SOLR Remote Monitoring dashboard on GitHub.  You should be able to right click and save as on the link in this comment to try it out.  I depersonalized this dashboard and it should work with version 5.6+.

    HTH,

    dave

    1. Anonymous (login to see details)

      Dave,

       

      Tried to open in 6.,2 and got this:

       

      1. Anonymous (login to see details)

        I see now that if you try "save as" on the xml, it saves the whole web page and not just the xml.  Please try pressing the "Raw" button to show the xml in a separate page.  Then save it or select all/copy to get the actual dashboard xml.  

        HTH,

        dave

  5. Anonymous (login to see details)

    Dave, can you please look to see what it would take to build in support for HTTPS.  our administrator has changed the RESTful endpoints to HTTPS (instead of HTTP).  I can see (through wireshark) that the plugin as it stands right now is simply trying to make an HTTP request which is obviously failing.

    Thanks,

    Jeff

    1. Anonymous (login to see details)

      Hi Jeff, 

      I have a new version ready for you to try out.  Can you email me at dave.mauney@dynatrace.com so I can give you the new jar to try before I make the change official?  I simply added a new "Protocol" setting, which defaults to "http" but also allows for "https", so you will just need to import the new plugin and change the Protocol setting to test it out.

      Thanks,

      dave

      1. Anonymous (login to see details)

        Hi Dave,

        I have a customer that would like to try out the HTTPS version of the Solr monitor. Is there any way I can get access to the updated version? I will gladly perform any testing that you need.

        Thanks,

        Jake

        1. Anonymous (login to see details)

          Hi Jake,

          I emailed it to you a moment ago.  Please let me know how it goes for you...

          Thanks,

          dave

           

  6. Anonymous (login to see details)

    Hi all,
    We are using it since a few days on our E-commerce WebSite for monitoring our SOLR Server. It works fine.

    Thanks a lot (smile)

    Alex

    1. Anonymous (login to see details)

      Hi Alex,

      Thanks for the feedback!

      dave

      1. Anonymous (login to see details)

        Hi Dave,

        Wondering if with the pluggin it's possible to monitor the indexation time for each core ? (Like we can do with this command : /solr/coreXXXX/dataimport?command=status).

        Thanks in advance,

        Alexandre

         

        1. Anonymous (login to see details)

          Hi Alex,

          I am sure it is possible, but I am not sure when I will have time to try it.

          Do you want to take a shot at making the change locally and I can help you get it merged into the main project in github if it works for you?

          If not, I can hopefully take a shot at it some time soon.

          Here are the URLs currently referenced in the code:

          private static final String CORE_URI = "/admin/cores?action=STATUS&wt=json";
          private static String plugins_uri = "/%s/admin/plugins?wt=json";
          private static String memory_uri = "/%s/admin/system?stats=true&wt=json";
          private static String mbeansUri = "/%s/admin/mbeans?stats=true&wt=json";

          Based on the one you provided, my guess is a new URL would be needed for this, unless you think one of the above would work.

          Thanks,

          dave

           

          1. Anonymous (login to see details)

            Hi Dave,

            Actually we don't develop in JAVA in our office and I don't have the Java set up in my computer.

            I think you need add a new url (as it's information about the indexing).

            Here is the important things we would like to monitor :

            http://hpics.li/3c3272e

            Please not the status message object in the reply might not exist if you don't use the DataImport and you import your data with the API.

            Same things for the field "Time Taken" as it's not present we you are currently indexing.

            Thanks,

            Alex

            1. Anonymous (login to see details)

              I will plan to take a look at how to get SOLR reporting this type of data locally (which is a prerequisite to making the code changes) as soon as I have a chance.  I have to use DataImport in my SOLR before the status will become accessible?  Do you have any tips for doing a DataImport?  I have only run the samples that come with SOLR at this point. 

              1. Anonymous (login to see details)

                Hi Dave,

                Actually DataImport is usefull for importing data from a Database like SQL Server. You need to have a DB to getting from there and call a stored procedure or a statement.

                Alex

                1. Anonymous (login to see details)

                  Ok, I will plan to import using a statement from Oracle XE.

                  1. Anonymous (login to see details)

                    Hi Dave,

                    Please not the field Time Taken is not always here. (As when we are indexing we don't have the data) :

                    Here is the response :

                    { "responseHeader": { "status": 0, "QTime": 20 }, "initArgs": [ "defaults", [ "config", "data-config.xml" ] ], "command": "status", "status": "busy", "importResponse": "A command is still running...", "statusMessages": { "Time Elapsed": "0:22:22.569", "Total Requests made to DataSource": "1", "Total Rows Fetched": "6277433", "Total Documents Processed": "6277433", "Total Documents Skipped": "0", "Full Dump Started": "2016-05-26 08:30:22", " ": "Indexing completed. Added/Updated: 6277433 documents. Deleted 0 documents." } }


                    I don't know in that case what should you report in the dashboard : maybe 0 as indexing or the old value.

                    Thanks,

                    Alex

                     

  7. Anonymous (login to see details)

    Hi Dave,

    I have also seen on our SOLR Server are not monitored anymore since 2 days. When I check error log.
    I have : "[SolrRemote@SOLR_0] Previous message was repeated 4 times." 
    I checked the source code of the pluggin and didn't find any reference ?

    Have you already see this error ? (We are monitoring 4 servers every 3 minutes).

    Alex 

    1. Anonymous (login to see details)

      Can you send the full log to dave.mauney@dynatrace.com?

      1. Anonymous (login to see details)

        Hi Dave,

        After investigation, the issue is due to a bug in SOLR : https://issues.apache.org/jira/browse/SOLR-4146

        We are not able get the available core and so the pluggin fail.

        Alex

        1. Anonymous (login to see details)

          Hi Alex,

          Thanks for letting me know about that issue.  Long term, maybe a workaround would be to allow for specifying a list of cores rather than dynamically retrieving them each time...not sure though if it would just fail at another call later in the flow.

          I have made some good progress on the data import request you made, but am not getting much dedicated time to work on it so it may be quite a while yet before I have a new version posted for that enhancement.  I am trying to determine how much refactoring I want to take on while making that change to make the code easier to maintain going forward too.

          Thanks!

          dave

  8. Anonymous (login to see details)

    Dave - Our Plugin stopped working all of a sudden. Looking at logs and a wireshark capture, it seems as if Solr and the plugin are communicating but the plugin comes back as failed. Would you have some time to help out? We just recently upgraded to DT 6.3 and applied all fix packs. I haven't come across any known issues. 

     

    Thanks!

  9. Anonymous (login to see details)

    Dave, this is a follow up to Marquis's email above.  I think that the plugin is just dying under some situation.  I notice that sporadically  it is pulling in measures, but not a lot.  when we look at the plugin output the one that that I notice is that when it pulls measures the log is quite large.  But when it doesn't it just stops after a short time into kickoff.

    I noticed the stack trace (at the bottom) in the collector log file. 

    the line of code that it is complaining about is in bold below.

     

    try {

    getSOLRMetrics(httpclient, helper, listCores, env);

    }

    catch (Exception e){ 

    log .severe("ERROR: "+ e.getMessage());

    }

    the thing that I am struggling with is I would like to debug the collector to understand exactly why it is failing.  Are you familiar with how to do something like this.  I don't seem to be able to be able to debug the plugin itself because the MonitorEnvironment isn't populated so I don't get that far.  I would appreciate any ideas that you have to help me work through this.

     

    thanks,

    Jeff

     

     

    Stack track:

     

    2016-06-07 13:47:34 WARNING [UserPluginManager] java.lang.NullPointerException - null

    java.lang.NullPointerException

    at com.dynatrace.diagnostics.sdk.plugins.logging.CompressingFileHandler.publish(SourceFile:40)

    at com.dynatrace.diagnostics.sdk.plugins.logging.DelegationHandler.publish(SourceFile:115)

    at com.dynatrace.diagnostics.util.modern.LogManager$ContextLogger.log(LogManager.java:153)

    at java.util.logging.Logger.doLog(Logger.java:641)

    at java.util.logging.Logger.log(Logger.java:664)

    at java.util.logging.Logger.severe(Logger.java:1150)

    at com.dynatrace.diagnostics.plugin.solr.SolrRemote.execute(SolrRemote.java:92)

    at com.dynatrace.diagnostics.sdk.UserPluginManager.a(SourceFile:752)

    at com.dynatrace.diagnostics.sdk.UserPluginManager.b(SourceFile:489)

    at com.dynatrace.diagnostics.sdk.UserPluginManager.executePlugin(SourceFile:285)

    at com.dynatrace.diagnostics.sdk.MonitorPluginExecutor.execute(SourceFile:51)

    at com.dynatrace.diagnostics.sdk.MonitorPluginExecutor.execute(SourceFile:26)

    at com.dynatrace.diagnostics.scheduling.impl.ServerJobCenterRegistry.a(SourceFile:190)

    at com.dynatrace.diagnostics.scheduling.impl.ServerJobCenterRegistry.a(SourceFile:413)

    at com.dynatrace.diagnostics.scheduling.impl.ServerJobCenterRegistry.execute(SourceFile:337)

    at com.dynatrace.diagnostics.scheduling.impl.SchedulerJob.a(SourceFile:101)

    at com.dynatrace.diagnostics.scheduling.impl.SchedulerJob.work(SourceFile:92)

    at com.dynatrace.diagnostics.scheduling.impl.SchedulerJob.executeJobInfo(SourceFile:241)

    at com.dynatrace.diagnostics.scheduling.impl.QuartzJob.execute(SourceFile:45)

    at org.quartz.core.JobRunShell.run(JobRunShell.java:202)

    at com.dynatrace.diagnostics.scheduling.impl.QuartzThreadPool$WorkerThread.run(SourceFile:788)

     

     

    1. Anonymous (login to see details)

      Hi Jeff/Marquis,

       

      Have you been able to execute the request to solr manually? We got the same issue a few weeks ago and it was due to our SOLR configuration/set up. (2 of 4 solr was not ok and it happens sudently !).

      Could you check this request return your corect cores referenced in solr : /solr/admin/cores?action=STATUS&wt=json

      And for 1 core those request : (replace %s by the name of the core)

      /%s/admin/system?stats=true&wt=json

      /%s/admin/mbeans?stats=true&wt=json

      Alex

    2. Anonymous (login to see details)

      I addition to what Alex said, if you want, I can give you my Test classes that create a CommandLineEnvironment so I can debug from the command line (or an IDE if you are into that).  Just email me at dave.mauney@dynatrace.com if you are interested.  I should soon have a new version of the plugin that handles https parameter and handles DataImport statistics.  I am currently working on the DataImport part, but I think it is about done at this point other than testing.  

      dave

  10. Anonymous (login to see details)

    Hi Dave.

    Would it be possible to expose/add in DT the real value of 5minRateReqsPerSecond.

    Currently in the source code you multiply it by 60 to have an average per minute : this.setFiveMinRateRequests(SolrHelper.multipyBy(searchStats.path("5minRateReqsPerSecond").asDouble(), 60));

    It's easier to read/follow per second as most of KPI are per second.

    Thanks,

    Alex

  11. Anonymous (login to see details)

    Hi Alex,

    I posted an interim build here:

    https://drive.google.com/file/d/0B4iqsmz-DXJNcF9GT3FpMHhNQnM/view

    It has the following changes:

    1. Support for http/https protocols
    2. Support for "/dataimport" handler, and the following new metrics under the "Data Import Stats" metric group:
      1. "Documents Added/Updated"
      2. "Documents Deleted"

      3. "Time Taken"

      4. "Total Documents Processed"

      5. "Total Documents Skipped"

      6. "Total Requests made to DataSource"

      7. "Total Rows Fetched"

    3. Support for new "Five Min Rate Requests Per Second" metric (no multiplication) as well as the original "Five Min Rate Requests" metric (with multiplication by 60)

    Can you give it a try and see if it meets your requirements?

    Thanks,

    dave

    1. Anonymous (login to see details)

      Hi Dave,

      Thank you very much for those great improvement (smile)

      Unfortunatelly I can't test it now as we are in frozen period for 2 weeks. Indeed we have French Sales next week and we don't touch/change anything since yesterday due to this critical period.

      I will do the test 2nd week of July. Really for the delay.

      Alex

      1. Anonymous (login to see details)

        Hi Dave,

        I have installed and deployed this new version. it works fine (smile) Specially the dataimport !! It will be very usefull (smile)

        Thanks again for this improvement and for your time.

        btw, I don't find the new metrics : Five Min Rate Requests Per Second

        Thanks,

        Alex

        1. Anonymous (login to see details)

          Hi Alex,

          Did you download the official release of 1.0.1 from this page?  (https://github.com/Dynatrace/Dynatrace-SOLR-Remote-Monitoring-Plugin/releases/download/v1.0.1/com.dynatrace.diagnostics.plugin.solr_1.0.1.jar)

          I probably added that after posting that interim version to Google Drive.  

          I will delete the version from Google Drive to avoid any future confusion.

          Let me know how it goes with the official 1.0.1 version, please.  I just tested it locally and it has the new "Five Min Rate Requests Per Second" measure populated for my test run.

          Thanks,

          dave

          1. Anonymous (login to see details)

            Hi Dave,

            Confirmed I downloaded this version and my current version is 1.0.1. Dynatrace updated the pluggin from 1.0.0 to 1.0.1.

            Here is the screen of the measure I can add ? (Maybe it's because the upgrade and not a new fresh installation). I sent a screen to your mailbox.

            I am running of idea :/

            Alex

             

            1. Anonymous (login to see details)

              Hi Alex,

              I did not (yet) receive your email...

              But my guess is you downloaded the older v1.0.1 build from Google Drive.  I would delete the current version you have and download from the official 1..0.1 link just to make sure.

              Thanks,

              dave

              1. Anonymous (login to see details)

                Hi,

                Strange ... I sent it to you yesterday :/

                Will I lose all the information since the first pluggin was installed ? And all my monitor will be removed ?

                Thanks,

                Alex

                1. Anonymous (login to see details)

                  Hi Alex,

                  Ok, I found your email from yesterday.  I will reply to it with some more details...

                  Thanks,

                  dave

  12. Anonymous (login to see details)

    I made some additional changes (improved null support, unsubscribed measure support, exception handling, formatting, etc.) as well as the dataimport and "Five Minute Rate Requests" changes and released as v1.0.1.

  13. Anonymous (login to see details)

    What Versions of SOLR does V1.01 work with, we are running V4.10.4 will be moving to the latest soon, but it isn't working on our current version

    1. Anonymous (login to see details)

      Hello,

      We used it with version 5.2 and 5.5 and it works fine.
      I think the pluggin use API available only with 5.x version.

      Alex 

    2. Anonymous (login to see details)

      I have only tested it with 5.x.

  14. Anonymous (login to see details)

    Hi Dave Mauney,

    I have a client that would like to be able to use the plugin on a Solr instance protected by a username and password. Do you have any plans to enhance the plugin to implement this?

    Right now the plugin just returns all nulls due to receiving HTTP 401s when polling the API, and I have confirmed with curl that if we use the username and password when submitting the same request manually, it works.

    Kind Regards,

    Jake

    1. Anonymous (login to see details)

      Hi Jake,

      Like we discussed via email, we could do it two ways:

      1. Embed the "user;password@" in front of the host in the URL, which would expose the password in the clear
      2. Add code to do real basic auth which would base 64 encode the password

      If we set up an "Authentication" drop down property and allow for these

      None

      Authentication via URL

      Basic Authentication

      That way, we could handle each scenario that is known so far, and allow for others that might be applicable down the road.

      I will also look at the other monitors and see how they address it and maybe do it similarly.

      Thanks,

      dave

       

      1. Anonymous (login to see details)

        Hi Dave,

        That approach sounds logical to me. Let me know if you need me to test or do anything else!

        Thanks,

        Jake

        1. Anonymous (login to see details)

          Hi Jake,

          I have a version that does Basic Authentication ready for you to try when you get a chance (and I sent it to you via email).

          Meanwhile, if anyone else has a need for this, let me know and I can get you the new version.

          Thanks,

          dave

  15. Anonymous (login to see details)

    Hello Dave/everyone,

    Have you already tested it on SOLR 6.4.2 ? We have migrated a few weeks ago and it seems a lot of KPI not working anymore.

    I checked some url used by the pluggin and everything seems ok but I don't have anymore data for "num docs", "Avg Requests".

    I don't have any errors in the log. I just get some nulls datas.

    Alex

    1. Anonymous (login to see details)

      Hi Alex,

      I last tested with SOLR 6.3.  I will add this task to my to do list, but it may be a while before I can get to it, unfortunately.

      Thanks,

      dave