rpms/nagios/devel nagios.upgrade_to_v3.ReadMe, NONE, 1.1 nagios.upgrade_to_v3.sh, NONE, 1.1 nagios.spec, 1.56, 1.57
Robert M. Albrecht (romal)
fedora-extras-commits at redhat.com
Wed Jul 23 16:33:29 UTC 2008
Author: romal
Update of /cvs/pkgs/rpms/nagios/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26475
Modified Files:
nagios.spec
Added Files:
nagios.upgrade_to_v3.ReadMe nagios.upgrade_to_v3.sh
Log Message:
Added upgrade-scripts and german translations
--- NEW FILE nagios.upgrade_to_v3.ReadMe ---
Nagios v3 Upgrade Considerations
================================
This applies if you are upgrading from Nagios v2.
The Nagios v2 nagios.cfg is will not pass a Nagios v3 syntax check without modification.
The attribute "check_result_buffer_slots" from Nagios v2 is incompatible with Nagios v3 and will generate and error.
In order to force a Nagios v2 nagios.cfg file to run with Nagios v3 simply commment out the "check_result_buffer_slots" line
The included script upgrade_nagios.cfg_to_v3.sh will do this automatically for the file
/etc/nagios/nagios.cfg (the standard location for the nagios.cfg file)
This is a work-around and you should consider implementing the new nagios.cfg file, which includes several new options. as soon as possible so that you can take advantage of the new features.
--- NEW FILE nagios.upgrade_to_v3.sh ---
#!/bin/sh
# this script checks the nagios.cfg file and comments out the following line which is incompatible with Nagios v3
# check_result_buffer_slots=4096
# this then allows your existing Nagios v2 nagios.cfg file to be operational with Nagios v3
# You will want to migrate to the Nagios v3 nagios.cfg file as soon as possible to take advantage of new features
# this is the nagios.cfg file we will modify
nagios_cfg=/etc/nagios/nagios.cfg
tmp1=/tmp/nagioscfg.$$.tmp
# search for and replace the check_result_buffer_slots attribute into a temporary file
cat $nagios_cfg | sed --regexp-extended "s/^(\s*check_result_buffer_slots\s*=\s*)/# Line Commented out for Nagios v3 Compatibility\n#\1/g" > $tmp1
# check the diff
diff_output=`diff -u $nagios_cfg $tmp1`
diff_exit=$?
# now decided whether or not to replace the file
if [ "$diff_exit" = "0" ]; then
echo "No changes were made to the Nagios Config file: $nagios_cfg"
elif [ "$diff_exit" = "1" ]; then
echo "The following changes were made to the Nagios Config file: $nagios_cfg"
echo "$diff_output"
# since changes were made, move the temp file into place
cp $nagios_cfg $nagios_cfg.v2
mv $tmp1 $nagios_cfg
else
echo "ERROR: Unexpected exit code from diff. No changes made to file: $nagios_cfg"
fi
rm -f $tmp1
Index: nagios.spec
===================================================================
RCS file: /cvs/pkgs/rpms/nagios/devel/nagios.spec,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -r1.56 -r1.57
--- nagios.spec 10 Jul 2008 17:31:52 -0000 1.56
+++ nagios.spec 23 Jul 2008 16:32:30 -0000 1.57
@@ -12,6 +12,8 @@
Source2: nagios.htaccess
Source3: nagios.internet.cfg
Source4: nagios.htpasswd
+Source5: nagios.UpgradeToVersion3.ReadMe
+Source6: nagios.UpgradeToVersion3.sh
Patch0: nagios-initrd.patch
#Patch1: nagios.cfg.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -27,6 +29,9 @@
Requires(post): initscripts, chkconfig, shadow-utils
Requires(postun): initscripts
+Summary: Nagios monitors hosts and services and yells if somethings breaks
+Summary(de): Nagios überwacht Dienste und Rechner und meldet Ihnen Ausfälle
+
%description
Nagios is a program that will monitor hosts and services on your
network. It has the ability to send email or page alerts when a
@@ -42,6 +47,18 @@
This package provides the core program, web interface, and documentation
files for Nagios. Development files are built as a separate package.
+%description -l (de)
+Nagios ist ein Programm zum Ãberwachen von Rechner und Diensten
+in Ihrem Netzwerk. Wenn etwas ausfällt, kann es Sie per eMail
+oder Pager benachrichtigen. Nagios ist in C geschrieben und
+sollte auf allen Unix-Varianten (inklusive Linux :-) laufen. Es
+läuft als Dämon und überwacht laufend alle konfigurierten
+Dienste.
+
+Nagios überprüft die Rechner und Dienste nicht selber, sondern
+braucht dafür externe Programme. Viele dieser Programme finden
+Sie im Paket nagios-plugins.
+
%package devel
Group: Applications/System
Summary: Provides include files that Nagios-related applications may compile against
@@ -92,6 +109,8 @@
-e "s|command_file=/var/log/nagios/rw/nagios.cmd|command_file=%{_localstatedir}/spool/%{name}/cmd/nagios.cmd|" < sample-config/nagios.cfg > sample-config/nagios.cfg.fedora
%{__sed} -e "s|/usr/lib/|%{_libdir}/|" %{SOURCE2} > %{name}.htaccess
%{__mv} -f sample-config/nagios.cfg.fedora sample-config/nagios.cfg
+%{__cp} -f %{SOURCE5} UpgradeToVersion3.ReadMe
+%{__cp} -f %{SOURCE6} UpgradeToVersion3.sh
echo >> html/stylesheets/common.css
%install
@@ -156,7 +175,7 @@
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/html
%doc %{_datadir}/%{name}/html/docs
-%doc Changelog INSTALLING LICENSE README UPGRADING
+%doc Changelog INSTALLING LICENSE README UPGRADING UpgradeToVersion3.ReadMe UpgradeToVersion3.sh
%{_datadir}/%{name}/html/[^d]*
%{_sbindir}/*
%{_bindir}/*
@@ -183,6 +202,13 @@
%{_includedir}/%{name}
%changelog
+* Mon Jul 23 2008 Robert M. Albrecht <romal at gmx.de> 3.0.3-8
+- Matthew Jurgens provided a script and Readme for upgrading your config to Release 3
+
+* Mon Jul 22 2008 Robert M. Albrecht <romal at gmx.de> 3.0.3-7
+- Added summary
+- Added german translations
+
* Tue Jul 10 2008 Robert M. Albrecht <romal at gmx.de> 3.0.3-6
- disabled conf.d in nagios.conf for now
More information about the fedora-extras-commits
mailing list