Author: glen Date: Wed Dec 21 16:40:34 2011 GMT Module: packages Tag: HEAD ---- Log message: - add redis template
---- Files affected: packages/cacti-template-mysql: cacti-template-mysql.spec (1.4 -> 1.5) , ssh_config.php (NONE -> 1.1) (NEW) ---- Diffs: ================================================================ Index: packages/cacti-template-mysql/cacti-template-mysql.spec diff -u packages/cacti-template-mysql/cacti-template-mysql.spec:1.4 packages/cacti-template-mysql/cacti-template-mysql.spec:1.5 --- packages/cacti-template-mysql/cacti-template-mysql.spec:1.4 Wed May 25 12:26:09 2011 +++ packages/cacti-template-mysql/cacti-template-mysql.spec Wed Dec 21 17:40:29 2011 @@ -1,14 +1,26 @@ # $Revision$, $Date$ +# TODO +# - how to package other ssh based templates? +# - Apache +# - JMX +# - Memcached +# - MongoDB +# - Nginx +# - OpenVZ +# - Unix +# https://code.google.com/p/mysql-cacti-templates/wiki/TableOfContents> +# - currently ss_get_by_ssh.php packaged in -redis package, as it's the only user of it_ %define template mysql Summary: MySQL cacti templates Name: cacti-template-%{template} Version: 1.1.8 -Release: 1 +Release: 1.1 License: GPL v2 Group: Applications/WWW Source0: http://mysql-cacti-templates.googlecode.com/files/better-cacti-templates-%{version}.tar.gz # Source0-md5: c34e66af5091bc02b081a446dbe87f53 Source1: config.php +Source2: ssh_config.php Patch0: config.patch Patch1: paths.patch URL: http://code.google.com/p/mysql-cacti-templates/ @@ -27,32 +39,58 @@ %description This is a set of templates for monitoring MySQL servers with Cacti. +%package -n cacti-template-redis +Summary: Cacti templates for graphing Redis +Group: Applications/WWW +Requires: %{name} = %{version}-%{release} +# redis template uses nc +Requires: nc + +%description -n cacti-template-redis +This is a set of templates for monitoring Redis servers with Cacti. + %prep %setup -qn better-cacti-templates-%{version} %patch0 -p1 %patch1 -p1 +# rename to include fixed names +for xml in templates/cacti_host_template_x_*.xml; do + normalized=${xml%_0.8.*-sver%{version}.xml}.xml + mv $xml $normalized +done + %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{resourcedir},%{scriptsdir},%{cachedir}} -# we deliberately are not packaging other templates this project offers: -# - it's idiotic to graph network services over ssh -# - they should get their own package to avoid some confusion when searching for -# templates in package repository +# this is what is needed for mysql templates install -p scripts/ss_get_mysql_stats.php $RPM_BUILD_ROOT%{scriptsdir} -cp -a templates/cacti_host_template_x_mysql_server*.xml \ - $RPM_BUILD_ROOT%{resourcedir}/cacti_host_template_x_mysql_server.xml -cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/ss_get_mysql_stats.php +cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/ss_get_mysql_stats.php + +cp -p templates/cacti_host_template_x_mysql_server_ht.xml \ + $RPM_BUILD_ROOT%{resourcedir} + +# these are additional ssh-based templates (not really using ssh, just the +# interface behaves like ssh) +install -p scripts/ss_get_by_ssh.php $RPM_BUILD_ROOT%{scriptsdir} +cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/ss_get_by_ssh.php + +# redis template +cp -p templates/cacti_host_template_x_redis_server_ht.xml \ + $RPM_BUILD_ROOT%{resourcedir} %post -%cacti_import_template %{resourcedir}/cacti_host_template_x_mysql_server.xml +%cacti_import_template %{resourcedir}/cacti_host_template_x_mysql_server_ht.xml %preun if [ "$1" = 0 ]; then echo %{cachedir}/* | xargs rm -f fi +%post -n cacti-template-redis +%cacti_import_template %{resourcedir}/cacti_host_template_x_redis_server_ht.xml + %clean rm -rf $RPM_BUILD_ROOT @@ -61,15 +99,23 @@ %doc COPYING README Changelog %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ss_get_mysql_stats.php %attr(755,root,root) %{scriptsdir}/ss_get_mysql_stats.php -%{resourcedir}/*.xml +%{resourcedir}/cacti_host_template_x_mysql_server_ht.xml %attr(770,root,http) %dir %{cachedir} +%files -n cacti-template-redis +%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ss_get_by_ssh.php +%attr(755,root,root) %{scriptsdir}/ss_get_by_ssh.php +%{resourcedir}/cacti_host_template_x_redis_server_ht.xml + %define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`) %changelog * %{date} PLD Team <[email protected]> All persons listed below can be reached at <cvs_login>@pld-linux.org $Log$ +Revision 1.5 2011/12/21 16:40:29 glen +- add redis template + Revision 1.4 2011/05/25 10:26:09 marti - up to 1.1.8 ================================================================ Index: packages/cacti-template-mysql/ssh_config.php diff -u /dev/null packages/cacti-template-mysql/ssh_config.php:1.1 --- /dev/null Wed Dec 21 17:40:34 2011 +++ packages/cacti-template-mysql/ssh_config.php Wed Dec 21 17:40:29 2011 @@ -0,0 +1,16 @@ +<?php + +# ============================================================================ +# CONFIGURATION +# CONFIGURATION for <path_cacti>/scripts/ss_get_by_ssh.php +# ============================================================================ +# Define parameters. Do not edit script itself, define parameters here. +# ============================================================================ +# +# For more options see the script itself. +# ============================================================================ + +$use_ss = FALSE; # Whether to use the script server or not +$use_ssh = TRUE; # Whether to connect via SSH or not (default yes). +$debug = FALSE; # Define whether you want debugging behavior. +$debug_log = FALSE; # If $debug_log is a filename, it'll be used. ================================================================ ---- CVS-web: http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/cacti-template-mysql/cacti-template-mysql.spec?r1=1.4&r2=1.5&f=u _______________________________________________ pld-cvs-commit mailing list [email protected] http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
