Problem with check_solr

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Problem with check_solr

Post by WillemDH »

Hello,

I'm having some issues with a check_solr plugin I found here: https://github.com/rbramley/Opsview-sol ... check_solr

When using the plugin from cli, no issues:

Code: Select all

[root@nagios libexec]# /usr/local/nagios/libexec/check_solr -H lampsolrqa01 -o cache
OK - Solr Core:  - schema: drupal-1.9.6 | 'queryResultCache hit ratio'=0.99%;;;; 'documentCache hit ratio'=0.00%;;;; 'fieldValueCache hit ratio'=0.00%;;;; 'filterCache hit ratio'=0.00%;;;;
[root@nagios libexec]# /usr/local/nagios/libexec/check_solr -H lampsolrqa01 -o response
OK - Solr Core:  - schema: drupal-1.9.6 - standard avgResponseTime=1.4344318 | 'standard avgResponseTime'=1.4344318ms;;;; 'standard requests'=1487c;;;; 'standard qps'=0.016728139;;;;
[root@nagios libexec]# /usr/local/nagios/libexec/check_solr -H lampsolrqa01 -o numdocs
OK - Solr Core:  - schema: drupal-1.9.6 - numDocs=5297 | numDocs=5297;;;;
[root@nagios libexec]# /usr/local/nagios/libexec/check_solr -H lampsolrqa01 -o updates
OK - Solr Core:  - schema: drupal-1.9.6; cumulative_adds=0; commits=0; optimizes=0; docsPending=0; deletesById=0; deletesByQuery=0 | cumulative_adds=0;;;; commits=0;;;; optimizes=0;;;; docsPending=0;;;; deletesById=0;;;; deletesByQuery=0;;;;
But when making a command like thse (tried different ways)
$USER1$/check_solr -H $HOSTADDRESS$ -o $ARG1$
$USER1$/check_solr $ARG1$ (and specify host in service template)

I keep getting:
(Return code of 13 is out of bounds) in the Nagios XI gui.

When testing from the template, no output is shown, but when I copy the exact same command to cli, it works.....

What am I doing wrong?

Grtz

Willem
Nagios XI 5.8.1
https://outsideit.net
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Problem with check_solr

Post by slansing »

What are the permissions on that script?:

Code: Select all

ls -la /usr/local/nagios/libexec/check_solr
This is the one you are going to want to use in your service:

$USER1$/check_solr -H $HOSTADDRESS$ -o $ARG1$

Are you testing it after applying configuration and looking at the service's details page? Or with the test check command button?
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: Problem with check_solr

Post by WillemDH »

Sam, Permissions were indeed the problem. Sorry for this noobish questions... Should have known. :oops:
Thread can be closed.
Nagios XI 5.8.1
https://outsideit.net
Locked