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: https://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
92 # Packages can be found in the EPEL repo
94 BuildRequires: libmnl-devel
95 BuildRequires: libnetfilter_acct-devel
97 Requires: libnetfilter_acct
100 Requires(pre): /usr/sbin/groupadd
101 Requires(pre): /usr/sbin/useradd
102 Requires(post): libcap
104 %{netdata_initd_buildrequires}
105 %{netdata_recommends}
106 %{netdata_initd_requires}
109 netdata is the fastest way to visualize metrics. It is a resource
110 efficient, highly optimized system for collecting and visualizing any
111 type of realtime timeseries data, from CPU usage, disk activity, SQL
112 queries, API calls, web site visitors, etc.
114 netdata tries to visualize the truth of now, in its greatest detail,
115 so that you can get insights of what is happening now and what just
116 happened, on your systems and applications.
119 %setup -q -n @PACKAGE_NAME@-@PACKAGE_VERSION@
125 %{?with_nfacct:--enable-plugin-nfacct} \
127 %{__make} %{?_smp_mflags}
130 rm -rf "${RPM_BUILD_ROOT}"
131 %{__make} %{?_smp_mflags} DESTDIR="${RPM_BUILD_ROOT}" install
133 find "${RPM_BUILD_ROOT}" -name .keep -delete
135 install -m 644 -p system/netdata.conf "${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}"
136 install -m 755 -d "${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d"
137 install -m 644 -p system/netdata.logrotate "${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/%{name}"
140 install -m 755 -d "${RPM_BUILD_ROOT}%{_unitdir}"
141 install -m 644 -p system/netdata.service "${RPM_BUILD_ROOT}%{_unitdir}/netdata.service"
143 # install SYSV init stuff
144 install -d "${RPM_BUILD_ROOT}/etc/rc.d/init.d"
145 install -m 755 system/netdata-init-d \
146 "${RPM_BUILD_ROOT}/etc/rc.d/init.d/netdata"
150 getent group netdata >/dev/null || groupadd -r netdata
151 getent group docker >/dev/null || groupadd -r docker
152 getent passwd netdata >/dev/null || \
153 useradd -r -g netdata -G docker -s /sbin/nologin \
154 -d %{contentdir} -c "netdata" netdata
160 %{netdata_init_preun}
163 %{netdata_init_postun}
166 rm -rf "${RPM_BUILD_ROOT}"
170 %defattr(-,root,root)
172 %dir %{_sysconfdir}/%{name}
174 %config(noreplace) %{_sysconfdir}/%{name}/*.conf
175 %config(noreplace) %{_sysconfdir}/%{name}/charts.d/*.conf
176 %config(noreplace) %{_sysconfdir}/%{name}/health.d/*.conf
177 #%%config(noreplace) %{_sysconfdir}/%{name}/node.d/*.conf
178 %config(noreplace) %{_sysconfdir}/%{name}/python.d/*.conf
179 %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
181 # To be eventually moved to %%_defaultdocdir
182 %{_sysconfdir}/%{name}/node.d/*.md
183 %{_libexecdir}/%{name}
186 %caps(cap_dac_read_search,cap_sys_ptrace=ep) %attr(0555,root,root) %{_libexecdir}/%{name}/plugins.d/apps.plugin
188 %attr(0700,netdata,netdata) %dir %{_localstatedir}/cache/%{name}
189 %attr(0700,netdata,netdata) %dir %{_localstatedir}/log/%{name}
190 %attr(0700,netdata,netdata) %dir %{_localstatedir}/lib/%{name}
192 %dir %{_datadir}/%{name}
193 %dir %{_sysconfdir}/%{name}/health.d
194 %dir %{_sysconfdir}/%{name}/python.d
197 %{_unitdir}/netdata.service
199 %{_sysconfdir}/rc.d/init.d/netdata
202 # Enforce 0644 for files and 0755 for directories
203 # for the netdata web directory
204 %defattr(0644,root,netdata,0755)
205 %{_datadir}/%{name}/web
208 * Mon Mar 20 2017 Costa Tsaousis <costa@tsaousis.gr> - 1.6.0-1
210 - monitoring ephemeral nodes
211 - monitoring ephemeral containers and VM guests
212 - apps.plugin ported for FreeBSD
216 - several new and improved plugins
217 - several new and improved alarms and notifications
218 - dozens more improvements and bug fixes
219 * Sun Jan 22 2017 Costa Tsaousis <costa@tsaousis.gr> - 1.5.0-1
220 - FreeBSD, MacOS, FreeNAS
222 - dozens of new and improved plugins
223 - dozens of new and improved alarms and notification methods
224 * Tue Oct 4 2016 Costa Tsaousis <costa@tsaousis.gr> - 1.4.0-1
225 - the fastest netdata ever (with a better look too)!
226 - improved IoT and containers support!
227 - alarms improved in almost every way!
228 - Several more improvements, new features and bugfixes.
229 * Sun Aug 28 2016 Costa Tsaousis <costa@tsaousis.gr> - 1.3.0-1
230 - netdata now has health monitoring
231 - netdata now generates badges
232 - netdata now has python plugins
233 - Several more improvements, new features and bugfixes.
234 * Tue Jul 26 2016 Jason Barnett <J@sonBarnett.com> - 1.2.0-2
235 - Added support for EL6
236 - Corrected several Requires statements
237 - Changed default to build without nfacct
238 - Removed --docdir from configure
239 * Mon May 16 2016 Costa Tsaousis <costa@tsaousis.gr> - 1.2.0-1
240 - netdata is now 30% faster.
241 - netdata now has a registry (my-netdata menu on the dashboard).
242 - netdata now monitors Linux containers.
243 - Several more improvements, new features and bugfixes.
244 * Wed Apr 20 2016 Costa Tsaousis <costa@tsaousis.gr> - 1.1.0-1
245 - Several new features (IPv6, SYNPROXY, Users, Users Groups).
246 - A lot of bug fixes and optimizations.
247 * Tue Mar 22 2016 Costa Tsaousis <costa@tsaousis.gr> - 1.0.0-1
248 - First public release.
249 * Sun Nov 15 2015 Alon Bar-Lev <alonbl@redhat.com> - 0.0.0-1