Page 1 of 1

Problem with check_solr

Posted: Fri Sep 19, 2014 7:41 am
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

Re: Problem with check_solr

Posted: Fri Sep 19, 2014 10:51 am
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?

Re: Problem with check_solr

Posted: Mon Sep 22, 2014 2:33 am
by WillemDH
Sam, Permissions were indeed the problem. Sorry for this noobish questions... Should have known. :oops:
Thread can be closed.