Plugin not working

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
ziedmahjoub
Posts: 142
Joined: Fri Jan 16, 2015 5:22 am

Plugin not working

Post 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)
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Plugin not working

Post by tmcdonald »

Is perl installed on the remote machine?
Former Nagios employee
ziedmahjoub
Posts: 142
Joined: Fri Jan 16, 2015 5:22 am

Re: Plugin not working

Post by ziedmahjoub »

tmcdonald wrote:Is perl installed on the remote machine?
Yes
ziedmahjoub
Posts: 142
Joined: Fri Jan 16, 2015 5:22 am

Re: Plugin not working

Post 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 ?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Plugin not working

Post 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
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
ziedmahjoub
Posts: 142
Joined: Fri Jan 16, 2015 5:22 am

Re: Plugin not working

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Plugin not working

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
ziedmahjoub
Posts: 142
Joined: Fri Jan 16, 2015 5:22 am

Re: Plugin not working

Post 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 !!
ziedmahjoub
Posts: 142
Joined: Fri Jan 16, 2015 5:22 am

Re: Plugin not working

Post 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 !!
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Plugin not working

Post by abrist »

Does your <server name> have a space or other "special" character in it?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked