Page 2 of 2

Re: Error while following document for Vmware monitoring

Posted: Mon Nov 30, 2020 4:09 pm
by vtrac
Hi pratikmehta003,
Your "http_proxy" setting inside the "/etc/yum.conf" file is only for when you are using "yum".
The CPAN or CPANM still not knowing those proxy settings yet.
The error you are seeing is because CPAN or CPANM were not able to first download the package then unpack it.

Here's an example of what you might see with if cpan or cpanm working correctly .... "Fetching", then "Unpacking":

Code: Select all

--> Working on Module::Metadata
Fetching http://www.cpan.org/authors/id/E/ET/ETHER/Module-Metadata-1.000022.tar.gz ... OK
Unpacking Module-Metadata-1.000022.tar.gz
As "root", open the command prompt and do the followings ... you do need your proxy's info:
https://blog.khmersite.net/2013/11/sett ... -for-cpan/

Code: Select all

To enable CPAN behind proxy:

# perl -MCPAN -e shell
Terminal does not support AddHistory.

cpan shell -- CPAN exploration and modules installation (v1.9402)
Enter 'h' for help.

cpan[1]> o conf init /proxy/

If you're accessing the net via proxies, you can specify them in the
CPAN configuration or via environment variables. The variable in
the $CPAN::Config takes precedence.

 <ftp_proxy>
Your ftp_proxy? []

 <http_proxy>
Your http_proxy? [webproxy.yourdomain.com:8080]

 <no_proxy>
Your no_proxy? []

If your proxy is an authenticating proxy, you can store your username
permanently. If you do not want that, just press RETURN. You will then
be asked for your username in every future session.

Your proxy user id? []

Please remember to call 'o conf commit' to make the config permanent!

cpan[2]> o conf commit
commit: wrote '/usr/share/perl5/CPAN/Config.pm'
Now do the below steps:

Code: Select all

yum install perl-Crypt-SSLeay -y
yum install -y libxml2-devel xml2 libuuid-devel perl-XML-LibXML perl-Env
export PERL_MM_USE_DEFAULT=1
cpan -i App::cpanminus
cpanm --notest Module::Build Crypt::SSLeay
cpan -i Nagios::Monitoring::Plugin Nagios::Monitoring::Plugin::Functions
Here's the article for using proxy server in Nagios XI:
https://assets.nagios.com/downloads/nag ... Server.pdf

Hope this helps!

Regards
Vinh

Re: Error while following document for Vmware monitoring

Posted: Mon Nov 30, 2020 4:20 pm
by benjaminsmith
Hi,

I see you opened a ticket for this issue, so we'll close the post and move this case over to the ticket so we can best focus our efforts.

https://support.nagios.com/tickets/scp/ ... p?id=12090

Best Regards,
Benjamin
Nagios Support Team