Page 1 of 2

Plugin not working

Posted: Tue Feb 10, 2015 8:24 am
by ziedmahjoub
Hello,
i installed a plugin to my nagios core 4.0.8 , which is this one :
http://exchange.nagios.org/directory/Pl ... it/details

And when i'm tying it he gave me this output :

Code: Select all

/usr/local/nagios/libexec$ sudo ./check_nrpe -H 192.168.0.24 -p 5666 -t 30 -c check_kav_adminkit.pl -a <server_name> 1 10 20
UNKNOWN: No handler for that command
and in the web interface the service status is : UNKNOWN (No output returned from plugin)

Re: Plugin not working

Posted: Tue Feb 10, 2015 10:10 am
by tmcdonald
Is perl installed on the remote machine?

Re: Plugin not working

Posted: Tue Feb 10, 2015 11:01 am
by ziedmahjoub
tmcdonald wrote:Is perl installed on the remote machine?
Yes

Re: Plugin not working

Posted: Tue Feb 10, 2015 11:05 am
by ziedmahjoub
i have followed all the steps , i think my problem is in this step :

- Copy the Perl-file into it and edit the configuration (server configuration, configuration, excpetions, ...)

because i didn't know what to change i've only changed the server name

also when i have to add this module :

Code: Select all

[NRPE Handlers] 
command[check_kav_adminkit]=C:Perl64binperl.exe "C:Progra~1NSClient++pluginscheck_kav_adminkit.pl" %1 %2 %3 %4
i think the module is [NRPE client Handlers] not [NRPE Handlers] , right ?

Re: Plugin not working

Posted: Tue Feb 10, 2015 5:07 pm
by abrist
It does not look like the check_NRPE command (check_kav_adminkit.pl) matches the nsclient NRPE handler command (check_kav_adminkit).
Try running the following check from the cli (notice I removed the ".pl" from the command):

Code: Select all

/usr/local/nagios/libexec$ sudo ./check_nrpe -H 192.168.0.24 -p 5666 -t 30 -c check_kav_adminkit -a <server_name> 1 10 20

Re: Plugin not working

Posted: Wed Feb 11, 2015 4:12 am
by ziedmahjoub
i've tried it and i got this output :

Code: Select all

ExternalCommands: failed to create process (C:Perl\bin\perl.exe "C:Program Files\NSClient++\plugins\check_kav_adminkit.pl" %1 %2 %3 %4) : 2: specified file not found 
i dont know why he say : specified file not found , and i'm sure that the file is there !!!!!

and i want to add that when i try this command in the client machine the windows console :

Code: Select all

C:\Windows\System32> C:\Perl\binperl.exe "C:Program Files\NSClient++\plugins\check_kav_adminkit.pl" %1 %2 %3 %4
i got this output :

Code: Select all

sqlcmd' is not recognized as an internal or external command operable program or batch file.
OK - Kaspersky Administration Kit

Re: Plugin not working

Posted: Wed Feb 11, 2015 11:37 am
by scottwilkerson
I'm not familiar with this plugin, however this command appears to be missing some \'s

Code: Select all

[NRPE Handlers]
command[check_kav_adminkit]=C:Perl64binperl.exe "C:Progra~1NSClient++pluginscheck_kav_adminkit.pl" %1 %2 %3 %4
Should it not be something like this?

Code: Select all

[NRPE Handlers]
command[check_kav_adminkit]=C:\Perl64\bin\perl.exe "C:\Progra~1\NSClient++\pluginscheck_kav_adminkit.pl" %1 %2 %3 %4
Of course I don't know your exact path to perl, in some places you list
C:\Perl64\bin\perl.exe
others
C:\Perl\binperl.exe
and others
C:Perl\bin\perl.exe

Re: Plugin not working

Posted: Wed Feb 11, 2015 11:45 am
by ziedmahjoub
scottwilkerson wrote:I'm not familiar with this plugin, however this command appears to be missing some \'s

Code: Select all

[NRPE Handlers]
command[check_kav_adminkit]=C:Perl64binperl.exe "C:Progra~1NSClient++pluginscheck_kav_adminkit.pl" %1 %2 %3 %4
Should it not be something like this?

Code: Select all

[NRPE Handlers]
command[check_kav_adminkit]=C:\Perl64\bin\perl.exe "C:\Progra~1\NSClient++\pluginscheck_kav_adminkit.pl" %1 %2 %3 %4
Of course I don't know your exact path to perl, in some places you list
C:\Perl64\bin\perl.exe
others
C:\Perl\binperl.exe
and others
C:Perl\bin\perl.exe
yes yes , i've corrected it already the path is :

Code: Select all

command[check_kav_adminkit]=C:\Perl\bin\perl.exe "C:\Progra~1\NSClient++\plugins\check_kav_adminkit.pl" %1 %2 %3 %4

look to my post above and you'll see that i'm using a correct path but i dont know where is the problem .

i installed KAV in the client machine to test it but error !!

Re: Plugin not working

Posted: Wed Feb 11, 2015 12:02 pm
by ziedmahjoub
Guys i tried the other KAV plugin which is composed of 2 files (one .pl and the other .bat) :

http://exchange.nagios.org/directory/Pl ... pl/details
http://exchange.nagios.org/directory/Pl ... at/details

and now the output was :

Code: Select all

error - please use a numeric value for the 2nd , the 3rd and the 4th arguments
You can see my command :

Code: Select all

./check_nrpe -H 192.168.0.24 -p 5666 -t 30 -c check_KAV -a <server_name> 1 10 20
i think there is changes that must be done in the Perl files of the plugins !!

Re: Plugin not working

Posted: Wed Feb 11, 2015 12:23 pm
by abrist
Does your <server name> have a space or other "special" character in it?