X-Git-Url: http://git.onelab.eu/?p=myops.git;a=blobdiff_plain;f=myops.spec;fp=myops.spec;h=3b4ebb712666f101fca916063671a2873dc319f9;hp=c25cb4c0b8050d2a0ee19bba8340ef09c32ad09e;hb=bccc4741c3264bc2d8c47c7ab06eb691fb3a8582;hpb=9bb5213371c2a3075adaed95d0e1e6ef5a58e7d6 diff --git a/myops.spec b/myops.spec index c25cb4c..3b4ebb7 100644 --- a/myops.spec +++ b/myops.spec @@ -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/ @@ -128,6 +164,7 @@ ls $RPM_BUILD_ROOT 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,6 +174,11 @@ 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 @@ -144,6 +186,7 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root) /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 +196,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