Index: trunk/ganglia_metrics/ganglia_metrics.spec |
— | — | @@ -0,0 +1,46 @@ |
| 2 | +%define name ganglia_metrics |
| 3 | +%define version 1.1 |
| 4 | +%define release 1 |
| 5 | + |
| 6 | +Summary: Ganglia metric daemon |
| 7 | +Name: %{name} |
| 8 | +Version: %{version} |
| 9 | +Release: %{release} |
| 10 | +Source0: %{name}-%{version}.tar.gz |
| 11 | +License: GPL or something |
| 12 | +Group: Development/Libraries |
| 13 | +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot |
| 14 | +Prefix: %{_prefix} |
| 15 | +BuildArch: noarch |
| 16 | +Vendor: Tim Starling <tstarling@wikimedia.org> |
| 17 | +Url: http://svn.wikimedia.org/viewvc/mediawiki/trunk/ganglia_metrics/ |
| 18 | + |
| 19 | +%description |
| 20 | +Ganglia metric daemon |
| 21 | + |
| 22 | +%prep |
| 23 | +%setup |
| 24 | + |
| 25 | +%build |
| 26 | +make |
| 27 | + |
| 28 | +%install |
| 29 | +make install DESTDIR=$RPM_BUILD_ROOT |
| 30 | +install -d $RPM_BUILD_ROOT/etc/rc.d/init.d |
| 31 | +install -m755 init.d/gmetricd $RPM_BUILD_ROOT/etc/rc.d/init.d/gmetricd |
| 32 | + |
| 33 | +%clean |
| 34 | +rm -rf $RPM_BUILD_ROOT |
| 35 | + |
| 36 | +%files |
| 37 | +%defattr(-,root,root) |
| 38 | +/usr/lib/ganglia-metrics |
| 39 | +/usr/lib/ganglia-metrics/gmetricd.py |
| 40 | +/usr/lib/ganglia-metrics/SelectServer.py |
| 41 | +/usr/lib/ganglia-metrics/gmetricd.pyo |
| 42 | +/usr/lib/ganglia-metrics/GangliaMetrics.py |
| 43 | +/usr/lib/ganglia-metrics/__init__.py |
| 44 | +/usr/lib/ganglia-metrics/SelectServer.pyo |
| 45 | +/usr/lib/ganglia-metrics/GangliaMetrics.pyo |
| 46 | +/usr/sbin/gmetricd |
| 47 | +/etc/rc.d/init.d/gmetricd |
Index: trunk/ganglia_metrics/init.d/gmetricd |
— | — | @@ -2,7 +2,7 @@ |
3 | 3 | # chkconfig: 2345 20 80 |
4 | 4 | # description: gmetricd startup script |
5 | 5 | # |
6 | | -GMETRICD=/usr/bin/gmetricd |
| 6 | +GMETRICD=/usr/sbin/gmetricd |
7 | 7 | |
8 | 8 | . /etc/rc.d/init.d/functions |
9 | 9 | |
Index: trunk/ganglia_metrics/MySQLStats.py |
— | — | @@ -60,7 +60,7 @@ |
61 | 61 | return dom |
62 | 62 | |
63 | 63 | def markDown(self): |
64 | | - self.metrics['mysql_questions'].set(None) |
| 64 | + self.metrics['mysql_questions'].set(None, None) |
65 | 65 | self.metrics['mysql_threads_connected'].set(None) |
66 | 66 | self.metrics['mysql_threads_running'].set(None) |
67 | 67 | self.metrics['mysql_slave_lag'].set(None) |
Index: trunk/ganglia_metrics/Makefile |
— | — | @@ -1,14 +1,17 @@ |
2 | | -all: SelectServer.pyo GangliaMetrics.pyo gmetricd.pyo |
| 2 | +SOURCES=__init__.py gmetricd.py GangliaMetrics.py MySQLStats.py SelectServer.py |
| 3 | +OBJECTS=gmetricd.pyo GangliaMetrics.pyo MySQLStats.pyo SelectServer.pyo |
3 | 4 | |
| 5 | +all: $(OBJECTS) |
| 6 | + |
4 | 7 | clean: |
5 | | - rm -f SelectServer.pyo GangliaMetrics.pyo gmetricd.pyo |
| 8 | + rm -f $(OBJECTS) |
6 | 9 | |
7 | 10 | %.pyo : %.py |
8 | 11 | python -O -m py_compile $< |
9 | 12 | |
10 | 13 | install: |
11 | 14 | install -d $(DESTDIR)/usr/lib/ganglia-metrics |
12 | | - install -m644 gmetricd.py gmetricd.pyo __init__.py SelectServer.py SelectServer.pyo GangliaMetrics.py GangliaMetrics.pyo $(DESTDIR)/usr/lib/ganglia-metrics |
| 15 | + install -m644 $(OBJECTS) $(SOURCES) $(DESTDIR)/usr/lib/ganglia-metrics |
13 | 16 | install -d $(DESTDIR)/usr/sbin |
14 | 17 | install -m755 gmetricd $(DESTDIR)/usr/sbin/gmetricd |
15 | 18 | |