nagios4dd icon indicating copy to clipboard operation
nagios4dd copied to clipboard

Cannot download PNP4Nagios image file. Server response: 500 Can't connect to hostname

Open pilot513 opened this issue 6 years ago • 5 comments

Hello! When i try send "graph" from pnp4nagios (https://hostname/pnp4nagios) script get error: Cannot download PNP4Nagios image file. Server response: 500 Can't connect to hostname:443

All variables set in my $pnp4nagios_auth = "true"; # $pnp4nagios_auth = "true"; my $server_port = "hostname:443"; # $server_port = "nagios.frank4dd.com:80"; my $auth_name = "Nagios Access"; # $auth_name = "pnp4nagios"; my $web_user = "pnp4nget"; # $web_user = "pnp4nget"; my $web_pass = "P@ssw0rd"; # $web_pass = "mypass";

And little change URL: #$img_get = "$pnp4nagios_url/image?host=" . urlencode($o_hostname) . "&srv=" . urlencode($o_servicedesc) . "&source=0&start=$tstart&end=$tstamp"; $img_get = "$pnp4nagios_url/graph?host=" . urlencode($o_hostname) . "&srv=" . urlencode($o_servicedesc) . "&source=0&start=$tstart&end=$tstamp"; In debug eMail, when i get it, link to graph right. In browser i get it.

img_get | https://hostname/pnp4nagios/graph?host=hostname&srv=Total_Processes&source=0&start=1508344713&end=1508434713

Why you used "=>" ? vs ", " # Check if web authentication is required if (defined($pnp4nagios_auth)) { $ua->credentials("$server_port", "$auth_name", "$web_user" => "$web_pass"); }

http://search.cpan.org/~benning/LWP-Protocol-connect-6.09/lib/LWP/Protocol/connect.pm $ua->credentials("localhost:3128", "Squid proxy-caching web server", "user", "pw"); 3.10.0-693.2.1.el7.x86_64 #1 SMP Fri Aug 11 04:58:43 EDT 2017 x86_64 OEL 7.4 rpm -qa | egrep 'LWP|IO' perl-LWP-Protocol-https-6.04-4.el7.noarch perl-IO-Socket-SSL-1.94-6.el7.noarch perl-IO-Socket-INET6-2.69-5.el7.noarch perl-LWP-MediaTypes-6.02-2.el7.noarch perl-IO-HTML-1.00-2.el7.noarch perl-IO-Socket-IP-0.21-4.el7.noarch perl-IO-Compress-2.061-2.el7.noarch

pilot513 avatar Oct 19 '17 17:10 pilot513