[packages/cacti-template-haproxy] new, using haproxy contrib/netsnmp-perl as source
glen
glen at pld-linux.org
Thu May 12 09:30:46 CEST 2016
commit 90ecf760eae0832aa6d96fdb38d06784036f0257
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Thu May 12 10:29:57 2016 +0300
new, using haproxy contrib/netsnmp-perl as source
based on cacti-template-snmp_tcp_connection_status.spec
cacti-template-haproxy.spec | 68 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 68 insertions(+)
---
diff --git a/cacti-template-haproxy.spec b/cacti-template-haproxy.spec
new file mode 100644
index 0000000..00d118b
--- /dev/null
+++ b/cacti-template-haproxy.spec
@@ -0,0 +1,68 @@
+# TODO
+# - enable agent in snmpd
+%define plugin haproxy
+%include /usr/lib/rpm/macros.php
+Summary: Template for Cacti - HAProxy
+Name: cacti-template-%{plugin}
+Version: 0.1
+Release: 0.1
+License: GPL v2
+Group: Applications/WWW
+# the templates were last modified Oct 25, 2010, there's no point using newer version tarball
+Source0: http://www.haproxy.org/download/1.6/src/haproxy-1.6.3.tar.gz
+# Source0-md5: 3362d1e268c78155c2474cb73e7f03f9
+URL: https://github.com/haproxy/haproxy/tree/master/contrib/netsnmp-perl
+BuildRequires: rpm-php-pearprov >= 4.4.2-11
+BuildRequires: rpmbuild(macros) >= 1.554
+Requires: cacti >= 0.8.7e-8
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define snmpdconfdir /etc/snmp
+%define cactidir /usr/share/cacti
+%define resourcedir %{cactidir}/resource
+%define scriptsdir %{cactidir}/scripts
+%define _libdir %{_prefix}/lib
+
+%description
+Cacti snmp-query definition for backends.
+
+%package -n net-snmp-agent-%{plugin}
+Summary: SNMPd agent to provide HAProxy statistics
+Group: Networking/Daemons
+
+%description -n net-snmp-agent-%{plugin}
+SNMPd agent to provide HAProxy statistics
+
+%prep
+%setup -qc
+mv haproxy-*/contrib/netsnmp-perl/* .
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{resourcedir},%{scriptsdir},%{snmpdconfdir},%{_libdir}}
+cp -p *.xml $RPM_BUILD_ROOT%{resourcedir}
+install -p haproxy.pl $RPM_BUILD_ROOT%{_libdir}/snmpd-agent-haproxy
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+%cacti_import_template %{resourcedir}/cacti_data_query_haproxy_backends.xml
+%cacti_import_template %{resourcedir}/cacti_data_query_haproxy_frontends.xml
+%cacti_import_template %{resourcedir}/haproxy_backend.xml
+%cacti_import_template %{resourcedir}/haproxy_frontend.xml
+%cacti_import_template %{resourcedir}/haproxy_socket.xml
+
+%files
+%defattr(644,root,root,755)
+%doc README
+%{resourcedir}/cacti_data_query_haproxy_backends.xml
+%{resourcedir}/cacti_data_query_haproxy_frontends.xml
+%{resourcedir}/haproxy_backend.xml
+%{resourcedir}/haproxy_frontend.xml
+%{resourcedir}/haproxy_socket.xml
+
+%files -n net-snmp-agent-%{plugin}
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/snmpd-agent-haproxy
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/cacti-template-haproxy.git/commitdiff/90ecf760eae0832aa6d96fdb38d06784036f0257
More information about the pld-cvs-commit
mailing list