From 2e2b15ad71ee484db3a4da8f492deed63529adbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=B3mas=20Edwardsson?= Date: Thu, 29 Apr 2010 13:30:51 +0000 Subject: [PATCH] perty-nagios-mailer cleanup in paths for consistency with EPEL RPM packages --- .../trunk/perty-nagios-mailer.pl | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/perty-nagios-mailer.pl/trunk/perty-nagios-mailer.pl b/perty-nagios-mailer.pl/trunk/perty-nagios-mailer.pl index fb135a5..4523f9b 100644 --- a/perty-nagios-mailer.pl/trunk/perty-nagios-mailer.pl +++ b/perty-nagios-mailer.pl/trunk/perty-nagios-mailer.pl @@ -23,12 +23,12 @@ use MIME::Entity; use MIME::Base64; # Some defaults -my $pnp4nagios_perfdata = '/nagios/share/perfdata'; -my $pnp4nagios_phpdir = '/nagios/share'; -my $nagios_cgiurl = "http://slxnagios1/nagios/cgi-bin"; -my $pnp4nagios_url = "http://slxnagios1/nagios/pnp4nagios.php"; -my $from_address = 'nagios@lsh.is'; -my $logo = '/nagios/share/images/sblogo.jpg'; +my $pnp4nagios_perfdata = '/var/lib/pnp4nagios/perfdata'; +my $pnp4nagios_phpdir = '/usr/share/nagios/html/pnp4nagios'; +my $nagios_cgiurl = "http://nagios/nagios/cgi-bin"; +my $pnp4nagios_url = "http://nagios/nagios/pnp4nagios/"; +my $from_address = 'nagios@opensource.is'; +my $logo = '/usr/share/nagios/images/sblogo.png'; if (@ARGV != 8) { usage(); @@ -39,7 +39,7 @@ my ($recipient, $date, $type, $host, $ip, $service, $state, $message) = @ARGV; my $rrd = ''; if (-f "$pnp4nagios_perfdata/$host/$service.rrd") { my $t = time(); - $rrd = `( cd $pnp4nagios_phpdir;php -r 'parse_str("host=$host&srv=$service&source=1&view=0&end=$t&display=image", \$_GET); include_once("pnp4nagios.php");' )`; + $rrd = `( cd $pnp4nagios_phpdir;php -r 'parse_str("host=$host&srv=$service&source=1&view=0&end=$t&display=image", \$_GET); include_once("index.php");' )`; } my $head = MIME::Entity->build( @@ -113,7 +113,7 @@ my $html_content = MIME::Entity->build( } . ($rrd ? qq{ - + } : "") . qq{ @@ -124,8 +124,8 @@ my $html_content = MIME::Entity->build( my $rrdimage = MIME::Entity->build( Data => $rrd, - Type => 'image/gif', - Id => '', + Type => 'image/png', + Id => '', Encoding => 'base64' ) if ($rrd); $alt->add_part($txt_content);