[python-bucky/el6] Initial import.

jsteffan jsteffan at fedoraproject.org
Sun Sep 16 18:57:57 UTC 2012


commit c8b2fba0c17c9f2b7548df35a7f686536a7e2e48
Author: Jonathan Steffan <jsteffan at fedoraproject.org>
Date:   Sun Sep 16 12:57:53 2012 -0600

    Initial import.

 .gitignore                            |    1 +
 python-bucky-example.conf             |   87 +++++++++++++++++++++++++++++++++
 python-bucky-supervisord-example.conf |   10 ++++
 python-bucky.spec                     |   71 +++++++++++++++++++++++++++
 sources                               |    1 +
 5 files changed, 170 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..25a4967 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/bucky-0.2.2.tar.gz
diff --git a/python-bucky-example.conf b/python-bucky-example.conf
new file mode 100644
index 0000000..abd81e3
--- /dev/null
+++ b/python-bucky-example.conf
@@ -0,0 +1,87 @@
+# Standard debug and log level
+debug = False
+log_level = "INFO"
+
+# Whether to print the entire stack trace for errors encountered
+# when loading the config file
+full_trace = False
+
+# Basic metricsd conifguration
+metricsd_ip = "127.0.0.1"
+metricsd_port = 23632
+metricsd_enabled = True
+
+# The default interval between flushes of metric data to Graphite
+metricsd_default_interval = 10.0
+
+# You can specify the frequency of flushes to Graphite based on
+# the metric name used for each metric. These are specified as
+# regular expressions. An entry in this list should be a 3-tuple
+# that is: (regexp, frequency, priority)
+#
+# The regexp is applied with the match method. Frequency should be
+# in seconds. Priority is used to break ties when a metric name
+# matches more than one handler. (The largest priority wins)
+metricsd_handlers = []
+
+# Basic collectd configuration
+collectd_ip = "127.0.0.1"
+collectd_port = 25826
+collectd_enabled = True
+
+# A list of file names for collectd types.db
+# files.
+collectd_types = []
+
+# A mapping of plugin names to converter callables. These are
+# explained in more detail in the README.
+collectd_converters = {}
+
+# Whether to load converters from entry points. The entry point
+# used to define converters is 'bucky.collectd.converters'.
+collectd_use_entry_points = True
+
+# Basic statsd configuration
+statsd_ip = "127.0.0.1"
+statsd_port = 8125
+statsd_enabled = True
+
+# How often stats should be flushed to Graphite.
+statsd_flush_time = 10.0
+
+# Basic Graphite configuration
+graphite_ip = "127.0.0.1"
+graphite_port = 2003
+
+# If the Graphite connection fails these numbers define how it
+# will reconnect. The max reconnects applies each time a
+# disconnect is encountered and the reconnect delay is the time
+# in seconds between connection attempts. Setting max reconnects
+# to a negative number removes the limit.
+graphite_max_reconnects = 3
+graphite_reconnect_delay = 5
+
+# Bucky provides these settings to allow the system wide
+# configuration of how metric names are processed before
+# sending to Graphite.
+#
+# Prefix and postfix allow to tag all values with some value.
+name_prefix = None
+name_postfix = None
+
+# The replacement character is used to munge any '.' characters
+# in name components because it is special to Graphite. Setting
+# this to None will prevent this step.
+name_replace_char = '_'
+
+# Optionally strip duplicates in path components. For instance
+# a.a.b.c.c.b would be rewritten as a.b.c.b
+name_strip_duplicates = True
+
+# Bucky reverses hostname components to improve the locality
+# of metric values in Graphite. For instance, "node.company.tld"
+# would be rewritten as "tld.company.node". This setting allows
+# for the specification of hostname components that should
+# be stripped from hostnames. For instance, if "company.tld"
+# were specified, the previous example would end up as "node".
+name_host_trim = []
diff --git a/python-bucky-supervisord-example.conf b/python-bucky-supervisord-example.conf
new file mode 100644
index 0000000..54867b2
--- /dev/null
+++ b/python-bucky-supervisord-example.conf
@@ -0,0 +1,10 @@
+[program:bucky]
+command          = /usr/bin/bucky /etc/bucky/bucky.conf
+autostart        = true
+autorestart      = true
+user             = bucky
+log_stdout       = true
+log_stderr       = true
+logfile          = /var/log/bucky/bucky.log
+environment  = HOME=/,USER=bucky
+
diff --git a/python-bucky.spec b/python-bucky.spec
new file mode 100644
index 0000000..d09c619
--- /dev/null
+++ b/python-bucky.spec
@@ -0,0 +1,71 @@
+%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
+
+Name:           python-bucky
+Version:        0.2.2
+Release:        1%{?dist}
+Summary:        CollectD and StatsD adapter for Graphite
+
+Group:          System Environment/Daemons
+License:        ASL 2.0
+URL:            http://pypi.python.org/pypi/bucky
+
+Source0:        http://pypi.python.org/packages/source/b/bucky/bucky-%{version}.tar.gz
+Source1:        python-bucky-example.conf
+Source2:        python-bucky-supervisord-example.conf
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildArch:      noarch
+BuildRequires:  python-devel, python-setuptools
+
+%description
+Bucky is a small server for collecting and translating metrics for
+Graphite. It can current collect metric data from CollectD daemons
+and from StatsD clients.
+
+%prep
+%setup -q -n bucky-%{version}
+%{__install} -m 644 %{SOURCE2} .
+
+
+%build
+%{__python} setup.py build
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%{__python} setup.py install -O1 --skip-build --root %{buildroot}
+%{__mkdir_p} %{buildroot}%{_localstatedir}/log/bucky
+%{__mkdir_p} %{buildroot}%{_localstatedir}/run/bucky
+%{__mkdir_p} %{buildroot}%{_sysconfdir}/bucky
+%{__install} -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/bucky/bucky.conf
+
+
+%pre
+getent group bucky >/dev/null || groupadd -r bucky
+getent passwd bucky >/dev/null || \
+    useradd -r -g bucky -d / \
+    -s /sbin/nologin -c "Bucky daemon" bucky
+
+
+%postun
+if [ $1 = 0 ]; then
+  getent passwd bucky >/dev/null && \
+      userdel -r bucky 2>/dev/null
+fi
+
+ 
+%files
+%doc THANKS README.rst LICENSE python-bucky-supervisord-example.conf
+%{_bindir}/bucky
+%attr(-,bucky,bucky) %{_localstatedir}/log/bucky
+%attr(-,bucky,bucky) %{_localstatedir}/run/bucky
+%config(noreplace) %{_sysconfdir}/bucky/bucky.conf
+%{python_sitelib}/*
+
+
+%changelog
+* Sat Aug 18 2012 Jonathan Steffan <jsteffan at fedoraproject.org> - 0.2.2-1
+- Update to 0.2.2
+
+* Mon May 14 2012 Jonathan Steffan <jsteffan at fedoraproject.org> - 0.1.0-1
+- Initial package
diff --git a/sources b/sources
index e69de29..f92b413 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+7ae15db35847426f7b10d7450b459095  bucky-0.2.2.tar.gz


More information about the scm-commits mailing list