Skip to main content

Hi guys,

i found / have following problem with this check .

 

/usr/lib/centreon/plugins/centreon_protocol_http.pl --plugin=apps::protocols::http::plugin --mode=json-content


UNKNOWN: Cannot load module --mode.


Can't locate JSON/Path/Evaluator.pm in @INC (you may need to install the JSON::Path::Evaluator module) (@INC contains: /usr/lib/centreon/plugins FatPacked::94501536145096=HASH(0x55f2da7e1ec8) /usr/local/lib64/perl5/5.32 /usr/local/share/perl5/5.32 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at /usr/local/share/perl5/5.32/JSON/Path.pm line 14.
BEGIN failed--compilation aborted at /usr/local/share/perl5/5.32/JSON/Path.pm line 14.
Compilation failed in require at /usr/lib/centreon/plugins/centreon_protocol_http.pl line 2364.
BEGIN failed--compilation aborted at /usr/lib/centreon/plugins/centreon_protocol_http.pl line 2364.
Compilation failed in require at /usr/lib/centreon/plugins/centreon_protocol_http.pl line 5512.

 

Thanks

 

Hi @ahartung 

It seems to be an issue with the perl-JSON-Path library and not with the plugin itself.

# rpm -ql perl-JSON-Path
/usr/local/share/perl5/5.32/JSON/Constants.pm
/usr/local/share/perl5/5.32/JSON/Evaluator.pm
/usr/local/share/perl5/5.32/JSON/Path.pm
/usr/local/share/perl5/5.32/JSON/Tokenizer.pm
/usr/share/man/man3/JSON::Path.3pm
/usr/share/man/man3/JSON::Path::Constants.3pm
/usr/share/man/man3/JSON::Path::Evaluator.3pm
/usr/share/man/man3/JSON::Path::Tokenizer.3pm

The file /usr/local/share/perl5/5.32/JSON/Path.pm is looking for JSON::Path::Evaluator but the directory Path doesn’t exist.

The workaround is to create the directory and copy the files.

mkdir /usr/local/share/perl5/5.32/JSON/Path
cp /usr/local/share/perl5/5.32/JSON/Constants.pm /usr/local/share/perl5/5.32/JSON/Path/
cp /usr/local/share/perl5/5.32/JSON/Evaluator.pm /usr/local/share/perl5/5.32/JSON/Path/
cp /usr/local/share/perl5/5.32/JSON/Tokenizer.pm /usr/local/share/perl5/5.32/JSON/Path/

 


Hi @sduret 

 

worked perfectly :)

 

Thanks

BR

Andreas


@ahartung it was an issue wirh the version 1.0.3-1.el9 hosted on Centreon repositories.
A new release is available and fixes the issue.

Can you update it?

dnf clean all
dnf update perl-JSON-Path

You should have the 1.0.3-2.el9 version.


Reply