OK, this time it exhibits the bug. The debugger helped me : > DB<1> > check_mk_agent::new(/usr/share/perl5/check_mk_agent.pm:75): > 75: my @lines = <$sock>; > DB<1> > check_mk_agent::new(/usr/share/perl5/check_mk_agent.pm:76): > 76: close $sock; > DB<1> x @lines <=================================== HERE > empty array > DB<2> x $sock > 0 IO::Socket::INET=GLOB(0x1bed9f8) > -> *Symbol::GEN0 > FileHandle({*Symbol::GEN0}) => fileno(6) > DB<3> x %args > 0 'PeerAddr' > 1 '172.29.69.194' > 2 'PeerPort' > 3 6556 > 4 'debug' > 5 1 > This time, I'm ready to debug it. Thanks a lot !
Regards, Xavier On 25/01/2019 04:20, Ivo Kidze wrote: > Can u try > > "/usr/lib64/nagios/plugins/cmk_checks/cmk_load.pl" "-H" "172.29.69.194" "-c" > "8,8,8" "-vd" "-w" "4,4,4" > > on the command line? > > Kind Regards, > Ivo > > -----Original Message----- > From: Xavier Humbert [mailto:xavier.humb...@ac-nancy-metz.fr] > Sent: Thursday, January 24, 2019 1:42 AM > To: Ivo Kidze <ivo.ki...@duke.edu>; Icinga User's Corner > <icinga-users@lists.icinga.org> > Subject: Re: [icinga-users] Nagios plugin fails to execute, but OK in command > line > > > On 23/01/2019 17:21, Ivo Kidze wrote: >> You have to replace hostname with a host in icinga2 and >> icinga_internal_servicename with the name of the service. >> >> Kind Regards, >> Ivo Kidze >> >> -----Original Message----- >> From: Xavier Humbert [mailto:xavier.humb...@ac-nancy-metz.fr] >> Sent: Wednesday, January 23, 2019 1:51 AM >> To: Icinga User's Corner <icinga-users@lists.icinga.org>; Ivo Kidze >> <ivo.ki...@duke.edu> >> Subject: Re: [icinga-users] Nagios plugin fails to execute, but OK in >> command line >> >> >> On 22/01/2019 21:11, Xavier Humbert wrote: >>> On 22/01/2019 18:00, Ivo Kidze wrote: >>>> Hi Xavier, >>>> >>>> Try the following as system sudo user or system root user >>>> >>>> 1. ICINGA2_API_PASSWORD=api_user_password icinga2 console --connect >>>> 'https://api_user@localhost:5665/' >>>> 2. s = >>>> get_service("hostname","icinga_internal_servicename").last_check_res >>>> u >>>> lt.command >>>> 3. s >>>> >>>> Post your result if you can't see what is wrong. >>>> >>>> Kind Regards, >>>> Ivo Kidze > Stupid me ! > > Here is the correct result > >> ICINGA2_API_PASSWORD=0f2a42b2bbdb25af icinga2 console --connect >> 'https://root@localhost:5665/' >> Icinga 2 (version: r2.10.2-1) >> Type $help to view available commands. >> <1> => >> S=get_service("pr-sge-sup02.supgest.in.phm.education.gouv.fr","Load"). >> last_check_result.command >> null >> <2> => S >> [ "/usr/lib64/nagios/plugins/cmk_checks/cmk_load.pl", "-H", >> "172.29.69.194", "-c", "8,8,8", "-vd", "-w", "4,4,4" ] > Thanks, > > Xavier > -- Xavier Humbert CRT Supervision et Exploitation de Niveau 1 Rectorat de Nancy-Metz 03 83 86 27 39
signature.asc
Description: OpenPGP digital signature
_______________________________________________ icinga-users mailing list icinga-users@lists.icinga.org https://lists.icinga.org/mailman/listinfo/icinga-users