1 %global contentdir %{_datadir}/netdata
3 # This is temporary and should eventually be resolved. This bypasses
4 # the default rhel __os_install_post which throws a python compile
6 %global __os_install_post %{nil}
10 %bcond_without systemd # systemd
11 %bcond_with nfacct # build with nfacct plugin
13 %if 0%{?fedora} || 0%{?rhel} >= 7 || 0%{?suse_version} >= 1140
15 %undefine with_systemd
20 %global netdata_initd_buildrequires \
21 BuildRequires: systemd-rpm-macros \
23 %global netdata_initd_requires \
24 %{?systemd_requires} \
26 %global netdata_init_post %service_add_post netdata.service
27 %global netdata_init_preun %service_del_preun netdata.service
28 %global netdata_init_postun %service_del_postun netdata.service
30 %global netdata_initd_buildrequires %{nil}
31 %global netdata_initd_requires \
32 Requires(preun): systemd-units \
33 Requires(postun): systemd-units \
34 Requires(post): systemd-units \
36 %global netdata_init_post %systemd_post netdata.service
37 %global netdata_init_preun %systemd_preun netdata.service
38 %global netdata_init_postun %systemd_postun_with_restart netdata.service
41 %global netdata_initd_buildrequires %{nil}
42 %global netdata_initd_requires \
43 Requires(post): chkconfig \
45 %global netdata_init_post \
46 /sbin/chkconfig --add netdata \
48 %global netdata_init_preun %{nil} \
50 /sbin/service netdata stop > /dev/null 2>&1 \
51 /sbin/chkconfig --del netdata \
54 %global netdata_init_postun %{nil} \
55 if [ $1 != 0 ]; then \
56 /sbin/service netdata condrestart 2>&1 > /dev/null \
62 %global netdata_recommends \
64 Recommends: iproute-tc \
65 Recommends: lm_sensors \
66 Recommends: nmap-ncat \
70 Recommends: python2-PyMySQL \
71 Recommends: python2-psycopg2 \
74 %global netdata_recommends %{nil}
77 Summary: Real-time performance monitoring, done right
79 Version: @PACKAGE_RPM_VERSION@
82 Group: Applications/System
83 Source0: http://firehol.org/download/netdata/releases/v@PACKAGE_VERSION@/%{name}-@PACKAGE_VERSION@.tar.xz
84 URL: http://my-netdata.io/
85 BuildRequires: pkgconfig
87 BuildRequires: zlib-devel
88 BuildRequires: libuuid-devel
91 Requires(post): libcap
93 # Packages can be found in the EPEL repo
95 BuildRequires: libmnl-devel
96 BuildRequires: libnetfilter_acct-devel
98 Requires: libnetfilter_acct
101 Requires(pre): /usr/sbin/groupadd
102 Requires(pre): /usr/sbin/useradd
103 Requires(post): libcap
105 %{netdata_initd_buildrequires}
106 %{netdata_recommends}
107 %{netdata_initd_requires}
110 netdata is the fastest way to visualize metrics. It is a resource
111 efficient, highly optimized system for collecting and visualizing any
112 type of realtime timeseries data, from CPU usage, disk activity, SQL
113 queries, API calls, web site visitors, etc.
115 netdata tries to visualize the truth of now, in its greatest detail,
116 so that you can get insights of what is happening now and what just
117 happened, on your systems and applications.
120 %setup -q -n @PACKAGE_NAME@-@PACKAGE_VERSION@
126 %{?with_nfacct:--enable-plugin-nfacct} \
128 %{__make} %{?_smp_mflags}
131 rm -rf "${RPM_BUILD_ROOT}"
132 %{__make} %{?_smp_mflags} DESTDIR="${RPM_BUILD_ROOT}" install
134 find "${RPM_BUILD_ROOT}" -name .keep -delete
136 install -m 644 -p system/netdata.conf "${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}"
137 install -m 755 -d "${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d"
138 install -m 644 -p system/netdata.logrotate "${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/%{name}"
141 install -m 755 -d "${RPM_BUILD_ROOT}%{_unitdir}"
142 install -m 644 -p system/netdata.service "${RPM_BUILD_ROOT}%{_unitdir}/netdata.service"
144 # install SYSV init stuff
145 install -d "${RPM_BUILD_ROOT}/etc/rc.d/init.d"
146 install -m 755 system/netdata-init-d \
147 "${RPM_BUILD_ROOT}/etc/rc.d/init.d/netdata"
151 getent group netdata >/dev/null || groupadd -r netdata
152 getent group docker >/dev/null || groupadd -r docker
153 getent passwd netdata >/dev/null || \
154 useradd -r -g netdata -G docker -s /sbin/nologin \
155 -d %{contentdir} -c "netdata" netdata
161 %{netdata_init_preun}
164 %{netdata_init_postun}
167 rm -rf "${RPM_BUILD_ROOT}"
171 %defattr(-,root,root)
173 %dir %{_sysconfdir}/%{name}
175 %config(noreplace) %{_sysconfdir}/%{name}/*.conf
176 %config(noreplace) %{_sysconfdir}/%{name}/charts.d/*.conf
177 %config(noreplace) %{_sysconfdir}/%{name}/health.d/*.conf
178 #%%config(noreplace) %{_sysconfdir}/%{name}/node.d/*.conf
179 %config(noreplace) %{_sysconfdir}/%{name}/python.d/*.conf
180 %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
182 # To be eventually moved to %%_defaultdocdir
183 %{_sysconfdir}/%{name}/node.d/*.md
184 %{_libexecdir}/%{name}
187 %caps(cap_dac_read_search,cap_sys_ptrace=ep) %attr(0555,root,root) %{_libexecdir}/%{name}/plugins.d/apps.plugin
189 %attr(0700,netdata,netdata) %dir %{_localstatedir}/cache/%{name}
190 %attr(0700,netdata,netdata) %dir %{_localstatedir}/log/%{name}
191 %attr(0700,netdata,netdata) %dir %{_localstatedir}/lib/%{name}
193 %dir %{_datadir}/%{name}
194 %dir %{_sysconfdir}/%{name}/health.d
195 %dir %{_sysconfdir}/%{name}/python.d
198 %{_unitdir}/netdata.service
200 %{_sysconfdir}/rc.d/init.d/netdata
203 # Enforce 0644 for files and 0755 for directories
204 # for the netdata web directory
205 %defattr(0644,root,netdata,0755)
206 %{_datadir}/%{name}/web
209 * Sun Jan 22 2017 Costa Tsaousis <costa@tsaousis.gr> - 1.5.0-1
210 - FreeBSD, MacOS, FreeNAS
212 - dozens of new and improved plugins
213 - dozens of new and improved alarms and notification methods
214 * Tue Oct 4 2016 Costa Tsaousis <costa@tsaousis.gr> - 1.4.0-1
215 - the fastest netdata ever (with a better look too)!
216 - improved IoT and containers support!
217 - alarms improved in almost every way!
218 - Several more improvements, new features and bugfixes.
219 * Sun Aug 28 2016 Costa Tsaousis <costa@tsaousis.gr> - 1.3.0-1
220 - netdata now has health monitoring
221 - netdata now generates badges
222 - netdata now has python plugins
223 - Several more improvements, new features and bugfixes.
224 * Tue Jul 26 2016 Jason Barnett <J@sonBarnett.com> - 1.2.0-2
225 - Added support for EL6
226 - Corrected several Requires statements
227 - Changed default to build without nfacct
228 - Removed --docdir from configure
229 * Mon May 16 2016 Costa Tsaousis <costa@tsaousis.gr> - 1.2.0-1
230 - netdata is now 30% faster.
231 - netdata now has a registry (my-netdata menu on the dashboard).
232 - netdata now monitors Linux containers.
233 - Several more improvements, new features and bugfixes.
234 * Wed Apr 20 2016 Costa Tsaousis <costa@tsaousis.gr> - 1.1.0-1
235 - Several new features (IPv6, SYNPROXY, Users, Users Groups).
236 - A lot of bug fixes and optimizations.
237 * Tue Mar 22 2016 Costa Tsaousis <costa@tsaousis.gr> - 1.0.0-1
238 - First public release.
239 * Sun Nov 15 2015 Alon Bar-Lev <alonbl@redhat.com> - 0.0.0-1