1 %define template varnish
2 Summary: Varnish Cache statistics template for Cacti
3 Name: cacti-template-%{template}
7 Group: Applications/WWW
8 Source1: get_varnish_stats.py
9 Source2: cacti_host_template_varnish.xml
10 URL: http://forums.cacti.net/viewtopic.php?p=182152
12 Requires: cacti >= 0.8.6j
13 Requires: cacti-add_template
15 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17 %define cactidir /usr/share/cacti
18 %define resourcedir %{cactidir}/resource
19 %define scriptsdir %{cactidir}/scripts
22 Template for Cacti - Varnish Cache statistics.
24 Uses advanced template from
25 <http://forums.cacti.net/viewtopic.php?p=182152>
27 Combines script to pull data via varnish telnet port from
28 <http://forums.cacti.net/viewtopic.php?t=31260>
34 rm -rf $RPM_BUILD_ROOT
35 install -d $RPM_BUILD_ROOT{%{resourcedir},%{scriptsdir}}
36 install -p %{SOURCE1} $RPM_BUILD_ROOT%{scriptsdir}
37 cp -a %{SOURCE2} $RPM_BUILD_ROOT%{resourcedir}
40 %{_sbindir}/cacti-add_template \
41 %{resourcedir}/cacti_host_template_varnish.xml
44 rm -rf $RPM_BUILD_ROOT
47 %defattr(644,root,root,755)
48 %attr(755,root,root) %{scriptsdir}/get_varnish_stats.py