Solr: check stats of cores

Engage with the community of users including those using the open source solutions.
Includes Nagios Core, Plugins, and NCPA

Solr: check stats of cores

Postby Quim » Mon Dec 02, 2019 7:28 am

Hello

I am trying to monitoring our internal Solr system with Nagios, especially stats of cores (add screenshot).
Actually I have a script (.sh) with some checks like ping, num_docs,.. Works fine.

Sample for ping check:

# Get ping status of specified core
solr_core_ping() {
# Check if core actually exists before continuing
solr_core_exists $1 || {
echo "not exists => WARNING"
return $STATE_WARNING
}

local RESULT=$(exec_curl ${URL_PREFIX}${O_SOLR_HOST}:${O_SOLR_PORT}/solr/$1/admin/ping?wt=xml |
xmlstarlet sel -t -v "/response/str[@name='status']")

if [ "$RESULT" == "OK" ]; then
echo "OK"
return $STATE_OK
else
echo "$RESULT => CRITICAL"
return $STATE_CRITICAL
fi
}

The issue is how to check stats of cores.
I was wondering if anyone can point me in the right direction. Thanks.

P.D.:
Nagios host
Operating System: Ubuntu 18.04.3 LTS
Kernel: Linux 5.0.0-1022-azure
Architecture: x86-64

Nagios version
Nagios® Core™ 4.4.5
Attachments
Solr.PNG
Stats
Quim
 
Posts: 10
Joined: Tue Nov 12, 2019 10:45 am

Re: Solr: check stats of cores

Postby mcapra » Mon Dec 02, 2019 10:08 am

Here's a reasonably good Solr plugin for Nagios:
https://github.com/cpganderton/nagios-solr

Unfortunately it doesn't check the /select endpoint and would need to be extended to do so. I can't actually find one that does:

https://github.com/alxgomz/nagios-plugi ... co_solr.py
https://github.com/dupondje/nagios_plug ... ck_solr.py

I don't know much about Solr, but my understanding is the /select endpoint expects a query to be passed to it? And you're trying to monitor the response times of a particular query? Or are you trying to monitor stats for all /select calls that have been made over a period of time?
Former Nagios employee
http://www.mcapra.com/
User avatar
mcapra
 
Posts: 3601
Joined: Thu May 05, 2016 3:54 pm

Re: Solr: check stats of cores

Postby cdienger » Mon Dec 02, 2019 3:53 pm

Thanks for the input, @mcapra!

@Quim, let us know if we can be of further assistance.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
cdienger
Support Tech
 
Posts: 4761
Joined: Tue Feb 07, 2017 11:26 am

Re: Solr: check stats of cores

Postby Quim » Tue Dec 03, 2019 7:23 am

Thanks @mcapra!

As you say, endpoint expects a query to be passed to it. This is the issue.
Url (query): core:port/solr/#/vacancy/plugins?type=queryhandler&entry=%2Fselect

I check: https://github.com/alxgomz/nagios-plugin-alfresco-search-services/blob/master/check_alfresco_solr.py
I should to create a new function to check stats.

Thanks
Quim
 
Posts: 10
Joined: Tue Nov 12, 2019 10:45 am

Re: Solr: check stats of cores

Postby scottwilkerson » Wed Dec 04, 2019 9:08 am

Quim wrote:Thanks @mcapra!

As you say, endpoint expects a query to be passed to it. This is the issue.
Url (query): core:port/solr/#/vacancy/plugins?type=queryhandler&entry=%2Fselect

I check: https://github.com/alxgomz/nagios-plugin-alfresco-search-services/blob/master/check_alfresco_solr.py
I should to create a new function to check stats.

Thanks

Can we mark this case closed?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 19094
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Solr: check stats of cores

Postby Quim » Thu Dec 05, 2019 8:42 am

scottwilkerson wrote:Can we mark this case closed?


You can close this case, please.
Thanks
Quim
 
Posts: 10
Joined: Tue Nov 12, 2019 10:45 am

Re: Solr: check stats of cores

Postby scottwilkerson » Thu Dec 05, 2019 9:02 am

Quim wrote:
scottwilkerson wrote:Can we mark this case closed?


You can close this case, please.
Thanks

Great!

Locking thread
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 19094
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises


Return to Community Support

Who is online

Users browsing this forum: steve.hanley and 33 guests