Page 1 of 1
Worker commands run - Nagios Xi Don´t
Posted: Thu Nov 29, 2018 2:16 pm
by rpatricio
Hi all,
I created a worker to help xi on some network checks, but some checks runs perfectly on command line and on the service when I am going to test the command on XI runs perfectly also, but on service status, xi shows a different message, as it is a plugin problem.
Images are attached.
Can someone help me on this question?
Re: Worker commands run - Nagios Xi Don´t
Posted: Thu Nov 29, 2018 5:55 pm
by scottwilkerson
Do you have multiple Socket.pm files on the system? It seems like you may have multiple perl paths with possible conflicting versions
Re: Worker commands run - Nagios Xi Don´t
Posted: Fri Nov 30, 2018 5:45 am
by rpatricio
Hi Scott,
this is the output of the locate Socket.pm on the worker machine:
/home/nagios/perl5/lib/perl5/x86_64-linux-thread-multi/Socket.pm
/home/nrpe2/.cpan/build/Socket-2.027-RZ8sge/Socket.pm
/home/nrpe2/.cpan/build/Socket-2.027-RZ8sge/blib/lib/Socket.pm
/home/nrpe2/perl5/lib/perl5/x86_64-linux-thread-multi/Socket.pm
/home/oracle/perl5/lib/perl5/x86_64-linux-thread-multi/Socket.pm
/root/.cpan/build/IO-1.39-0/blib/lib/IO/Socket.pm
/root/.cpan/build/IO-1.39-0/lib/IO/Socket.pm
/root/.cpan/build/Socket-2.027-0/Socket.pm
/root/.cpan/build/Socket-2.027-0/blib/lib/Socket.pm
/root/.cpan/build/Socket-2.027-RZ8sge/Socket.pm
/root/.cpan/build/Socket-2.027-RZ8sge/blib/lib/Socket.pm
/root/perl5/lib/perl5/x86_64-linux-thread-multi/Socket.pm
/root/perl5/lib/perl5/x86_64-linux-thread-multi/IO/Socket.pm
/usr/lib64/perl5/IO/Socket.pm
/usr/lib64/perl5/vendor_perl/Socket.pm
/usr/local/lib64/perl5/Socket.pm
------------------------------------------------------------------------------------
This is the output of Locate socket.pm on Nagios XI machine:
/usr/lib64/perl5/IO/Socket.pm
/usr/lib64/perl5/vendor_perl/Socket.pm
As I don´t understand so much about perl, would you help me figure out, what should I do to fix this error?
Re: Worker commands run - Nagios Xi Don´t
Posted: Fri Nov 30, 2018 2:20 pm
by scottwilkerson
This is connecting to a worker machine and running another command?
looking at the worker machine it looks like someone installed a bunch of different version which would really throw things off
You are likely going to have to run the following on each of the Socket.pm files to determine which are the wrong version (2.027), and then I would suggest moving them to a temp location that won't be picked up as part of the path
Re: Worker commands run - Nagios Xi Don´t
Posted: Tue Dec 04, 2018 6:48 am
by rpatricio
This is connecting to a worker machine and running another command?
Yes, worker is executing the command, and nagios xi is showing the result.
looking at the worker machine it looks like someone installed a bunch of different version which would really throw things off
You are likely going to have to run the following on each of the Socket.pm files to determine which are the wrong version (2.027), and then I would suggest moving them to a temp location that won't be picked up as part of the path
I will try do it, and let you know.
Re: Worker commands run - Nagios Xi Don´t
Posted: Tue Dec 04, 2018 8:32 am
by scottwilkerson
rpatricio wrote:I will try do it, and let you know.
Sounds good