2 %define rel %
(date '
+%Y%m%d%H%M'
)
4 Summary: Nagios
(R
) compatible monitoring tool
8 Source0: http
://ftp.monitoring
-fr.org
/JEAN
/shinken
-%{version}.tgz
9 Source1: %{name}-configs.tar.bz2
11 Group: Applications
/System
12 URL: http
://www.shinken
-monitoring.org
/
13 Requires: python26
, python26
-pyro
< 4.0, chkconfig
14 BuildRequires
: python26
15 BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
19 # Shinken process user and group
20 %define shinken_user shinken
21 %define shinken_group shinken
23 # Default SysV service
24 %define sysv_service shinken
-all
26 # Shinken requires python 2.6
27 %global __python
/usr
/bin
/python26
29 %define python_sitelib %
(%{__python} -c "from distutils.sysconfig import get_python_lib
; print get_python_lib
()"
)
34 Shinken is a new
, Nagios
(R
) compatible monitoring tool
, written
in Python. The main goal of Shinken is to allow users to have a fully flexible architecture
for their monitoring system that can easily scale to large environments.
36 Shinken is backwards
-compatible with the Nagios
(R
) configuration standard and plugins.
37 Shinken also provides interfaces with NDODB and Merlin database
, Livestatus connector
38 Shinken does not include any human interfaces.
40 Nagios is a registered trademark owned by Nagios Enterprises.
43 Shinken est un nouvel outil de supervision compatible avec Nagios
(R
) et écrit en Python. L'objectif de Shinken de vous permettre de construire une architecture de supervision flexible et capable de s'adapter de large environnements.
45 Shinken est compatible avec les fichiers de configuration de Nagios
(R
) ainsi que les plugins.
46 Shinken fournit les connecteurs pour les bases NDODB et Merlin
, ainsi qu'une interface Livestatus.
47 Shinken ne fourni pas d'interfaces graphiques.
49 Nagios est une marque déposée de Nagios Enterprises.
53 #%setup -n %{name}-%{version}
58 %{__tar} xjf %{SOURCE1}
63 %{__sed} -i 's
/\
/env python$
/\
/env python26
/' bin
/*.py
66 %{__python} -m compileall bin shinken
69 [ -d
%{buildroot} -a "%{buildroot}" != "" ] && %{__rm} -rf %{buildroot}
72 %{__install} -d -m0755 %{buildroot}%{_sbindir}
73 %{__install} -p -m0755 bin/shinken-*.py{,c} %{buildroot}%{_sbindir}
76 %{__install} -d -m0755 %{buildroot}%{python_sitelib}/shinken
77 %{__install} -p -m0644 shinken/*.py{,c} %{buildroot}%{python_sitelib}/shinken
81 %{__install} -d -m0755 %{buildroot}%{_sysconfdir}/%{name}/
82 %{__install} -p -m0755 configs/*.ini %{buildroot}%{_sysconfdir}/%{name}/
83 %{__install} -p -m0644 etc/shinken-specific.cfg %{buildroot}%{_sysconfdir}/%{name}/
86 %{__install} -d -m0755 %{buildroot}%{_initrddir}
87 %{__install} -p -m0755 bin/init.d/shinken-* %{buildroot}%{_initrddir}/
90 %{__install} -d -m0775 %{buildroot}%{_localstatedir}/log/%{name}/
93 %{__install} -d -m0775 %{buildroot}%{_localstatedir}/run/%{name}/
96 %{__install} -d -m0775 %{buildroot}%{_localstatedir}/lib/%{name}/
100 [ -d
%{buildroot} -a "%{buildroot}" != "" ] && %{__rm} -rf %{buildroot}
103 #====[ pre installation scripts:
106 echo Adding
%{shinken_user} user ...
107 /usr
/sbin
/useradd
-M
-o
-r
-d
%{_localstatedir}/log/%{name} -s /sbin/nologin -c "Shinken user" %{shinken_user} > /dev
/null
2>&1 ||
:
110 #====[ post installation scripts:
112 # Add initscript to system V start :
113 /sbin
/chkconfig
--add
%{sysv_service}
114 /sbin
/chkconfig
%{sysv_service} on
117 #====[ pre uninstall scripts
119 if [ $
1 -eq
0 ]; then
120 # Stop and remove initscript :
121 /sbin
/service
%{sysv_service} stop
&>/dev
/null ||
:
122 /sbin
/chkconfig
--del
%{sysv_service}
128 %defattr(-,root
,root
)
129 %doc README COPYING Changelog FROM_NAGIOS_TO_SHINKEN THANKS db doc
131 %{_initrddir}/shinken
-*
132 %{_sbindir}/shinken
-*
133 %{python_sitelib}/shinken
135 %config(noreplace
) %{_sysconfdir}/%{name}/*.ini
136 %config(noreplace
) %{_sysconfdir}/%{name}/*.cfg
139 %attr(-,%{shinken_user} ,%{shinken_group}) %dir %{_localstatedir}/log/%{name}
140 %attr(-,%{shinken_user} ,%{shinken_group}) %dir %{_localstatedir}/lib/%{name}
141 %attr(-,%{shinken_user} ,%{shinken_group}) %dir %{_localstatedir}/run/%{name}
144 * Thu Aug
5 2010 Stéphane Urbanovski
<s.urbanovski@ac
-nancy
-metz.fr
> - 0.2