Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions check_oracle_health.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
%define debug_package %{nil}

Summary: Nagios plugins to check the status of Oracle Servers
Name: check_oracle_health
Version: 1.7.0
Release: 1%{?dist}
License: GPLv2+
Group: Applications/System
URL: http://labs.consol.de/lang/en/nagios/check_oracle_health/
Source0: http://labs.consol.de/download/shinken-nagios-plugins/check_oracle_health-%{version}.tar.gz
Requires: perl-Nagios-Plugin
Requires: perl-DBD-Sybase
BuildRequires: automake
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)


%description
check_oracle_health is a plugin, which is used to monitor different parameters of an Oracle database.

%prep
%setup -T -b0

%build
aclocal
autoconf
automake
./configure --libexecdir=%{_libdir}/nagios/plugins/ --libdir=%{_libdir}
make


%install
make install DESTDIR="%{buildroot}"

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc README COPYING
%{_libdir}/nagios/plugins/check_oracle_health

%changelog

* Thu Aug 12 2012 Pall Sigurdsson <[email protected]> 1.7.0
- Initial packaging
8 changes: 8 additions & 0 deletions plugins-scripts/Nagios/DBD/Oracle/Server.pm
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,14 @@ sub calculate_result {
if (exists $self->{identstring}) {
$self->{nagios_message} .= $self->{identstring};
}
if ($multiline) {
my $num_ok = @{$self->{nagios}->{messages}->{ $ERRORS{"OK"} } };
my $num_crit = @{$self->{nagios}->{messages}->{ $ERRORS{"CRITICAL"} }};
my $num_warn = @{$self->{nagios}->{messages}->{ $ERRORS{"WARNING"} }};
my $num_unk = @{$self->{nagios}->{messages}->{ $ERRORS{"UNKNOWN"} }};
$self->{nagios_message} .= sprintf "%s ok, %s warnings, %s criticals and %s unknown\n",
$num_ok, $num_warn,$num_crit, $num_unk;
}
if ($self->{report} eq "long") {
$self->{nagios_message} .= $all_messages;
} elsif ($self->{report} eq "short") {
Expand Down