3 %bcond_with nfacct # build with nfacct plugin
5 Summary: Linux real time performance monitoring
10 Group: Applications/System
11 Source0: https://github.com/firehol/netdata/releases/download/v%{version}/%{name}-%{version}.tar.xz
12 # Source0-md5: c23fd94e899e8934c47b14151043be27
16 URL: http://netdata.firehol.org/
17 BuildRequires: autoconf
18 BuildRequires: automake
19 %{?with_nfacct:BuildRequires: libmnl-devel}
20 %{?with_nfacct:BuildRequires: libnetfilter_acct-devel}
21 BuildRequires: pkgconfig
22 BuildRequires: rpmbuild(macros) >= 1.647
23 BuildRequires: zlib-devel
24 Provides: group(netdata)
25 Provides: user(netdata)
26 Requires(post,preun): /sbin/chkconfig
27 Requires(post,preun,postun): systemd-units >= 38
28 Requires(postun): /usr/sbin/groupdel
29 Requires(postun): /usr/sbin/userdel
30 Requires(pre): /bin/id
31 Requires(pre): /usr/bin/getgid
32 Requires(pre): /usr/sbin/groupadd
33 Requires(pre): /usr/sbin/useradd
35 Suggests: %{name}-charts
36 Suggests: %{name}-nodejs
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 %define _libexecdir %{_prefix}/lib
42 netdata is the fastest way to visualize metrics. It is a resource
43 efficient, highly optimized system for collecting and visualizing any
44 type of realtime timeseries data, from CPU usage, disk activity, SQL
45 queries, API calls, web site visitors, etc.
47 netdata tries to visualize the truth of now, in its greatest detail,
48 so that you can get insights of what is happening now and what just
49 happened, on your systems and applications.
52 Summary: netdata charts plugin
53 Group: Applications/System
54 URL: https://github.com/firehol/netdata/wiki/General-Info---charts.d
55 Requires: %{name} = %{version}-%{release}
57 %if "%{_rpmversion}" >= "5"
62 Charts.d is BaSH script that allows you to write simple scripts for
65 It has been designed so that the actual script that will do data
66 collection will be permanently in memory, collecting data with as
67 little overheads as possible (i.e. initialize once, repeatedly collect
68 values with minimal overhead).
70 Charts.d looks for scripts in charts.d. The scripts should have the
71 filename suffix: .chart.sh.
74 Summary: netdata node.js plugins
75 Group: Applications/System
76 URL: https://github.com/firehol/netdata/wiki/General-Info---node.d
77 Requires: %{name} = %{version}-%{release}
78 %if "%{_rpmversion}" >= "5"
83 node.d.plugin is a netdata plugin that provides an abstraction layer
84 to allow easy and quick development of data collectors in node.js. It
85 also manages all its data collectors (placed in node.d) using a single
86 instance of node, thus lowering the memory footprint of data
99 --libdir=%{_libexecdir} \
102 %{__enable_disable nfacct plugin-nfacct} \
107 rm -rf $RPM_BUILD_ROOT
109 DESTDIR=$RPM_BUILD_ROOT
111 %{__rm} $RPM_BUILD_ROOT/var/{cache,log}/netdata/.keep
113 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{systemdunitdir}}
114 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf
115 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
116 cp -p system/netdata.service $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
119 rm -rf $RPM_BUILD_ROOT
122 %groupadd -g 329 netdata
123 %useradd -u 329 -g netdata -c netdata -s /sbin/nologin -d / netdata
126 /sbin/chkconfig --add netdata
127 %service netdata restart
128 %systemd_post netdata.service
131 if [ "$1" = "0" ]; then
132 %service -q netdata stop
133 /sbin/chkconfig --del netdata
135 %systemd_preun netdata.service
138 if [ "$1" = "0" ]; then
145 %defattr(644,root,root,755)
146 %dir %{_sysconfdir}/%{name}
147 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/apps_groups.conf
148 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/netdata.conf
149 %attr(754,root,root) /etc/rc.d/init.d/netdata
150 %attr(755,root,root) %{_sbindir}/%{name}
151 %dir %{_datadir}/%{name}
152 %dir %{_libexecdir}/%{name}
153 %{systemdunitdir}/netdata.service
154 %attr(755,netdata,netdata) %dir %{_localstatedir}/cache/%{name}
155 %attr(755,netdata,netdata) %dir %{_localstatedir}/log/%{name}
157 %defattr(-,root,root,-)
158 %{_libexecdir}/%{name}/plugins.d
160 %exclude %{_libexecdir}/%{name}/plugins.d/node.d.plugin
161 %exclude %{_libexecdir}/%{name}/plugins.d/charts.d*
163 %defattr(-,root,netdata,-)
164 %{_datadir}/%{name}/web
167 %defattr(644,root,root,755)
168 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/charts.d.conf
169 %attr(755,root,root) %{_libexecdir}/%{name}/plugins.d/charts.d*
170 %dir %{_libexecdir}/%{name}/charts.d
171 %{_libexecdir}/%{name}/charts.d/README.md
172 %attr(755,root,root) %{_libexecdir}/%{name}/charts.d/*.chart.sh
175 %defattr(644,root,root,755)
176 %attr(755,root,root) %{_libexecdir}/%{name}/plugins.d/node.d.plugin
177 %dir %{_libexecdir}/%{name}/node.d
178 %{_libexecdir}/%{name}/node.d/README.md
179 %{_libexecdir}/%{name}/node.d/node_modules
180 %attr(755,root,root) %{_libexecdir}/%{name}/node.d/*.node.js