Never miss an old file
[myops.git] / myops.spec
index c25cb4c..5d99cfa 100644 (file)
@@ -7,7 +7,7 @@
 %define name myops
 # keep this version in sync with monitor/monitor_version.py
 %define version 1.0
-%define taglevel 0
+%define taglevel 1
 
 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
 %global python_sitearch        %( python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)" )
@@ -91,6 +91,41 @@ Requires: php
 %description getqueryview
 The combination of collection, query and view servers.
 
+######################################## NAGIOS
+
+%package policy
+Summary: MyOps integration with Nagios
+Group: Applications/System
+
+Requires: coreutils
+Requires: passwd
+Requires: gd
+Requires: gd-devel
+Requires: mysql
+Requires: mysql-server
+Requires: mysql-devel
+Requires: mysql-libs
+Requires: mailx
+Requires: sendmail
+Requires: php
+Requires: httpd
+
+Requires: cronie
+Requires: nagios
+Requires: nagios-common
+Requires: nagios-devel
+Requires: nagios-plugins-all
+Requires: ndoutils
+Requires: ndoutils-mysql
+
+Requires: rt3
+
+
+%description policy
+Scripts and setup necessary to integrate and monitor PLC with Nagios.
+Best suited to F12 or above.
+
+
 %prep
 %setup -q
 
@@ -111,8 +146,9 @@ install -d $RPM_BUILD_ROOT/etc/planetlab/db-config.d/
 install -d $RPM_BUILD_ROOT/var/www/html/PlanetLabConf/
 install -d $RPM_BUILD_ROOT/var/www/html/view
 
-rsync -a ./puppet  $RPM_BUILD_ROOT/usr/share/myops/
-rsync -a ./web $RPM_BUILD_ROOT/usr/share/myops/
+rsync -a ./puppet $RPM_BUILD_ROOT/usr/share/myops/
+rsync -a ./web    $RPM_BUILD_ROOT/usr/share/myops/
+rsync -a ./nagios $RPM_BUILD_ROOT/usr/share/myops/
 
 # Generate an autosign list from plc node hostnames
 install -D -m 755 puppet/cron.d/autosign.plcsh $RPM_BUILD_ROOT/%{_sysconfdir}/cron.hourly/
@@ -126,8 +162,10 @@ rsync -ar ./puppet/server/modules $RPM_BUILD_ROOT/%{_sysconfdir}/puppet/
 ls web/collect
 ls $RPM_BUILD_ROOT
 
+install -D -m 644 README $RPM_BUILD_ROOT/usr/share/%{name}/
 install -D -m 644 web/db-config.d/030-conf_files_myops $RPM_BUILD_ROOT/etc/planetlab/db-config.d
 install -D -m 755 web/collect/sar2graphite.py $RPM_BUILD_ROOT/usr/bin/
+install -D -m 755 web/collect/client/update.sh $RPM_BUILD_ROOT/var/www/html/PlanetLabConf/myops_update_sh
 install -D -m 755 web/collect/sar2graphite.py $RPM_BUILD_ROOT/var/www/html/PlanetLabConf/
 install -D -m 644 web/collect/cron.d/sysstat.cron $RPM_BUILD_ROOT/var/www/html/PlanetLabConf/
 install -D -m 644 web/collect/cron.d/sysstat.cron $RPM_BUILD_ROOT/%{_sysconfdir}/cron.d/
@@ -137,13 +175,20 @@ install -D -m 755 web/collect/server/cron.hourly/load_all_couchdb.sh $RPM_BUILD_
 install -D -m 644 web/view/urllist.txt $RPM_BUILD_ROOT/var/www/html/view/
 install -D -m 644 web/view/index.php $RPM_BUILD_ROOT/var/www/html/view/
 
+install -D -m 755 nagios/myops-nagios.init $RPM_BUILD_ROOT/%{_sysconfdir}/plc.d/myops-nagios
+install -D -m 644 nagios/myops-nagios.cron $RPM_BUILD_ROOT/%{_sysconfdir}/cron.d/myops-nagios.cron
+install -D -m 644 nagios/plc.py $RPM_BUILD_ROOT/usr/share/%{name}/nagios/
+install -D -m 644 nagios/generic.py $RPM_BUILD_ROOT/usr/share/%{name}/nagios/
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files getqueryview
 %defattr(-,root,root)
+/usr/share/%{name}/README
 /usr/share/%{name}/web
 /%{_sysconfdir}/cron.d/sysstat.cron
+/var/www/html/PlanetLabConf/myops_update_sh
 /var/www/html/PlanetLabConf/sysstat.cron
 /var/www/html/PlanetLabConf/sar2graphite.py*
 /usr/bin/sar2graphite.py
@@ -153,6 +198,12 @@ rm -rf $RPM_BUILD_ROOT
 /var/www/html/view/urllist.txt
 /var/www/html/view/index.php
 
+%files policy
+%defattr(-,root,root)
+%{_sysconfdir}/plc.d/myops-nagios
+/usr/share/%{name}/nagios 
+%{_sysconfdir}/cron.d/myops-nagios.cron
+
 %files puppet-server
 %defattr(-,root,root)
 /%{_sysconfdir}/cron.hourly/autosign.plcsh