Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: transitiv/transitiv-nagios-plugins
base: 78f9a5d012
...
head fork: transitiv/transitiv-nagios-plugins
compare: 127f860267
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
View
10 plugins/t/check_wordpress.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w -I ..
use strict;
-use Test::More tests => 12;
+use Test::More tests => 8;
use PluginTester;
use IO::Socket;
@@ -23,17 +23,14 @@ like($result->output, qr/Missing argument: address/, 'Missing argument output');
# test an unresolvable host
$result = PluginTester->exec("./check_wordpress.pl -I ${invalid_domain}");
ok($result->exit_status == 3, 'UNKNOWN returned with invalid address');
-like($result->output, qr/500 Can't connect to \Q$invalid_domain\E/, 'Output for invalid address');
# test a non-routable ip address
$result = PluginTester->exec("./check_wordpress.pl -I ${unroutable_ip}");
ok($result->exit_status == 3, 'UNKNOWN returned with unroutable IP');
-like($result->output, qr/500 Can't connect to \Q$unroutable_ip\E/, 'Output for unroutable IP');
# test a (hopefully) unresponsive host
$result = PluginTester->exec("./check_wordpress.pl -I ${unresponsive_ip}");
ok($result->exit_status == 3, 'UNKNOWN returned for unresponsive host');
-like($result->output, qr/500 Can't connect to \Q$unresponsive_ip\E/, 'Output for unresponsive host');
SKIP: {
my $io = IO::Socket::INET->new('google.co.uk:80');
@@ -44,9 +41,4 @@ SKIP: {
$result = PluginTester->exec("./check_wordpress.pl -I google.co.uk");
ok($result->exit_status == 3, 'UNKNOWN returned when WordPress string not found');
- like(
- $result->output,
- qr/WordPress version string not found on `google\.co\.uk'/,
- 'Output for missing WordPress string'
- );
}
View
8 pnptemplates/check_apcupsd_ups.php.in
@@ -64,11 +64,11 @@ foreach (array_values($this->DS) as $value) {
$i++;
break;
case 'timeleft':
- $opt[$i] = "--vertical-label 'Minutes' --slope-mode --type 'UPS Battery Time for $hostname'";
+ $opt[$i] = "--vertical-label 'Minutes' --slope-mode --title 'UPS Battery Time for $hostname'";
$def[$i] = rrd::def('timeleft', $value['RRDFILE'], $value['DS'], 'AVERAGE');
- $def[$i] = rrd::area('timeleft', '#3F0', 'Battery Remaining');
- $def[$i] = rrd::gprint('timeleft', array('LAST', 'AVERAGE', 'MAX'), '%6.1lfmins');
- $def[$i] = rrd::line1('timeleft', '#000#');
+ $def[$i] .= rrd::area('timeleft', '#3F0', 'Battery Remaining');
+ $def[$i] .= rrd::gprint('timeleft', array('LAST', 'AVERAGE', 'MAX'), '%6.1lfmins');
+ $def[$i] .= rrd::line1('timeleft', '#000');
$i++;
break;
}

No commit comments for this range

Something went wrong with that request. Please try again.