├── m4 └── .gitignore ├── debian ├── compat ├── docs ├── ganglia-monitor.docs ├── libganglia1.dirs ├── source │ └── format ├── gmetad.install ├── gmetad.manpages ├── patches │ └── series ├── libganglia1-dev.dirs ├── libganglia1-dev.manpages ├── apache.conf ├── libganglia1.install ├── po │ ├── POTFILES.in │ ├── templates.pot │ ├── ja.po │ ├── et.po │ ├── vi.po │ ├── fi.po │ ├── gl.po │ ├── da.po │ ├── de.po │ ├── it.po │ ├── pt.po │ ├── sv.po │ ├── eu.po │ ├── ru.po │ └── fr.po ├── ganglia-monitor.install ├── ganglia-webfrontend.dirs ├── ganglia-monitor.dirs ├── libganglia1-dev.install ├── conf_redirect.php ├── ganglia-monitor.manpages ├── gmetad.dirs ├── ganglia-monitor-python.dirs ├── ganglia-monitor.upstart ├── gmetad.upstart ├── README.Debian ├── ganglia-webfrontend.config ├── modpython.conf ├── copyright ├── gmetad.postrm ├── ganglia-monitor.postrm ├── ganglia-monitor.postinst ├── gmetad.postinst ├── ganglia-webfrontend.templates ├── ganglia-webfrontend.postinst ├── gmetad.init ├── ganglia-webfrontend.postrm ├── ganglia-monitor.init ├── gmetad.conf └── control ├── libmetrics ├── NEWS ├── INSTALL ├── ChangeLog ├── AUTHORS ├── README ├── aix │ └── Makefile.am ├── hpux │ └── Makefile.am ├── irix │ └── Makefile.am ├── osf │ └── Makefile.am ├── dragonfly │ └── Makefile.am ├── freebsd │ └── Makefile.am ├── darwin │ └── Makefile.am ├── netbsd │ └── Makefile.am ├── openbsd │ └── Makefile.am ├── solaris │ └── Makefile.am ├── linux │ └── Makefile.am ├── mingw │ └── Makefile.am ├── cygwin │ └── Makefile.am ├── libmetrics.c ├── interface.h ├── tests │ └── Makefile.am ├── Makefile.am ├── bootstrap ├── COPYING ├── interface.c └── unpifi.h ├── gmetad-python ├── Gmetad │ ├── __init__.py │ └── gmetad_random.py ├── gmetad-python.service.in ├── TODO └── setup.py.in ├── ChangeLog ├── gmond ├── perl_modules │ ├── example │ │ ├── Makefile.am │ │ └── example.pl │ ├── Makefile.am │ └── conf.d │ │ └── example.plconf ├── python_modules │ ├── cpu │ │ └── Makefile.am │ ├── nfs │ │ └── Makefile.am │ ├── ssl │ │ ├── Makefile.am │ │ └── entropy.py │ ├── xen │ │ └── Makefile.am │ ├── memory │ │ └── Makefile.am │ ├── process │ │ └── Makefile.am │ ├── varnish │ │ └── Makefile.am │ ├── vm_stats │ │ └── Makefile.am │ ├── memcached │ │ └── Makefile.am │ ├── apache_status │ │ └── Makefile.am │ ├── example │ │ └── Makefile.am │ ├── db │ │ └── Makefile.am │ ├── disk │ │ └── Makefile.am │ ├── network │ │ ├── Makefile.am │ │ └── README.traffic1.mkdn │ ├── Makefile.am │ └── conf.d │ │ ├── entropy.pyconf │ │ ├── diskstat.pyconf │ │ ├── cpu_stats.pyconf │ │ ├── xenstats.pyconf.disabled │ │ ├── example.pyconf.disabled │ │ ├── procstat.pyconf │ │ ├── vm_stats.pyconf │ │ ├── mem_stats.pyconf │ │ ├── diskfree.pyconf │ │ ├── redis.pyconf.disabled │ │ ├── traffic1.pyconf.disabled │ │ ├── varnish.pyconf.disabled │ │ ├── tcpconn.pyconf.disabled │ │ ├── spfexample.pyconf.disabled │ │ ├── netstats.pyconf │ │ ├── multi_interface.pyconf │ │ └── apache_status.pyconf.disabled ├── gmond.service.in ├── modules │ ├── conf.d │ │ ├── modperl.conf.in │ │ ├── modpython.conf.in │ │ ├── example.conf │ │ ├── multicpu.conf │ │ └── modgstatus.conf │ ├── status │ │ └── Makefile.am │ ├── example │ │ └── Makefile.am │ ├── disk │ │ └── Makefile.am │ ├── memory │ │ └── Makefile.am │ ├── network │ │ ├── Makefile.am │ │ └── mod_net.c │ ├── system │ │ ├── Makefile.am │ │ ├── mod_proc.c │ │ └── mod_sys.c │ ├── Makefile.am │ ├── cpu │ │ ├── Makefile.am │ │ └── mod_load.c │ ├── perl │ │ ├── Makefile.am │ │ └── README.in │ └── python │ │ └── Makefile.am ├── gmond.solaris.init.in ├── g25_config.h ├── gmond.init ├── core_metrics.c ├── gmond_internal.h └── gmond.aix.init ├── mans ├── Makefile.am ├── gmetad.py.1 ├── gmetad.1 └── gstat.1 ├── gimond ├── rrd │ ├── scripts │ │ └── autoupdate.sh │ ├── README │ └── index.html ├── GitHubImages │ ├── Last_bar.png │ ├── flot_Polls_with.png │ ├── Flot_Polls_without.png │ ├── Google_Polls_with.png │ └── Google_Polls_without.png ├── google │ └── css │ │ └── stylesheet.css └── flot │ └── css │ └── stylesheet.css ├── NEWS ├── doc └── planning │ ├── ganglia-4.x.dia │ └── ganglia-4.x.png ├── BUGS ├── include ├── Makefile.am ├── gm_value.h ├── gm_file.h ├── gm_msg.h ├── ganglia_gexec.h └── gm_mmn.h ├── lib ├── update_pidfile.h ├── become_a_nobody.h ├── my_inet_ntop.h ├── my_inet_ntop.c ├── daemon_inetd.c ├── ganglia_priv.h ├── debug_msg.c ├── rdwr.h ├── apr_net.h ├── become_a_nobody.c ├── hash.h ├── Makefile.am ├── update_pidfile.c ├── llist.h └── rdwr.c ├── README.md ├── AUTHORS ├── scripts ├── compare-tarballs.sh ├── tag-ganglia-release ├── package-ganglia-release └── build-solaris.sh ├── solaris ├── i.smf ├── depend ├── i.nonsmf ├── pkginfo.in ├── preinstall ├── checkinstall ├── preremove └── postinstall ├── gmetad ├── daemon_init.h ├── gmetad-default ├── server_priv.h ├── rrd_helpers.h ├── gmetad.service.in ├── type_hash.gperf ├── xml_hash.gperf ├── riemann.proto ├── daemon_init.c ├── conf.h ├── gmetad.init ├── Makefile.am ├── export_helpers.h └── gmetad.aix.init ├── WiX └── gen_config.vbs ├── ganglia.inc ├── .travis.yml ├── gstat └── Makefile.am ├── tests ├── Makefile.am ├── xdrserver.c └── xdrclient.c ├── gmetric └── Makefile.am ├── contrib ├── ganglia-hosts-lowercase.sh ├── README-removespikes ├── ganglia_gmond.xml.in ├── ganglia_gmetad.xml └── README.contrib ├── bootstrap ├── .gitignore ├── README.OPENBSD ├── COPYING ├── Makefile.WiX ├── git2dist.rc └── README.GIT /m4/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 5 2 | -------------------------------------------------------------------------------- /libmetrics/NEWS: -------------------------------------------------------------------------------- 1 | No news. 2 | -------------------------------------------------------------------------------- /debian/docs: -------------------------------------------------------------------------------- 1 | NEWS 2 | README 3 | -------------------------------------------------------------------------------- /gmetad-python/Gmetad/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /debian/ganglia-monitor.docs: -------------------------------------------------------------------------------- 1 | NEWS 2 | -------------------------------------------------------------------------------- /debian/libganglia1.dirs: -------------------------------------------------------------------------------- 1 | usr/lib 2 | -------------------------------------------------------------------------------- /debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (native) 2 | -------------------------------------------------------------------------------- /debian/gmetad.install: -------------------------------------------------------------------------------- 1 | usr/sbin/gmetad 2 | -------------------------------------------------------------------------------- /debian/gmetad.manpages: -------------------------------------------------------------------------------- 1 | mans/gmetad.1 2 | -------------------------------------------------------------------------------- /debian/patches/series: -------------------------------------------------------------------------------- 1 | debian-changes-3.1.7-2 2 | -------------------------------------------------------------------------------- /libmetrics/INSTALL: -------------------------------------------------------------------------------- 1 | 2 | See ../INSTALL 3 | 4 | -------------------------------------------------------------------------------- /libmetrics/ChangeLog: -------------------------------------------------------------------------------- 1 | 2 | See ../ChangeLog 3 | 4 | -------------------------------------------------------------------------------- /ChangeLog: -------------------------------------------------------------------------------- 1 | 2 | See the git log for the ChangeLog 3 | 4 | -------------------------------------------------------------------------------- /debian/libganglia1-dev.dirs: -------------------------------------------------------------------------------- 1 | usr/lib 2 | usr/include 3 | -------------------------------------------------------------------------------- /debian/libganglia1-dev.manpages: -------------------------------------------------------------------------------- 1 | docs/libganglia/man/man3/*.3 2 | -------------------------------------------------------------------------------- /gmond/perl_modules/example/Makefile.am: -------------------------------------------------------------------------------- 1 | EXTRA_DIST = example.pl 2 | -------------------------------------------------------------------------------- /debian/apache.conf: -------------------------------------------------------------------------------- 1 | Alias /ganglia /usr/share/ganglia-webfrontend 2 | 3 | -------------------------------------------------------------------------------- /debian/libganglia1.install: -------------------------------------------------------------------------------- 1 | usr/lib*/libganglia*.so.* 2 | usr/lib*/ganglia 3 | -------------------------------------------------------------------------------- /debian/po/POTFILES.in: -------------------------------------------------------------------------------- 1 | [type: gettext/rfc822deb] ganglia-webfrontend.templates 2 | -------------------------------------------------------------------------------- /gmond/python_modules/cpu/Makefile.am: -------------------------------------------------------------------------------- 1 | pys = cpu_stats.py 2 | EXTRA_DIST = $(pys) 3 | -------------------------------------------------------------------------------- /gmond/python_modules/nfs/Makefile.am: -------------------------------------------------------------------------------- 1 | pys = nfsstats.py 2 | EXTRA_DIST = $(pys) 3 | -------------------------------------------------------------------------------- /gmond/python_modules/ssl/Makefile.am: -------------------------------------------------------------------------------- 1 | pys = entropy.py 2 | EXTRA_DIST = $(pys) 3 | -------------------------------------------------------------------------------- /gmond/python_modules/xen/Makefile.am: -------------------------------------------------------------------------------- 1 | pys = xenstats.py 2 | EXTRA_DIST = $(pys) 3 | -------------------------------------------------------------------------------- /mans/Makefile.am: -------------------------------------------------------------------------------- 1 | dist_man_MANS = gmetad.1 gmetad.py.1 gmetric.1 gmond.1 gstat.1 2 | -------------------------------------------------------------------------------- /debian/ganglia-monitor.install: -------------------------------------------------------------------------------- 1 | usr/bin/gstat 2 | usr/bin/gmetric 3 | usr/sbin/gmond 4 | -------------------------------------------------------------------------------- /gmond/python_modules/memory/Makefile.am: -------------------------------------------------------------------------------- 1 | pys = mem_stats.py 2 | EXTRA_DIST = $(pys) 3 | -------------------------------------------------------------------------------- /gmond/python_modules/process/Makefile.am: -------------------------------------------------------------------------------- 1 | pys = procstat.py 2 | EXTRA_DIST = $(pys) 3 | -------------------------------------------------------------------------------- /gmond/python_modules/varnish/Makefile.am: -------------------------------------------------------------------------------- 1 | pys = varnish.py 2 | EXTRA_DIST = $(pys) 3 | -------------------------------------------------------------------------------- /gmond/python_modules/vm_stats/Makefile.am: -------------------------------------------------------------------------------- 1 | pys = vm_stats.py 2 | EXTRA_DIST = $(pys) 3 | -------------------------------------------------------------------------------- /debian/ganglia-webfrontend.dirs: -------------------------------------------------------------------------------- 1 | etc/ganglia-webfrontend 2 | usr/share/ganglia-webfrontend 3 | -------------------------------------------------------------------------------- /gimond/rrd/scripts/autoupdate.sh: -------------------------------------------------------------------------------- 1 | while(true); do ./rrdupdate.py $1 $2; sleep 1m; done; 2 | -------------------------------------------------------------------------------- /gmond/python_modules/memcached/Makefile.am: -------------------------------------------------------------------------------- 1 | pys = memcached.py 2 | EXTRA_DIST = $(pys) 3 | -------------------------------------------------------------------------------- /NEWS: -------------------------------------------------------------------------------- 1 | ===== Ganglia Monitoring Core ===== 2 | Visit http://ganglia.info/ for the latest news 3 | -------------------------------------------------------------------------------- /debian/ganglia-monitor.dirs: -------------------------------------------------------------------------------- 1 | etc 2 | etc/ganglia 3 | usr/bin 4 | usr/sbin 5 | usr/share/man 6 | -------------------------------------------------------------------------------- /gmond/python_modules/apache_status/Makefile.am: -------------------------------------------------------------------------------- 1 | pys = apache_status.py 2 | EXTRA_DIST = $(pys) 3 | -------------------------------------------------------------------------------- /libmetrics/AUTHORS: -------------------------------------------------------------------------------- 1 | The Ganglia Development Team 2 | -------------------------------------------------------------------------------- /debian/libganglia1-dev.install: -------------------------------------------------------------------------------- 1 | usr/lib/libganglia.*a 2 | usr/lib/libganglia.*so 3 | usr/include 4 | -------------------------------------------------------------------------------- /gmond/perl_modules/Makefile.am: -------------------------------------------------------------------------------- 1 | DIST_SUBDIRS = example 2 | EXTRA_DIST = $(srcdir)/conf.d/*.plconf 3 | -------------------------------------------------------------------------------- /gmond/python_modules/example/Makefile.am: -------------------------------------------------------------------------------- 1 | pys = example.py spfexample.py 2 | EXTRA_DIST = $(pys) 3 | -------------------------------------------------------------------------------- /debian/conf_redirect.php: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /debian/ganglia-monitor.manpages: -------------------------------------------------------------------------------- 1 | mans/gmetric.1 2 | mans/gmond.1 3 | mans/gstat.1 4 | gmond/gmond.conf.5 5 | -------------------------------------------------------------------------------- /gmond/python_modules/db/Makefile.am: -------------------------------------------------------------------------------- 1 | pys = DBUtil.py mysql.py riak.py redis.py 2 | EXTRA_DIST = $(pys) 3 | -------------------------------------------------------------------------------- /gmond/python_modules/disk/Makefile.am: -------------------------------------------------------------------------------- 1 | pys = diskfree.py diskstat.py multidisk.py 2 | EXTRA_DIST = $(pys) 3 | -------------------------------------------------------------------------------- /debian/gmetad.dirs: -------------------------------------------------------------------------------- 1 | etc 2 | etc/ganglia 3 | usr/sbin 4 | usr/share/man 5 | var/lib/ganglia 6 | var/lib/ganglia/rrds 7 | -------------------------------------------------------------------------------- /doc/planning/ganglia-4.x.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/monitor-core/master/doc/planning/ganglia-4.x.dia -------------------------------------------------------------------------------- /doc/planning/ganglia-4.x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/monitor-core/master/doc/planning/ganglia-4.x.png -------------------------------------------------------------------------------- /BUGS: -------------------------------------------------------------------------------- 1 | Report all bugs to the Ganglia Github project at 2 | 3 | https://github.com/ganglia/monitor-core/issues 4 | 5 | -------------------------------------------------------------------------------- /gimond/GitHubImages/Last_bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/monitor-core/master/gimond/GitHubImages/Last_bar.png -------------------------------------------------------------------------------- /include/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | include_HEADERS = ganglia.h ganglia_gexec.h gm_mmn.h gm_metric.h gm_value.h gm_msg.h gm_file.h 3 | 4 | -------------------------------------------------------------------------------- /libmetrics/README: -------------------------------------------------------------------------------- 1 | This is a simple convenience library that allows us 2 | to collect ganglia metrics in all supported platforms. 3 | -------------------------------------------------------------------------------- /debian/ganglia-monitor-python.dirs: -------------------------------------------------------------------------------- 1 | etc 2 | etc/ganglia 3 | etc/ganglia/conf.d 4 | usr/lib/ganglia/ 5 | usr/lib/ganglia/python_modules 6 | -------------------------------------------------------------------------------- /gimond/GitHubImages/flot_Polls_with.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/monitor-core/master/gimond/GitHubImages/flot_Polls_with.png -------------------------------------------------------------------------------- /gimond/GitHubImages/Flot_Polls_without.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/monitor-core/master/gimond/GitHubImages/Flot_Polls_without.png -------------------------------------------------------------------------------- /gimond/GitHubImages/Google_Polls_with.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/monitor-core/master/gimond/GitHubImages/Google_Polls_with.png -------------------------------------------------------------------------------- /lib/update_pidfile.h: -------------------------------------------------------------------------------- 1 | #ifndef UPDATE_PIDFILE_H 2 | #define UPDATE_PIDFILE_H 1 3 | 4 | void update_pidfile (char *pidfile); 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /gimond/GitHubImages/Google_Polls_without.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/monitor-core/master/gimond/GitHubImages/Google_Polls_without.png -------------------------------------------------------------------------------- /gmond/python_modules/network/Makefile.am: -------------------------------------------------------------------------------- 1 | pys = multi_interface.py netstats.py tcpconn.py traffic1.py 2 | EXTRA_DIST = $(pys) README.traffic1.mkdn 3 | -------------------------------------------------------------------------------- /lib/become_a_nobody.h: -------------------------------------------------------------------------------- 1 | #ifndef BECOME_A_NOBODY_H 2 | #define BECOME_A_NOBODY_H 1 3 | 4 | void become_a_nobody(const char *username); 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /libmetrics/aix/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS = -I.. -I../../include 2 | 3 | noinst_LTLIBRARIES = libmetric25.la 4 | libmetric25_la_SOURCES = metrics.c 5 | -------------------------------------------------------------------------------- /libmetrics/hpux/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS = -I.. -I../../include 2 | 3 | noinst_LTLIBRARIES = libmetric25.la 4 | libmetric25_la_SOURCES = metrics.c 5 | -------------------------------------------------------------------------------- /libmetrics/irix/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS = -I.. -I../../include 2 | 3 | noinst_LTLIBRARIES = libmetric25.la 4 | libmetric25_la_SOURCES = metrics.c 5 | -------------------------------------------------------------------------------- /libmetrics/osf/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS = -I.. -I../../include 2 | 3 | noinst_LTLIBRARIES = libmetric25.la 4 | libmetric25_la_SOURCES = metrics.c 5 | -------------------------------------------------------------------------------- /libmetrics/dragonfly/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS = -I.. -I../../include 2 | 3 | noinst_LTLIBRARIES = libmetric25.la 4 | libmetric25_la_SOURCES = metrics.c 5 | -------------------------------------------------------------------------------- /libmetrics/freebsd/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS = -I.. -I../../include 2 | 3 | noinst_LTLIBRARIES = libmetric25.la 4 | libmetric25_la_SOURCES = metrics.c 5 | -------------------------------------------------------------------------------- /lib/my_inet_ntop.h: -------------------------------------------------------------------------------- 1 | #ifndef MY_INET_NTOP_H 2 | #define MY_INET_NTOP_H 1 3 | const char *my_inet_ntop( int af, void *src, char *dst, size_t cnt ); 4 | #endif 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # GANGLIA MONITOR CORE 2 | 3 | [![Build Status](https://secure.travis-ci.org/ganglia/monitor-core.png)](http://travis-ci.org/ganglia/monitor-core) 4 | 5 | -------------------------------------------------------------------------------- /libmetrics/darwin/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS = -I.. -I../../lib -I../../include 2 | 3 | noinst_LTLIBRARIES = libmetric25.la 4 | libmetric25_la_SOURCES = metrics.c 5 | -------------------------------------------------------------------------------- /libmetrics/netbsd/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS = -I.. -I../../lib -I../../include 2 | 3 | noinst_LTLIBRARIES = libmetric25.la 4 | libmetric25_la_SOURCES = metrics.c 5 | -------------------------------------------------------------------------------- /libmetrics/openbsd/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS = -I.. -I../../lib -I../../include 2 | 3 | noinst_LTLIBRARIES = libmetric25.la 4 | libmetric25_la_SOURCES = metrics.c 5 | -------------------------------------------------------------------------------- /libmetrics/solaris/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS = -I.. -I../../lib -I../../include 2 | 3 | noinst_LTLIBRARIES = libmetric25.la 4 | libmetric25_la_SOURCES = metrics.c 5 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Ganglia Development Team 2 | 3 | For a list of current/past developers and contributors, please 4 | see: http://ganglia.info/?page_id=325 5 | -------------------------------------------------------------------------------- /debian/ganglia-monitor.upstart: -------------------------------------------------------------------------------- 1 | description "Ganglia Monitor Daemon" 2 | 3 | start on runlevel [2345] 4 | stop on runlevel [016] or unmounting-filesystem 5 | 6 | respawn 7 | exec /usr/sbin/gmond -f 8 | -------------------------------------------------------------------------------- /libmetrics/linux/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS = -I$(top_builddir)/../lib -I$(top_srcdir)/../include -I$(top_srcdir) 2 | 3 | noinst_LTLIBRARIES = libmetric25.la 4 | libmetric25_la_SOURCES = metrics.c 5 | -------------------------------------------------------------------------------- /libmetrics/mingw/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS = -I.. -I../../lib -I../../include 2 | 3 | noinst_LTLIBRARIES = libmetric25.la 4 | libmetric25_la_SOURCES = metrics.c 5 | libmetric25_la_LDFLAGS = -liphlpapi -lpsapi 6 | -------------------------------------------------------------------------------- /debian/gmetad.upstart: -------------------------------------------------------------------------------- 1 | description "Ganglia Monitor Meta-daemon" 2 | 3 | start on runlevel [2345] 4 | stop on runlevel [016] or unmounting-filesystem 5 | 6 | expect daemon 7 | respawn 8 | exec /usr/sbin/gmetad 9 | -------------------------------------------------------------------------------- /libmetrics/cygwin/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS = -I.. -I../../lib -I../../include 2 | 3 | noinst_LTLIBRARIES = libmetric25.la 4 | libmetric25_la_SOURCES = metrics.c 5 | libmetric25_la_LDFLAGS = -liphlpapi -lpsapi 6 | -------------------------------------------------------------------------------- /scripts/compare-tarballs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | tar tzf $1 | cut -f2- -d/ | sort > "${1}.file-list" 5 | tar tzf $2 | cut -f2- -d/ | sort > "${2}.file-list" 6 | 7 | diff -ur "${1}.file-list" "${2}.file-list" 8 | 9 | -------------------------------------------------------------------------------- /gmond/python_modules/Makefile.am: -------------------------------------------------------------------------------- 1 | DIST_SUBDIRS = apache_status cpu db disk example memcached memory network nfs process ssl varnish vm_stats xen 2 | EXTRA_DIST = $(srcdir)/conf.d/*.pyconf $(srcdir)/conf.d/*.pyconf.disabled 3 | -------------------------------------------------------------------------------- /solaris/i.smf: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "Installing class ." 4 | while read src dest 5 | do 6 | # Do copy 7 | /usr/bin/cp $src $dest || exit 2 8 | echo $dest 9 | done 10 | exit 0 11 | 12 | -------------------------------------------------------------------------------- /solaris/depend: -------------------------------------------------------------------------------- 1 | P CSWpython python - The Python 2.3 language interpreter 2 | P GNGconfuse GNGlibconfuse - provides an API for reading text based configuration files. 3 | P CSWapr1 CSWapr1 4 | P CSWexpat expat - XML Parser Toolkit 5 | -------------------------------------------------------------------------------- /gmetad/daemon_init.h: -------------------------------------------------------------------------------- 1 | #ifndef DAEMON_INIT_H 2 | #define DAEMON_INIT_H 1 3 | 4 | #include 5 | #include 6 | 7 | void daemon_init (const char *pname, int facility, mode_t rrd_umask); 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /solaris/i.nonsmf: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | 4 | echo "Installing class ." 5 | while read src dest 6 | do 7 | # Do copy 8 | /usr/bin/cp $src $dest || exit 2 9 | echo $dest 10 | done 11 | exit 0 12 | 13 | -------------------------------------------------------------------------------- /gmetad/gmetad-default: -------------------------------------------------------------------------------- 1 | 2 | 3 | # For rrdcached, uncomment this line. gmetad requires use of a 4 | # privileged rrdcached socket, created with the -l option to rrdcached. 5 | #RRDCACHED_ADDRESS="unix:/var/run/rrdcached/rrdcached.sock" 6 | 7 | 8 | -------------------------------------------------------------------------------- /solaris/pkginfo.in: -------------------------------------------------------------------------------- 1 | PKG=GNGgmond 2 | NAME=GNGganglia_gmond - Ganglia monitors system resources across the cluster. 3 | ARCH=@host_cpu@ 4 | VERSION=@VERSION@,REV=@REL@ 5 | CATEGORY=system 6 | EMAIL=ganglia-general@lists.sourceforge.net 7 | BASEDIR=@prefix@ 8 | -------------------------------------------------------------------------------- /gmetad-python/gmetad-python.service.in: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Ganglia Meta Daemon in Python 3 | After=network-online.target 4 | 5 | [Service] 6 | ExecStart=@bindir@/gmetad.py -f 7 | User=ganglia 8 | 9 | [Install] 10 | WantedBy=multi-user.target 11 | -------------------------------------------------------------------------------- /gmetad/server_priv.h: -------------------------------------------------------------------------------- 1 | #ifndef SERVER_PRIV_H 2 | #define SERVER_PRIV_H 1 3 | 4 | struct request_context { 5 | char *path; 6 | client_t *client; 7 | }; 8 | 9 | static int 10 | process_path_adapter (datum_t *key, datum_t *val, void *arg); 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /libmetrics/libmetrics.c: -------------------------------------------------------------------------------- 1 | #include "libmetrics.h" 2 | 3 | int libmetrics_initialized = 0; 4 | 5 | void 6 | libmetrics_init( void ) 7 | { 8 | if(libmetrics_initialized) 9 | return; 10 | 11 | metric_init(); 12 | libmetrics_initialized = 1; 13 | } 14 | -------------------------------------------------------------------------------- /libmetrics/interface.h: -------------------------------------------------------------------------------- 1 | #ifndef INTERFACE_H 2 | #define INTERFACE_H 1 3 | 4 | #include "config.h" 5 | 6 | #ifdef MINGW 7 | #include 8 | #include 9 | #else 10 | #include "unpifi.h" 11 | #endif 12 | 13 | int get_min_mtu( void ); 14 | #endif 15 | -------------------------------------------------------------------------------- /gmetad/rrd_helpers.h: -------------------------------------------------------------------------------- 1 | #include "ganglia.h" 2 | 3 | int 4 | write_data_to_rrd ( const char *source, const char *host, const char *metric, 5 | const char *sum, const char *num, unsigned int step, 6 | unsigned int process_time, ganglia_slope_t slope); 7 | -------------------------------------------------------------------------------- /gmond/gmond.service.in: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Ganglia Monitor Daemon 3 | After=network-online.target 4 | 5 | [Service] 6 | Type=forking 7 | PIDFile=@runstatedir@/gmond.pid 8 | ExecStart=@sbindir@/gmond --pid-file=@runstatedir@/gmond.pid 9 | 10 | [Install] 11 | WantedBy=multi-user.target 12 | -------------------------------------------------------------------------------- /libmetrics/tests/Makefile.am: -------------------------------------------------------------------------------- 1 | TESTS = test-metrics 2 | 3 | AM_CFLAGS = -I$(top_builddir)/../include -I$(top_srcdir) 4 | 5 | check_PROGRAMS = test-metrics 6 | 7 | test_metrics_SOURCES = test-metrics.c 8 | test_metrics_LDADD = $(top_builddir)/libmetrics.la ../../lib/libganglia.la 9 | test_metrics_LDFLAGS = -static 10 | -------------------------------------------------------------------------------- /gmetad/gmetad.service.in: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Ganglia Meta Daemon 3 | After=network-online.target 4 | 5 | [Service] 6 | Type=forking 7 | PIDFile=@runstatedir@/gmetad.pid 8 | ExecStart=@sbindir@/gmetad --pid-file=@runstatedir@/gmetad.pid 9 | EnvironmentFile=-@envdir@/gmetad 10 | 11 | [Install] 12 | WantedBy=multi-user.target 13 | -------------------------------------------------------------------------------- /gmond/python_modules/conf.d/entropy.pyconf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "entropy" 4 | language = "python" 5 | } 6 | } 7 | 8 | collection_group { 9 | collect_every = 15 10 | time_threshold = 50 11 | 12 | metric { 13 | name = "entropy_avail" 14 | title = "Entropy Available" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /gimond/google/css/stylesheet.css: -------------------------------------------------------------------------------- 1 | #buttons { 2 | font-family: Arial, sans-serif; 3 | font-size: 0.8em; 4 | border: 1px solid black; 5 | background: #D0D0D0; 6 | padding: 2px; 7 | display: block; 8 | width: 250px; 9 | } 10 | 11 | table { 12 | font-family: Arial, sans-serif; 13 | font-size: 0.8em; 14 | } -------------------------------------------------------------------------------- /WiX/gen_config.vbs: -------------------------------------------------------------------------------- 1 | function gen 2 | 3 | Set oShell = CreateObject("WScript.Shell") 4 | Set oEnv = oShell.Environment("SYSTEM") 5 | nCores = oEnv("NUMBER_OF_PROCESSORS") 6 | 7 | cfgfile = Session.Property("CustomActionData") & "\my_custom_settings.conf" 8 | 9 | ' Put some code here for writing stuff to the file 10 | 11 | end function 12 | 13 | -------------------------------------------------------------------------------- /solaris/preinstall: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | smf=no 4 | if [ -f /usr/sbin/svccfg -a -f /usr/sbin/svcadm ] 5 | then 6 | smf=yes 7 | fi 8 | 9 | if [ $smf = yes ] 10 | then 11 | /usr/sbin/svcadm disable svc:/ganglia/gmond 12 | else 13 | if [ -f /etc/init.d/gmond ]; 14 | then 15 | 16 | /etc/init.d/gmond stop >/dev/null 2>&1 17 | 18 | fi 19 | fi 20 | 21 | exit 0 22 | -------------------------------------------------------------------------------- /ganglia.inc: -------------------------------------------------------------------------------- 1 | 2 | 3 | FIXCONFIG = $(top_builddir)/scripts/fixconfig 4 | 5 | # Unfortunately, we can't do this here with a pattern rule because 6 | # that is a GNU make feature and is not fully portable 7 | #%: %.in $(FIXCONFIG) 8 | # $(FIXCONFIG) $< $@ 9 | 10 | # For the moment, it is necessary to provide a rule for each file 11 | # we want to generate - see the rule for ganglia-config in Makefile.am 12 | # for an example 13 | 14 | -------------------------------------------------------------------------------- /debian/README.Debian: -------------------------------------------------------------------------------- 1 | ganglia for Debian 2 | ------------------ 3 | 4 | Ganglia builds and runs on any Linux architecture, though it is certainly 5 | less tested on non x86 archs. 6 | 7 | As of 3.0 ganglia's gmond.conf has changed format. To convert your 8 | configuration use gmond -r /etc/gmond.conf and check the output does 9 | what you want. 10 | 11 | -- Stuart Teasdale , Wed Jul 6 15:46:34 BST 2005 12 | -------------------------------------------------------------------------------- /gmetad/type_hash.gperf: -------------------------------------------------------------------------------- 1 | %{ 2 | /* Recognizes metric types. 3 | * Build with: gperf -G -l -H type_hash -t -F ', 0' -N in_type_list -k 1,$ \ 4 | * -W types ./type_hash.gperf > type_hash.c 5 | */ 6 | #include 7 | %} 8 | struct type_tag; 9 | %% 10 | int8, INT 11 | uint8, UINT 12 | int16, INT 13 | uint16, UINT 14 | int32, INT 15 | uint32, UINT 16 | float, FLOAT 17 | double, FLOAT 18 | timestamp, TIMESTAMP 19 | string, STRING 20 | -------------------------------------------------------------------------------- /gmond/python_modules/network/README.traffic1.mkdn: -------------------------------------------------------------------------------- 1 | traffic1 2 | =============== 3 | 4 | python module for ganglia 3.1. 5 | 6 | traffic1 send metrics on transmitted and received network traffic. Unlike 7 | ganglia's net_module, traffic1 does handle only one network device. 8 | 9 | ## example 10 | 11 | See conf.d/traffic1.conf, to send traffic on tagged VLAN (bond0.2). 12 | 13 | ## AUTHOR 14 | 15 | HIROSE Masaaki 16 | 17 | -------------------------------------------------------------------------------- /gmond/modules/conf.d/modperl.conf.in: -------------------------------------------------------------------------------- 1 | /* 2 | params - path to the directory where mod_perl 3 | should look for perl metric modules 4 | 5 | the "plconf" files in the include directory below 6 | will be scanned for configurations for those modules 7 | */ 8 | modules { 9 | module { 10 | name = "perl_module" 11 | path = "modperl.so" 12 | params = "@moduledir@/perl_modules" 13 | } 14 | } 15 | 16 | include ("@sysconfdir@/conf.d/*.plconf") 17 | -------------------------------------------------------------------------------- /gmond/modules/status/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS = -D_LARGEFILE64_SOURCE -I$(top_builddir)/include -I$(top_builddir)/lib 2 | 3 | if STATIC_BUILD 4 | noinst_LTLIBRARIES = libmodstatus.la 5 | libmodstatus_la_SOURCES = mod_gstatus.c 6 | else 7 | pkglib_LTLIBRARIES = modgstatus.la 8 | modgstatus_la_SOURCES = mod_gstatus.c 9 | modgstatus_la_LDFLAGS = -module -avoid-version 10 | 11 | EXTRA_DIST = ../conf.d/modgstatus.conf 12 | endif 13 | 14 | INCLUDES = @APR_INCLUDES@ 15 | -------------------------------------------------------------------------------- /debian/ganglia-webfrontend.config: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | action=$1 6 | version=$2 7 | 8 | # Source debconf library. 9 | . /usr/share/debconf/confmodule 10 | db_version 2.0 || [ 0 -lt 30 ] 11 | 12 | db_input medium ganglia-webfrontend/webserver || true 13 | db_go 14 | db_reset ganglia-webfrontend/restart || true 15 | db_subst ganglia-webfrontend/restart webserver "$webserver" 16 | db_input high ganglia-webfrontend/restart || true 17 | db_go 18 | 19 | -------------------------------------------------------------------------------- /solaris/checkinstall: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | trap `exit 3` 15 4 | 5 | # Assign Solaris release class to install release specific files 6 | smf=no 7 | if [ -f /usr/sbin/svccfg -a -f /usr/sbin/svcadm ] ; then smf=yes ; fi 8 | if [ $smf = yes ] 9 | then 10 | CLASSES='none smf' 11 | else 12 | CLASSES='none nonsmf' 13 | fi 14 | 15 | # Make env variables available to other packaging scripts 16 | 17 | cat >$1 </dev/null 2>&1 21 | 22 | fi 23 | fi 24 | 25 | 26 | exit 0 27 | 28 | -------------------------------------------------------------------------------- /debian/modpython.conf: -------------------------------------------------------------------------------- 1 | /* 2 | params - path to the directory where mod_python 3 | should look for python metric modules 4 | 5 | the "pyconf" files in the include directory below 6 | will be scanned for configurations for those modules 7 | */ 8 | modules { 9 | module { 10 | name = "python_module" 11 | path = "/usr/lib/ganglia/modpython.so" 12 | params = "/usr/lib/ganglia/python_modules" 13 | } 14 | } 15 | 16 | include ('/etc/ganglia/conf.d/*.pyconf') 17 | -------------------------------------------------------------------------------- /libmetrics/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = @OS@ tests 2 | DIST_SUBDIRS = aix cygwin darwin dragonfly freebsd hpux irix linux mingw netbsd openbsd osf solaris tests 3 | 4 | EXTRA_DIST = bootstrap 5 | 6 | AM_CFLAGS = -I../lib -I../include 7 | 8 | noinst_LTLIBRARIES = libmetrics.la 9 | libmetrics_la_SOURCES = libmetrics.c libmetrics.h \ 10 | interface.c interface.h \ 11 | get_ifi_info.c unpifi.h 12 | libmetrics_la_LIBADD = @OS@/libmetric25.la 13 | -------------------------------------------------------------------------------- /gmond/gmond.solaris.init.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | GANGLIA_BASEDIR=@prefix@ 4 | GMOND=@sbindir@/gmond 5 | 6 | test -f /etc/default/gmond && . /etc/default/gmond 7 | 8 | [ ! -d ${GANGLIA_BASEDIR} ] && exit 1 9 | 10 | case "$1" in 11 | 12 | 'start') 13 | ${GMOND} 14 | ;; 15 | 16 | 'stop') 17 | /usr/bin/pkill -x gmond 18 | ;; 19 | 20 | *) 21 | echo "Usage: $0 { start | stop }" 22 | exit 1 23 | ;; 24 | 25 | esac 26 | exit 0 27 | 28 | -------------------------------------------------------------------------------- /libmetrics/bootstrap: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | #echo "Running make distclean" 3 | #make distclean 4 | echo "Running aclocal" && 5 | aclocal && 6 | echo "Running autoheader" && 7 | autoheader && 8 | echo "Preparing tree" && 9 | mkdir -p build && 10 | echo "Running automake" && 11 | automake --add-missing --copy --foreign 2>/dev/null 12 | echo "Running libtoolize" && 13 | libtoolize --automake --copy && automake --add-missing --copy --foreign && 14 | echo "Running autoconf" && 15 | autoconf -f || exit 1 16 | echo 17 | -------------------------------------------------------------------------------- /debian/copyright: -------------------------------------------------------------------------------- 1 | This package was debianized by Preston Smith on 2 | Tue, 16 Apr 2002 22:55:55 -0500. 3 | 4 | It was downloaded from http://ganglia.sourceforge.net 5 | 6 | Upstream Author: Matt Massie 7 | 8 | Copyright: 9 | 10 | Copyright (c) 2001 by Matt Massie and The Regents of the University of California 11 | . 12 | All rights reserved. 13 | 14 | On Debian GNU/Linux systems, the text of the BSD License can be found in 15 | /usr/share/common-licenses/BSD. 16 | -------------------------------------------------------------------------------- /gstat/Makefile.am: -------------------------------------------------------------------------------- 1 | if STATIC_BUILD 2 | GLDFLAGS = -static 3 | else 4 | GCFLAGS = 5 | GLDADD = 6 | GLDFLAGS = 7 | endif 8 | 9 | AM_CFLAGS = -I$(top_srcdir)/lib -I$(top_builddir)/lib -I$(top_builddir)/include $(GCFLAGS) 10 | 11 | bin_PROGRAMS = gstat 12 | gstat_SOURCES = gstat.c cmdline.c cmdline.h 13 | gstat_LDADD = $(top_builddir)/lib/libganglia.la \ 14 | $(top_builddir)/lib/libgetopthelper.a \ 15 | $(GLDADD) 16 | 17 | gstat_LDFLAGS = $(GLDFLAGS) 18 | 19 | EXTRA_DIST = cmdline.sh 20 | 21 | -------------------------------------------------------------------------------- /gmond/modules/example/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS = -I$(top_builddir)/include -I$(top_builddir)/lib 2 | 3 | if STATIC_BUILD 4 | noinst_LTLIBRARIES = libmodexample.la 5 | libmodexample_la_SOURCES = mod_example.c 6 | else 7 | pkglib_LTLIBRARIES = modexample.la 8 | modexample_la_SOURCES = mod_example.c 9 | modexample_la_LDFLAGS = -module -avoid-version 10 | 11 | EXTRA_DIST = ../conf.d/example.conf 12 | endif 13 | 14 | INCLUDES = @APR_INCLUDES@ 15 | 16 | install: 17 | @echo 18 | @echo "Examples should be installed manually" 19 | @echo 20 | -------------------------------------------------------------------------------- /tests/Makefile.am: -------------------------------------------------------------------------------- 1 | #TESTS = test 2 | 3 | AM_CFLAGS = -I$(top_builddir)/lib -ggdb 4 | 5 | #noinst_PROGRAMS = xdrclient xdrserver 6 | # 7 | #xdrclient_SOURCES = xdrclient.c 8 | #xdrclient_LDFLAGS = -static 9 | #xdrclient_LDADD = $(top_builddir)/lib/libganglia.la 10 | #xdrclient_DEPENDENCIES = $(top_builddir)/lib/libganglia.la 11 | # 12 | # 13 | #xdrserver_SOURCES = xdrserver.c 14 | #xdrserver_LDFLAGS = -static 15 | #xdrserver_LDADD = $(top_builddir)/lib/libganglia.la 16 | #xdrserver_DEPENDENCIES = $(top_builddir)/lib/libganglia.la 17 | -------------------------------------------------------------------------------- /gimond/rrd/README: -------------------------------------------------------------------------------- 1 | You will need python-rrdtool to run this. 2 | 3 | Run in this order: 4 | 5 | rrdcreate.py, to create the database. 6 | 7 | rrdupdate.py , to update the database. 8 | The ip and port are the ones for Gmetad's internal metrics daemon. 9 | Updating it at regular intervals can be done by using this command: 10 | ./autoupdate.sh 11 | or any other way you want! 12 | 13 | rrdgraphs.py, to draw the graphs in a .png file. 14 | 15 | You can also use the html page to view them too, but they will not be "live" graphs. -------------------------------------------------------------------------------- /gmond/python_modules/conf.d/diskstat.pyconf: -------------------------------------------------------------------------------- 1 | # 2 | 3 | modules { 4 | module { 5 | name = 'diskstat' 6 | language = 'python' 7 | 8 | # Specify devices you want to monitor or if empty it will 9 | # pick all devices 10 | #param devices { 11 | # value = '' 12 | #} 13 | 14 | #param device-mapper { 15 | # value = 'true' 16 | #} 17 | } 18 | } 19 | 20 | collection_group { 21 | collect_every = 30 22 | time_threshold = 30 23 | 24 | metric { 25 | name_match = "diskstat_(.+)" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /gmond/modules/disk/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS = -D_LARGEFILE64_SOURCE -I$(top_builddir)/include -I$(top_srcdir)/libmetrics -I$(top_builddir)/libmetrics -I$(top_builddir)/lib 2 | 3 | if STATIC_BUILD 4 | noinst_LTLIBRARIES = libmoddisk.la 5 | libmoddisk_la_SOURCES = mod_disk.c 6 | libmoddisk_la_LDFLAGS = -export-all-symbols 7 | else 8 | pkglib_LTLIBRARIES = moddisk.la 9 | moddisk_la_SOURCES = mod_disk.c 10 | moddisk_la_LDFLAGS = -module -avoid-version 11 | moddisk_la_LIBADD = $(top_builddir)/libmetrics/libmetrics.la 12 | endif 13 | 14 | INCLUDES = @APR_INCLUDES@ 15 | -------------------------------------------------------------------------------- /gmond/modules/memory/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS = -D_LARGEFILE64_SOURCE -I$(top_builddir)/include -I$(top_srcdir)/libmetrics -I$(top_builddir)/libmetrics -I$(top_builddir)/lib 2 | 3 | if STATIC_BUILD 4 | noinst_LTLIBRARIES = libmodmem.la 5 | libmodmem_la_SOURCES = mod_mem.c 6 | libmodmem_la_LDFLAGS = -export-all-symbols 7 | else 8 | pkglib_LTLIBRARIES = modmem.la 9 | 10 | modmem_la_SOURCES = mod_mem.c 11 | modmem_la_LDFLAGS = -module -avoid-version 12 | modmem_la_LIBADD = $(top_builddir)/libmetrics/libmetrics.la 13 | endif 14 | 15 | INCLUDES = @APR_INCLUDES@ 16 | -------------------------------------------------------------------------------- /gmond/modules/network/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS = -D_LARGEFILE64_SOURCE -I$(top_builddir)/include -I$(top_srcdir)/libmetrics -I$(top_builddir)/libmetrics -I$(top_builddir)/lib 2 | 3 | if STATIC_BUILD 4 | noinst_LTLIBRARIES = libmodnet.la 5 | libmodnet_la_SOURCES = mod_net.c 6 | libmodnet_la_LDFLAGS = -export-all-symbols 7 | else 8 | pkglib_LTLIBRARIES = modnet.la 9 | 10 | modnet_la_SOURCES = mod_net.c 11 | modnet_la_LDFLAGS = -module -avoid-version 12 | modnet_la_LIBADD = $(top_builddir)/libmetrics/libmetrics.la 13 | endif 14 | 15 | INCLUDES = @APR_INCLUDES@ 16 | -------------------------------------------------------------------------------- /gmond/perl_modules/conf.d/example.plconf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "example" 4 | language = "perl" 5 | param RandomMax { 6 | value = 600 7 | } 8 | param ConstantValue { 9 | value = 112 10 | } 11 | } 12 | } 13 | 14 | #/* Collection groups for the 15 | # example perl module */ 16 | collection_group { 17 | collect_every = 10 18 | time_threshold = 50 19 | metric { 20 | name = "PlRandom_Numbers" 21 | value_threshold = 1.0 22 | } 23 | metric { 24 | name = "PlConstant_Number" 25 | value_threshold = 1.0 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /lib/my_inet_ntop.c: -------------------------------------------------------------------------------- 1 | #ifdef HAVE_CONFIG_H 2 | #include "config.h" 3 | #endif 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | const char * 11 | my_inet_ntop( int af, void *src, char *dst, size_t cnt ) 12 | { 13 | #ifdef HAVE_INET_NTOP 14 | return inet_ntop(af, src, dst, cnt); 15 | #else 16 | /* This is not that pretty.. assuming src = sockaddr_in 17 | and not really thread-safe on some OS .. blah */ 18 | return strncpy( dst, inet_ntoa( *(struct in_addr *)src ), cnt ); 19 | #endif 20 | } 21 | -------------------------------------------------------------------------------- /debian/gmetad.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | if [ "$1" = "purge" ] ; then 4 | # rm the rrds if this is the last ganglia package being removed. 5 | if [ ! -f /usr/sbin/gmond ] ; then 6 | if [ -d /var/lib/ganglia ]; then 7 | # Remove rrd dir 8 | rm -rf /var/lib/ganglia/rrds 9 | fi 10 | # remove ganglia user only if gmond isn't installed 11 | if getent passwd ganglia >/dev/null; then 12 | userdel ganglia 13 | fi 14 | if getent group ganglia >/dev/null; then 15 | groupdel ganglia 16 | fi 17 | fi 18 | fi 19 | 20 | #DEBHELPER# 21 | -------------------------------------------------------------------------------- /debian/ganglia-monitor.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | if [ "$1" = "purge" ] ; then 4 | # rm the rrds if this is the last ganglia package being removed. 5 | if [ ! -f /usr/sbin/gmetad ] ; then 6 | if [ -d /var/lib/ganglia ]; then 7 | # Remove rrd dir 8 | rm -rf /var/lib/ganglia/rrds 9 | fi 10 | # Only remove ganglia user if gmetad isn't installed 11 | if getent passwd ganglia >/dev/null; then 12 | userdel ganglia 13 | fi 14 | if getent group ganglia >/dev/null; then 15 | groupdel ganglia 16 | fi 17 | fi 18 | fi 19 | 20 | #DEBHELPER# 21 | -------------------------------------------------------------------------------- /lib/daemon_inetd.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file daemon_inetd.c Functions for inetd daemons 3 | */ 4 | #include 5 | #include 6 | 7 | extern int daemon_proc; /* defined in error_msg.c */ 8 | 9 | /** 10 | * @fn void daemon_inetd (const char *pname, int facility) 11 | * Initialize a inetd daemon and syslog functions 12 | * @param pname The name of your program 13 | * @param facility Specify the type of program logging (man openlog for details) 14 | */ 15 | void 16 | daemon_inetd (const char *pname, int facility) 17 | { 18 | daemon_proc = 1; /* for our err_XXX() functions */ 19 | openlog (pname, LOG_PID, facility); 20 | } 21 | -------------------------------------------------------------------------------- /gmond/python_modules/conf.d/cpu_stats.pyconf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "cpu_stats" 4 | language = "python" 5 | } 6 | } 7 | 8 | collection_group { 9 | collect_every = 10 10 | time_threshold = 45 11 | 12 | metric { 13 | name = "procs_blocked" 14 | title = "Processes blocked" 15 | value_threshold = 0.0 16 | } 17 | metric { 18 | name = "procs_created" 19 | title = "Processes/Threads created" 20 | value_threshold = 0.0 21 | } 22 | metric { 23 | name_match = "softirq_(.+)" 24 | value_threshold = 1.0 25 | } 26 | metric { 27 | name_match = "cpu_(.+)" 28 | value_threshold = 1.0 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /gmond/python_modules/conf.d/xenstats.pyconf.disabled: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "xenstats" 4 | language = "python" 5 | } 6 | } 7 | 8 | collection_group { 9 | collect_every = 15 10 | time_threshold = 30 11 | 12 | metric { 13 | name = "xen_vms" 14 | value_threshold = 0 15 | } 16 | 17 | metric { 18 | name = "xen_mem_use" 19 | value_threshold = 1.0 20 | } 21 | } 22 | 23 | collection_group { 24 | collect_once = yes 25 | time_threshold = 20 26 | metric { 27 | name = "xen_mem" 28 | value_threshold = 1.0 29 | } 30 | 31 | metric { 32 | name = "xen_cpu" 33 | value_threshold = 0 34 | } 35 | } 36 | 37 | 38 | -------------------------------------------------------------------------------- /gmond/python_modules/conf.d/example.pyconf.disabled: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "example" 4 | language = "python" 5 | enabled = "no" 6 | 7 | param RandomMax { 8 | value = 600 9 | } 10 | param ConstantValue { 11 | value = 112 12 | } 13 | } 14 | } 15 | 16 | #/* Collection groups for the 17 | # example python module */ 18 | collection_group { 19 | collect_every = 10 20 | time_threshold = 50 21 | 22 | metric { 23 | name = "PyRandom_Numbers" 24 | value_threshold = 1.0 25 | } 26 | } 27 | 28 | collection_group { 29 | collect_once = yes 30 | time_threshold = 20 31 | 32 | metric { 33 | name = "PyConstant_Number" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /gmond/modules/system/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS = -D_LARGEFILE64_SOURCE -I$(top_builddir)/include -I$(top_srcdir)/libmetrics -I$(top_builddir)/lib 2 | 3 | if STATIC_BUILD 4 | noinst_LTLIBRARIES = libmodsys.la 5 | libmodsys_la_SOURCES = mod_proc.c mod_sys.c 6 | libmodsys_la_LDFLAGS = -export-all-symbols 7 | else 8 | pkglib_LTLIBRARIES = modproc.la modsys.la 9 | 10 | modproc_la_SOURCES = mod_proc.c 11 | modproc_la_LDFLAGS = -module -avoid-version 12 | modproc_la_LIBADD = $(top_builddir)/libmetrics/libmetrics.la 13 | 14 | modsys_la_SOURCES = mod_sys.c 15 | modsys_la_LDFLAGS = -module -avoid-version 16 | modsys_la_LIBADD = $(top_builddir)/libmetrics/libmetrics.la 17 | endif 18 | 19 | INCLUDES = @APR_INCLUDES@ 20 | -------------------------------------------------------------------------------- /include/gm_value.h: -------------------------------------------------------------------------------- 1 | #ifndef GM_VALUE_H 2 | #define GM_VALUE_H 1 3 | 4 | #include 5 | 6 | enum g_type_t { 7 | g_string, /* huh uh.. he said g string */ 8 | g_int8, 9 | g_uint8, 10 | g_int16, 11 | g_uint16, 12 | g_int32, 13 | g_uint32, 14 | g_float, 15 | g_double, 16 | g_timestamp /* a uint32 */ 17 | }; 18 | typedef enum g_type_t g_type_t; 19 | 20 | #define MAX_G_STRING_SIZE 64 21 | 22 | typedef union { 23 | int8_t int8; 24 | uint8_t uint8; 25 | int16_t int16; 26 | uint16_t uint16; 27 | int32_t int32; 28 | uint32_t uint32; 29 | float f; 30 | double d; 31 | char str[MAX_G_STRING_SIZE]; 32 | } g_val_t; 33 | 34 | #endif /* GM_VALUE_H */ 35 | -------------------------------------------------------------------------------- /gmond/modules/conf.d/example.conf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "example_module" 4 | path = "modexample.so" 5 | params = "An extra raw parameter" 6 | param RandomMax { 7 | value = 75 8 | } 9 | param ConstantValue { 10 | value = 25 11 | } 12 | } 13 | } 14 | 15 | /* Test DSO metric */ 16 | 17 | collection_group { 18 | collect_every = 10 19 | time_threshold = 50 20 | metric { 21 | name = "Random_Numbers" 22 | value_threshold = 1.0 23 | title = "Random Numbers Metric" 24 | } 25 | } 26 | 27 | collection_group { 28 | collect_once = yes 29 | time_threshold = 20 30 | metric { 31 | name = "Constant_Number" 32 | title = "Constant Number Metric" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /gmetad-python/TODO: -------------------------------------------------------------------------------- 1 | Certainly there are hundreds of features not in this version, but of the more 2 | obvious: 3 | 4 | - The "scalable" configuration attribute is not currently supported. 5 | - The "server_threads" configuration attribute is not currently supported. 6 | 7 | In addition, we don't currently have any data on the following: 8 | 9 | - Comparative data to compare disk and runtime footprint to current gmetad. 10 | - Throughput and performance data as compared to current gmetad. 11 | - Stability data - memory usage over time, ability to continue running for 12 | long periods of time, etc. 13 | - Correctness testing - honoring of all configuration parameters and 14 | command-line parameters, generation of correct data, etc. 15 | - Cross-platform capabilities. 16 | -------------------------------------------------------------------------------- /gmetric/Makefile.am: -------------------------------------------------------------------------------- 1 | include $(top_srcdir)/ganglia.inc 2 | 3 | if STATIC_BUILD 4 | GCFLAGS = 5 | GLDADD = 6 | GLDFLAGS = -static 7 | else 8 | GCFLAGS = 9 | GLDADD = 10 | GLDFLAGS = 11 | endif 12 | 13 | INCLUDES = @APR_INCLUDES@ 14 | 15 | AM_CFLAGS = -I../lib -I../include $(GCFLAGS) 16 | 17 | bin_PROGRAMS = gmetric 18 | 19 | cmdline.c: cmdline.c.in $(FIXCONFIG) 20 | $(FIXCONFIG) $< $@ 21 | 22 | gmetric_SOURCES = gmetric.c cmdline.c.in cmdline.c cmdline.h 23 | gmetric_LDADD = $(top_builddir)/lib/libganglia.la \ 24 | $(top_builddir)/lib/libgetopthelper.a \ 25 | $(top_builddir)/libmetrics/libmetrics.la \ 26 | $(GLDADD) 27 | 28 | gmetric_LDFLAGS = $(GLDFLAGS) 29 | 30 | CLEANFILES = cmdline.c 31 | 32 | EXTRA_DIST = cmdline.sh 33 | 34 | -------------------------------------------------------------------------------- /gmond/python_modules/conf.d/procstat.pyconf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = 'procstat' 4 | language = 'python' 5 | 6 | param gmond { 7 | value = '/gmond/' 8 | } 9 | 10 | /* 11 | param httpd { 12 | value = '/var/run/httpd.pid' 13 | } 14 | 15 | param mysqld { 16 | value = '/\/usr\/libexec\/mysqld/' 17 | } 18 | 19 | param splunk { 20 | value = '/splunkd.*start/' 21 | } 22 | 23 | param splunk-web { 24 | value = '/twistd.*SplunkWeb/' 25 | } 26 | 27 | */ 28 | } 29 | } 30 | 31 | collection_group { 32 | collect_every = 30 33 | time_threshold = 30 34 | 35 | metric { 36 | name_match = "procstat_(.+)_cpu" 37 | } 38 | metric { 39 | name_match = "procstat_(.+)_mem" 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /include/gm_file.h: -------------------------------------------------------------------------------- 1 | #ifndef FILE_H 2 | #define FILE_H 1 3 | 4 | #include 5 | 6 | /* Never changes */ 7 | #ifndef BUFFSIZE 8 | #define BUFFSIZE 65536 9 | #endif 10 | 11 | typedef struct { 12 | struct timeval last_read; 13 | float thresh; 14 | char *name; 15 | char *buffer; 16 | size_t buffersize; 17 | } timely_file; 18 | 19 | #define SLURP_FAILURE -1 20 | 21 | #ifdef __cplusplus 22 | extern "C" { 23 | #endif 24 | 25 | int slurpfile (char *filename, char **buffer, int buflen); 26 | float timediff (const struct timeval *thistime, 27 | const struct timeval *lasttime); 28 | char *update_file(timely_file *tf); 29 | char *skip_whitespace (const char *p); 30 | char *skip_token (const char *p); 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /gmond/python_modules/conf.d/vm_stats.pyconf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "vm_stats" 4 | language = "python" 5 | } 6 | } 7 | 8 | collection_group { 9 | collect_every = 30 10 | time_threshold = 45 11 | 12 | metric { 13 | name = "vm_vmeff" 14 | title = "VM Efficiency" 15 | value_threshold = 1.0 16 | } 17 | 18 | metric { 19 | name = "vm_pgmajfault" 20 | title = "Major page fault" 21 | value_threshold = 1.0 22 | } 23 | 24 | metric { 25 | name = "vm_pgpgin" 26 | title = "Pages in from disk" 27 | value_threshold = 1.0 28 | } 29 | 30 | metric { 31 | name = "vm_pgpgout" 32 | title = "Pages out to disk" 33 | value_threshold = 1.0 34 | } 35 | 36 | #metric { 37 | # name = "vm_nr_written" 38 | # value_threshold = 1.0 39 | #} 40 | } 41 | -------------------------------------------------------------------------------- /scripts/tag-ganglia-release: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | SD=`dirname $0` 3 | pushd $SD > /dev/null 4 | 5 | TAG=$1 6 | 7 | if [ "$TAG" == "" ]; then 8 | echo "syntax: $0 TAG" 9 | echo " TAG : destination git tag for version or prerelease" 10 | popd > /dev/null 11 | exit 12 | fi 13 | 14 | if [[ "${TAG}" == *pre* ]]; then 15 | git tag -m "Tag prerelease ${TAG}" "${TAG}" 16 | else 17 | GM=`cat ../configure.ac | egrep '^GANGLIA_MAJOR_VERSION=' | cut -d '=' -f 2` 18 | GN=`cat ../configure.ac | egrep '^GANGLIA_MINOR_VERSION=' | cut -d '=' -f 2` 19 | GU=`cat ../configure.ac | egrep '^GANGLIA_MICRO_VERSION=' | cut -d '=' -f 2` 20 | if [ "$TAG" = "${GM}.${GN}.${GU}" ]; then 21 | git tag -m "Tag release ${TAG}" "${TAG}" 22 | else 23 | echo "version mismatch" 24 | popd > /dev/null 25 | exit 1 26 | fi 27 | fi 28 | popd > /dev/null 29 | -------------------------------------------------------------------------------- /gmetad/xml_hash.gperf: -------------------------------------------------------------------------------- 1 | %{ 2 | #include 3 | %} 4 | struct xml_tag; 5 | %% 6 | GANGLIA_XML, GANGLIA_XML_TAG 7 | VERSION, VERSION_TAG 8 | GRID, GRID_TAG 9 | NAME, NAME_TAG 10 | TAGS, TAGS_TAG 11 | AUTHORITY, AUTHORITY_TAG 12 | CLUSTER, CLUSTER_TAG 13 | LOCALTIME, LOCALTIME_TAG 14 | OWNER, OWNER_TAG, 15 | LATLONG, LATLONG_TAG, 16 | URL, URL_TAG, 17 | HOST, HOST_TAG 18 | HOSTS, HOSTS_TAG, 19 | UP, UP_TAG, 20 | DOWN, DOWN_TAG, 21 | IP, IP_TAG 22 | LOCATION, LOCATION_TAG 23 | REPORTED, REPORTED_TAG 24 | GMOND_STARTED, STARTED_TAG 25 | METRIC, METRIC_TAG 26 | METRICS, METRICS_TAG 27 | SUM, SUM_TAG, 28 | NUM, NUM_TAG, 29 | UNITS, UNITS_TAG 30 | TN, TN_TAG 31 | TMAX, TMAX_TAG 32 | DMAX, DMAX_TAG 33 | VAL, VAL_TAG 34 | TYPE, TYPE_TAG 35 | SLOPE, SLOPE_TAG 36 | SOURCE, SOURCE_TAG 37 | EXTRA_DATA, EXTRA_DATA_TAG 38 | EXTRA_ELEMENT, EXTRA_ELEMENT_TAG 39 | -------------------------------------------------------------------------------- /contrib/ganglia-hosts-lowercase.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This script renames all the host directory names to lowercase 4 | # It is part of a solution to the case-sensitive hostname problem, 5 | # bug 232, http://bugzilla.ganglia.info/cgi-bin/bugzilla/show_bug.cgi?id=232 6 | 7 | # RRDROOT must be set to the location where RRD files are kept 8 | 9 | #RRDROOT=/var/lib/ganglia/rrds 10 | 11 | if [ -z "${RRDROOT}" ]; 12 | then 13 | echo Please specify RRDROOT 14 | exit 1 15 | fi 16 | 17 | killall gmetad 18 | cd $RRDROOT || exit 1 19 | find . -type d -name '*[A-Z]*' ! -name __SummaryInfo__ -mindepth 2 -maxdepth 2 | while read ; 20 | do 21 | OLD_NAME=`echo "$REPLY" | cut -f3 -d/` 22 | NEW_NAME=`echo "$OLD_NAME" | tr [A-Z] [a-z]` 23 | CLUSTER_NAME=`echo "$REPLY" | cut -f2 -d/` 24 | mv "$REPLY" "${CLUSTER_NAME}/${NEW_NAME}" 25 | done 26 | 27 | 28 | -------------------------------------------------------------------------------- /include/gm_msg.h: -------------------------------------------------------------------------------- 1 | #ifndef GM_MSG_H 2 | #define GM_MSG_H 1 3 | 4 | #ifdef __GNUC__ 5 | # define CHECK_FMT(posf,posv) __attribute__((format(printf, posf, posv))) 6 | #else 7 | # define CHECK_FMT(posf,posv) 8 | #endif // __GNUC__ 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | extern int ganglia_quiet_errors; 15 | 16 | void debug_msg(const char *format, ...) CHECK_FMT(1,2); 17 | void set_debug_msg_level(int level); 18 | int get_debug_msg_level(); 19 | 20 | void err_quiet( void ); 21 | void err_ret (const char *fmt, ...) CHECK_FMT(1,2); 22 | void err_sys (const char *fmt, ...) CHECK_FMT(1,2); 23 | void err_dump (const char *fmt, ...) CHECK_FMT(1,2); 24 | void err_msg (const char *fmt, ...) CHECK_FMT(1,2); 25 | void err_quit (const char *fmt, ...) CHECK_FMT(1,2); 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /debian/ganglia-monitor.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | if ! getent group ganglia >/dev/null; then 5 | echo Adding group: ganglia. 6 | addgroup --system ganglia 7 | fi 8 | 9 | if ! getent passwd ganglia >/dev/null; then 10 | echo Adding system user: ganglia. 11 | adduser --system --ingroup ganglia --home /var/lib/ganglia ganglia 12 | usermod -c "Ganglia Monitor" ganglia 13 | usermod -d "/var/lib/ganglia" ganglia 14 | usermod -g "ganglia" ganglia 15 | usermod -s "/bin/false" ganglia 16 | fi 17 | 18 | #if we have an old 2.5.x gmond 19 | if [ -f /etc/gmond.conf ]; then 20 | if [ ! -e /etc/ganglia/gmond.conf ]; then 21 | gmond -r /etc/gmond.conf >/etc/ganglia/gmond.conf 22 | else 23 | gmond -r /etc/gmond.conf >/etc/ganglia/gmond.conf.old 24 | fi 25 | rm /etc/gmond.conf 26 | fi 27 | #DEBHELPER# 28 | 29 | exit 0 30 | -------------------------------------------------------------------------------- /debian/gmetad.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | if ! getent group ganglia >/dev/null; then 5 | echo Adding group: ganglia. 6 | addgroup --system ganglia 7 | fi 8 | 9 | if ! getent passwd ganglia >/dev/null; then 10 | echo Adding system user: ganglia. 11 | adduser --system ganglia --ingroup ganglia --home /var/lib/ganglia 12 | usermod -c "Ganglia Monitor" ganglia 13 | usermod -d "/var/lib/ganglia" ganglia 14 | usermod -g "ganglia" ganglia 15 | usermod -s "/bin/false" ganglia 16 | fi 17 | 18 | if [ ! -d /var/lib/ganglia/rrds ]; then 19 | mkdir -p /var/lib/ganglia/rrds 20 | fi 21 | if [ -d /var/lib/ganglia/rrds ]; then 22 | chown -R ganglia:ganglia /var/lib/ganglia 23 | chown -R nobody /var/lib/ganglia/rrds 24 | chmod 0755 /var/lib/ganglia 25 | chmod -R o-w /var/lib/ganglia/rrds 26 | fi 27 | 28 | #DEBHELPER# 29 | 30 | exit 0 31 | -------------------------------------------------------------------------------- /gimond/flot/css/stylesheet.css: -------------------------------------------------------------------------------- 1 | .container { 2 | box-sizing: border-box; 3 | width: 900px; 4 | height: 120px; 5 | } 6 | 7 | .placeholder { 8 | width: 100%; 9 | height: 100%; 10 | font-size: 10px; 11 | line-height: 1.2em; 12 | } 13 | 14 | .legend table { 15 | border-spacing: 5px; 16 | } 17 | 18 | #tooltip { 19 | position: absolute; 20 | display: none; 21 | border: 1px solid #fdd; 22 | padding: 2px; 23 | opacity: 0.80; 24 | } 25 | 26 | #buttons { 27 | font-family: Arial, sans-serif; 28 | font-size: 0.8em; 29 | border: 1px solid black; 30 | background: #D0D0D0; 31 | padding: 2px; 32 | display: block; 33 | width: 250px; 34 | } 35 | 36 | table { 37 | font-family: Arial, sans-serif; 38 | font-size: 0.8em; 39 | } 40 | 41 | h1 { 42 | font-family: Arial, sans-serif; 43 | font-size: 0.8em; 44 | } -------------------------------------------------------------------------------- /gmond/python_modules/conf.d/mem_stats.pyconf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "mem_stats" 4 | language = "python" 5 | } 6 | } 7 | 8 | collection_group { 9 | collect_every = 30 10 | time_threshold = 45 11 | 12 | metric { 13 | name = "mem_writeback" 14 | title = "Mem actively being written to disk" 15 | value_threshold = 1.0 16 | } 17 | metric { 18 | name = "mem_dirty" 19 | title = "Mem waiting to be written to disk" 20 | value_threshold = 1.0 21 | } 22 | metric { 23 | name = "mem_anonpages" 24 | title = "AnonPages" 25 | value_threshold = 1.0 26 | } 27 | metric { 28 | name = "mem_mapped" 29 | title = "Memory Mapped" 30 | value_threshold = 1.0 31 | } 32 | metric { 33 | name = "mem_hardware_corrupted" 34 | title = "Memory HardwareCorrupted" 35 | value_threshold = 1.0 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /lib/ganglia_priv.h: -------------------------------------------------------------------------------- 1 | #ifndef GANGLIA_PRIV_H 2 | #define GANGLIA_PRIV_H 1 3 | 4 | #ifdef HAVE_CONFIG_H 5 | #include "config.h" 6 | #endif 7 | 8 | #ifdef HAVE_SYS_TIME_H 9 | #include 10 | #ifdef TIME_WITH_SYS_TIME 11 | #include 12 | #endif 13 | #endif 14 | 15 | #include 16 | 17 | #include 18 | #ifndef SYS_CALL 19 | #define SYS_CALL(RC,SYSCALL) \ 20 | do { \ 21 | RC = SYSCALL; \ 22 | } while (RC < 0 && errno == EINTR); 23 | #endif 24 | 25 | #define GANGLIA_DEFAULT_MCAST_CHANNEL "239.2.11.71" 26 | #define GANGLIA_DEFAULT_MCAST_PORT 8649 27 | #define GANGLIA_DEFAULT_XML_PORT 8649 28 | 29 | #ifndef SYNAPSE_FAILURE 30 | #define SYNAPSE_FAILURE -1 31 | #endif 32 | #ifndef SYNAPSE_SUCCESS 33 | #define SYNAPSE_SUCCESS 0 34 | #endif 35 | 36 | char *Ganglia_default_collection_groups(void); 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /gmond/modules/Makefile.am: -------------------------------------------------------------------------------- 1 | if BUILD_PYTHON 2 | PYTHON_SUBDIR = python 3 | endif 4 | 5 | if BUILD_PERL 6 | PERL_SUBDIR = perl 7 | endif 8 | 9 | if BUILD_STATUS 10 | STATUS_SUBDIR = status 11 | endif 12 | 13 | DIST_SUBDIRS = example 14 | DIST_SUBDIRS += cpu disk 15 | DIST_SUBDIRS += memory 16 | DIST_SUBDIRS += network 17 | DIST_SUBDIRS += system 18 | DIST_SUBDIRS += status 19 | DIST_SUBDIRS += python 20 | DIST_SUBDIRS += perl 21 | if STATIC_BUILD 22 | SUBDIRS = cpu 23 | SUBDIRS += disk 24 | SUBDIRS += memory 25 | SUBDIRS += network 26 | SUBDIRS += system 27 | SUBDIRS += $(STATUS_SUBDIR) 28 | SUBDIRS += $(PYTHON_SUBDIR) 29 | SUBDIRS += $(PERL_SUBDIR) 30 | else 31 | SUBDIRS = example 32 | SUBDIRS += cpu 33 | SUBDIRS += disk 34 | SUBDIRS += memory 35 | SUBDIRS += network 36 | SUBDIRS += system 37 | SUBDIRS += $(STATUS_SUBDIR) 38 | SUBDIRS += $(PYTHON_SUBDIR) 39 | SUBDIRS += $(PERL_SUBDIR) 40 | endif 41 | -------------------------------------------------------------------------------- /lib/debug_msg.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file debug_msg.c Debug Message function 3 | */ 4 | #include 5 | #include 6 | 7 | int debug_level = 0; 8 | 9 | /** 10 | * @fn void debug_msg(const char *format, ...) 11 | * Prints the message to STDERR if DEBUG is #defined 12 | * @param format The format of the msg (see printf manpage) 13 | * @param ... Optional arguments 14 | */ 15 | void 16 | debug_msg(const char *format, ...) 17 | { 18 | if (debug_level > 1 && format) 19 | { 20 | va_list ap; 21 | va_start(ap, format); 22 | vfprintf(stderr, format, ap); 23 | fprintf(stderr,"\n"); 24 | va_end(ap); 25 | } 26 | return; 27 | } 28 | 29 | void 30 | set_debug_msg_level(int level) 31 | { 32 | debug_level = level; 33 | return; 34 | } 35 | 36 | int 37 | get_debug_msg_level() 38 | { 39 | return debug_level; 40 | } 41 | 42 | -------------------------------------------------------------------------------- /solaris/postinstall: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | GANGLIA_HOME=${CLIENT_BASEDIR} 4 | GANGLIA_ETC=${GANGLIA_HOME}/etc 5 | 6 | GMOND_CONF=${GANGLIA_ETC}/gmond.conf 7 | 8 | # Set variable smf depending on the availability of SMF binaries 9 | smf=no 10 | if [ -f /usr/sbin/svccfg -a -f /usr/sbin/svcadm ] 11 | then 12 | smf=yes 13 | fi 14 | 15 | # If needed, configure SMF 16 | if [ $smf = yes ] 17 | then 18 | # Register with SMF 19 | echo "Configuring service in SMF" 20 | /usr/sbin/svccfg import ${GANGLIA_HOME}/var/svc/manifest/ganglia/gmond.xml >/dev/null 2>&1 21 | /usr/sbin/svcadm disable svc:/ganglia/gmond >/dev/null 2>&1 22 | echo "gmond is using Service Management Facility. The FMRI is:" 23 | echo " svc:/ganglia/gmond:default" 24 | fi 25 | 26 | if [ $smf = yes ] 27 | then 28 | /usr/sbin/svcadm enable svc:/ganglia/gmond 29 | else 30 | /etc/init.d/gmond start 31 | fi 32 | 33 | exit 0 34 | 35 | -------------------------------------------------------------------------------- /debian/ganglia-webfrontend.templates: -------------------------------------------------------------------------------- 1 | # These templates have been reviewed by the debian-l10n-english 2 | # team 3 | # 4 | # If modifications/additions/rewording are needed, please ask 5 | # debian-l10n-english@lists.debian.org for advice. 6 | # 7 | # Even minor modifications require translation updates and such 8 | # changes should be coordinated with translators and reviewers. 9 | 10 | Template: ganglia-webfrontend/webserver 11 | Type: boolean 12 | Default: false 13 | _Description: Automatically configure apache2? 14 | The ganglia front-end will be unavailable until a web server is configured. 15 | Automatic configuration can be performed for the Apache 2 web server. 16 | 17 | Template: ganglia-webfrontend/restart 18 | Type: boolean 19 | Default: false 20 | _Description: Restart apache2? 21 | In order to activate the new configuration, the web server needs 22 | to be restarted. If you choose not to do this automatically, you should 23 | do so manually at the first opportunity. 24 | -------------------------------------------------------------------------------- /gmond/python_modules/conf.d/diskfree.pyconf: -------------------------------------------------------------------------------- 1 | # Will emit both the absolute amount of disk space left in GB as well as 2 | # percentage e.g. 3 | # disk_free_absolute_rootfs = 25.285355 4 | # disk_free_percent_rootfs = 9.471972 5 | # 6 | # By default it will report only disks larger than 1 GB. Set min_disk_size to override 7 | # Alternative specify additional paths you want monitored under explicit_mounts_to_check 8 | 9 | modules { 10 | module { 11 | name = "diskfree" 12 | language = "python" 13 | 14 | param mounts { 15 | value = '/proc/mounts' 16 | } 17 | 18 | # Minimum disk size to report in GB 19 | param min_disk_size { 20 | value = 1 21 | } 22 | 23 | # Values are space delimited 24 | # param explicit_mounts_to_check { 25 | # value = "/run /boot" 26 | # } 27 | } 28 | } 29 | 30 | collection_group { 31 | collect_every = 60 32 | time_threshold = 180 33 | 34 | metric { 35 | name_match = "disk_free_(.+)" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /gmond/modules/cpu/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS = -D_LARGEFILE64_SOURCE -I$(top_builddir)/include -I$(top_srcdir)/libmetrics -I$(top_builddir)/libmetrics -I$(top_builddir)/lib 2 | 3 | EXTRA_DIST = ../conf.d/multicpu.conf 4 | 5 | if STATIC_BUILD 6 | noinst_LTLIBRARIES = libmodcpu.la libmodmulticpu.la 7 | libmodcpu_la_SOURCES = mod_cpu.c mod_load.c 8 | libmodcpu_la_LDFLAGS = -export-all-symbols 9 | libmodmulticpu_la_SOURCES = mod_multicpu.c 10 | libmodmulticpu_la_LDFLAGS = -export-all-symbols 11 | 12 | else 13 | pkglib_LTLIBRARIES = modmulticpu.la modcpu.la modload.la 14 | 15 | modmulticpu_la_SOURCES = mod_multicpu.c 16 | modmulticpu_la_LDFLAGS = -module -avoid-version 17 | 18 | modcpu_la_SOURCES = mod_cpu.c 19 | modcpu_la_LDFLAGS = -module -avoid-version 20 | modcpu_la_LIBADD = $(top_builddir)/libmetrics/libmetrics.la 21 | 22 | modload_la_SOURCES = mod_load.c 23 | modload_la_LDFLAGS = -module -avoid-version 24 | modload_la_LIBADD = $(top_builddir)/libmetrics/libmetrics.la 25 | 26 | endif 27 | 28 | INCLUDES = @APR_INCLUDES@ 29 | -------------------------------------------------------------------------------- /tests/xdrserver.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | #include "gm_protocol.h" 7 | 8 | #define MAXMSGLEN 1500 9 | 10 | int main( void ) 11 | { 12 | XDR x; 13 | int i, rval, decoded; 14 | char receive[MAXMSGLEN]; 15 | gangliaMessage message; 16 | 17 | rval = read( 0, receive, MAXMSGLEN ); 18 | if(rval <0) 19 | { 20 | fprintf(stderr,"ERROR! Server read error\n"); 21 | } 22 | fprintf(stderr,"SERVER received %d bytes of raw data\n", rval); 23 | 24 | /* Create the XDR receive stream */ 25 | xdrmem_create(&x, receive, MAXMSGLEN, XDR_DECODE); 26 | 27 | /* Flush the data in the (last) received gangliaMessage */ 28 | memset( &message, 0, sizeof(gangliaMessage)); 29 | 30 | /* Read the gangliaMessage from the stream */ 31 | xdr_gangliaMessage(&x, &message); 32 | 33 | /* Find out how much data I decoded */ 34 | decoded = xdr_getpos(&x); 35 | fprintf(stderr,"SERVER decoded the XDR size=%d\n", decoded); 36 | 37 | return 0; 38 | } 39 | -------------------------------------------------------------------------------- /lib/rdwr.h: -------------------------------------------------------------------------------- 1 | /******************************************************** 2 | * An example source module to accompany... 3 | * 4 | * "Using POSIX Threads: Programming with Pthreads" 5 | * by Brad nichols, Dick Buttlar, Jackie Farrell 6 | * O'Reilly & Associates, Inc. 7 | * 8 | ******************************************************** 9 | * rdwr.h -- 10 | * 11 | * Modified by Matt Massie April 2001 12 | * 13 | * Include file for reader/writer locks 14 | * 15 | */ 16 | #ifndef __RDWR_H 17 | #define __RDWR_H 18 | 19 | #include "pthread.h" 20 | 21 | typedef struct rdwr_var 22 | { 23 | int readers_reading; 24 | int writer_writing; 25 | pthread_mutex_t mutex; 26 | pthread_cond_t lock_free; 27 | } 28 | pthread_rdwr_t; 29 | 30 | typedef void *pthread_rdwrattr_t; 31 | 32 | int pthread_rdwr_init_np (pthread_rdwr_t * rdwrp); 33 | int pthread_rdwr_rlock_np (pthread_rdwr_t * rdwrp); 34 | int pthread_rdwr_runlock_np (pthread_rdwr_t * rdwrp); 35 | int pthread_rdwr_wlock_np (pthread_rdwr_t * rdwrp); 36 | int pthread_rdwr_wunlock_np (pthread_rdwr_t * rdwrp); 37 | 38 | #endif /* __RDWR_H */ 39 | -------------------------------------------------------------------------------- /gmond/g25_config.h: -------------------------------------------------------------------------------- 1 | #ifndef GMOND_CONFIG_H 2 | #define GMOND_CONFIG_H 1 3 | #include 4 | #include 5 | 6 | /* autoconf me later */ 7 | #define DEFAULT_GMOND_CONFIG_FILE SYSCONFDIR "/gmond.conf" 8 | 9 | typedef struct 10 | { 11 | char *name; 12 | char *owner; 13 | char *latlong; 14 | char *url; 15 | char *location; 16 | char *mcast_channel; 17 | unsigned short mcast_port; 18 | long int mcast_if_given; 19 | char *mcast_if; 20 | long int mcast_ttl; 21 | long int mcast_threads; 22 | unsigned short xml_port; 23 | long int xml_threads; 24 | char **trusted_hosts; 25 | long int num_nodes; 26 | long int num_custom_metrics; 27 | long int mute; 28 | long int deaf; 29 | long int allow_extra_data; 30 | long int debug_level; 31 | long int no_setuid; 32 | char *setuid; 33 | long int no_gexec; 34 | long int all_trusted; 35 | long int host_dmax; 36 | } gmond_config_t; 37 | 38 | int print_ganglia_25_config( char *path ); 39 | 40 | 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /bootstrap: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # This can be changed whenever it is decided to use a new 4 | # autotools 5 | # 6 | # Official release tarballs should only be prepared using the 7 | # autotools version agreed on the Ganglia mailing list 8 | # 9 | SUPPORTED="Debian 6.0 (squeeze) amd64" 10 | 11 | echo "Bootstrapping libmetrics" 12 | echo "WARNING:" 13 | echo "WARNING: you should only do this on $SUPPORTED" 14 | echo "WARNING: as any other versions of autotools may produce" 15 | echo "WARNING: errors or silently do something unexpected" 16 | echo "WARNING:" 17 | cd libmetrics && ./bootstrap || exit 1 18 | cd .. 19 | 20 | echo "Create distribution timestamp" 21 | touch Makefile.am 22 | echo "Running aclocal" && 23 | aclocal -I m4 && 24 | echo "Running autoheader" && 25 | autoheader && 26 | echo "Creating build" && 27 | mkdir -p build && 28 | echo "Running automake" && 29 | automake --add-missing --copy --foreign 2>/dev/null 30 | echo "Running libtoolize" && 31 | libtoolize --automake --copy && automake --add-missing --copy --foreign && 32 | echo "Running autoconf" && 33 | autoconf -f || exit 1 34 | 35 | echo && 36 | echo "To begin installation, run \"./configure\" now" 37 | -------------------------------------------------------------------------------- /debian/ganglia-webfrontend.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | . /usr/share/debconf/confmodule 6 | db_version 2.0 || [ $? -lt 30 ] 7 | 8 | if [ "$1" = "configure" ]; then 9 | 10 | db_get ganglia-webfrontend/webserver 11 | autoconfigure="$RET" 12 | webserver="apache2" 13 | 14 | if [ "$autoconfigure" = true ]; then 15 | test -x /usr/sbin/$webserver || continue 16 | 17 | # Auto-configure module dependencies 18 | a2enmod php5 || true 19 | a2enmod cgi || true 20 | 21 | if [ ! -f /etc/$webserver/conf.d/ganglia-webfrontend -a ! -h /etc/$webserver/conf.d/ganglia-webfrontend ]; then 22 | ln -s /etc/ganglia-webfrontend/apache.conf /etc/$webserver/conf.d/ganglia-webfrontend 23 | fi 24 | 25 | # Restart apache2 if requested 26 | db_get ganglia-webfrontend/restart 27 | if [ "$RET" = "true" ]; then 28 | if [ -x /usr/sbin/invoke-rc.d ]; then 29 | invoke-rc.d $webserver restart 30 | else 31 | /etc/init.d/$webserver restart 32 | fi 33 | fi 34 | 35 | fi 36 | 37 | fi 38 | 39 | #DEBHELPER# 40 | -------------------------------------------------------------------------------- /gmond/python_modules/conf.d/redis.pyconf.disabled: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "redis" 4 | language = "python" 5 | 6 | param host { value = "127.0.0.1" } 7 | param port { value = 6379 } 8 | } 9 | } 10 | collection_group { 11 | collect_every = 10 12 | time_threshold = 60 13 | 14 | metric { 15 | name = "connected_clients" 16 | } 17 | metric { 18 | name = "connected_slaves" 19 | } 20 | metric { 21 | name = "blocked_clients" 22 | } 23 | metric { 24 | name = "used_memory" 25 | } 26 | metric { 27 | name = "changes_since_last_save" 28 | } 29 | metric { 30 | name = "bgsave_in_progress" 31 | } 32 | metric { 33 | name = "bgrewriteaof_in_progress" 34 | } 35 | metric { 36 | name = "total_connections_received" 37 | } 38 | metric { 39 | name = "total_commands_processed" 40 | } 41 | metric { 42 | name = "expired_keys" 43 | } 44 | metric { 45 | name = "pubsub_channels" 46 | } 47 | metric { 48 | name = "pubsub_patterns" 49 | } 50 | metric { 51 | name = "vm_enabled" 52 | } 53 | metric { 54 | name = "master_last_io_seconds_ago" 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /debian/gmetad.init: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | ### BEGIN INIT INFO 3 | # Provides: gmetad 4 | # Required-Start: $network $named $remote_fs $syslog 5 | # Required-Stop: $network $named $remote_fs $syslog 6 | # Default-Start: 2 3 4 5 7 | # Default-Stop: 0 1 6 8 | ### END INIT INFO 9 | PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 10 | DAEMON=/usr/sbin/gmetad 11 | NAME=gmetad 12 | DESC="Ganglia Monitor Meta-Daemon" 13 | 14 | test -x $DAEMON || exit 0 15 | 16 | set -e 17 | 18 | case "$1" in 19 | start) 20 | echo -n "Starting $DESC: " 21 | start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ 22 | --exec $DAEMON 23 | echo "$NAME." 24 | ;; 25 | stop) 26 | echo -n "Stopping $DESC: " 27 | start-stop-daemon --stop --quiet --oknodo \ 28 | --exec $DAEMON 2>&1 > /dev/null 29 | echo "$NAME." 30 | ;; 31 | reload) 32 | ;; 33 | restart|force-reload) 34 | $0 stop 35 | $0 start 36 | ;; 37 | *) 38 | N=/etc/init.d/$NAME 39 | # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 40 | echo "Usage: $N {start|stop|restart|force-reload}" >&2 41 | exit 1 42 | ;; 43 | esac 44 | 45 | exit 0 46 | -------------------------------------------------------------------------------- /gmond/python_modules/conf.d/traffic1.pyconf.disabled: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "traffic1" 4 | language = "python" 5 | 6 | param target_device { 7 | value = "bond0.2" 8 | } 9 | param spoof_host { 10 | value = "10.10.0.1:lvs" 11 | } 12 | } 13 | } 14 | 15 | collection_group { 16 | collect_every = 15 17 | time_threshold = 90 18 | 19 | metric { 20 | name = "recv_bytes_bond0.2" 21 | title = "Received bytes/sec" 22 | value_threshold = 0.0 23 | } 24 | metric { 25 | name = "recv_pkts_bond0.2" 26 | title = "Received pkts/sec" 27 | value_threshold = 0.0 28 | } 29 | metric { 30 | name = "recv_errs_bond0.2" 31 | title = "Received error pkts/sec" 32 | value_threshold = 0.0 33 | } 34 | 35 | metric { 36 | name = "trans_bytes_bond0.2" 37 | title = "Transmitted bytes/sec" 38 | value_threshold = 0.0 39 | } 40 | metric { 41 | name = "trans_pkts_bond0.2" 42 | title = "Transmitted pkts/sec" 43 | value_threshold = 0.0 44 | } 45 | metric { 46 | name = "trans_errs_bond0.2" 47 | title = "Transmitted error pkts/sec" 48 | value_threshold = 0.0 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /gmetad/riemann.proto: -------------------------------------------------------------------------------- 1 | option java_package = "com.aphyr.riemann"; 2 | option java_outer_classname = "Proto"; 3 | 4 | message State { 5 | optional int64 time = 1; 6 | optional string state = 2; 7 | optional string service = 3; 8 | optional string host = 4; 9 | optional string description = 5; 10 | optional bool once = 6; 11 | repeated string tags = 7; 12 | optional float ttl = 8; 13 | } 14 | 15 | message Event { 16 | optional int64 time = 1; 17 | optional string state = 2; 18 | optional string service = 3; 19 | optional string host = 4; 20 | optional string description = 5; 21 | repeated string tags = 7; 22 | optional float ttl = 8; 23 | repeated Attribute attributes = 9; 24 | 25 | optional sint64 metric_sint64 = 13; 26 | optional double metric_d = 14; 27 | optional float metric_f = 15; 28 | } 29 | 30 | message Query { 31 | optional string string = 1; 32 | } 33 | 34 | message Msg { 35 | optional bool ok = 2; 36 | optional string error = 3; 37 | repeated State states = 4; 38 | optional Query query = 5; 39 | repeated Event events = 6; 40 | } 41 | 42 | message Attribute { 43 | required string key = 1; 44 | optional string value = 2; 45 | } 46 | -------------------------------------------------------------------------------- /debian/ganglia-webfrontend.postrm: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | set -e 4 | 5 | . /usr/share/debconf/confmodule 6 | db_version 2.0 || [ $? -lt 30 ] 7 | 8 | if [ "$1" = "purge" ]; then 9 | 10 | db_get ganglia-webfrontend/webserver || true 11 | 12 | if [ "$RET" = "true" ]; then 13 | webserver="apache2" 14 | 15 | if [ -h /etc/$webserver/conf.d/ganglia-webfrontend ]; then 16 | rm -f /etc/$webserver/conf.d/ganglia-webfrontend 17 | fi 18 | 19 | if [ -x /usr/sbin/$webserver ]; then 20 | db_reset ganglia-webfrontend/restart 21 | db_input high ganglia-webfrontend/restart || true 22 | db_go 23 | 24 | # Restart apache2 if requested 25 | db_get ganglia-webfrontend/restart 26 | if [ "$RET" = "true" ]; then 27 | if [ -x /usr/sbin/invoke-rc.d ]; then 28 | invoke-rc.d $webserver restart 29 | else 30 | /etc/init.d/$webserver restart 31 | fi 32 | fi 33 | fi 34 | fi 35 | 36 | rmdir --ignore-fail-on-non-empty /etc/ganglia-webfrontend || true 37 | 38 | db_purge 39 | 40 | fi 41 | 42 | #DEBHELPER# 43 | -------------------------------------------------------------------------------- /contrib/README-removespikes: -------------------------------------------------------------------------------- 1 | README for removespikes.pl 2 | 3 | Skript to remove spikes from RRD databases. Distributed with 4 | permission from Tobias Oetiker ( tobi _AT_ oetiker.ch ). The original 5 | download place is at: http://oss.oetiker.ch/rrdtool/pub/contrib/ 6 | 7 | This version of removespikes.pl is based on Vins Vilaplana and 8 | Humberto Rossetti Baptistas code. 9 | 10 | I have added value-based chopping (-t value), an analysis-only mode (-a), 11 | control of verbose/debug output (-d/-v), a help option (-h) and some 12 | code cleanup. 13 | 14 | removespikes>./removespikes.pl -h 15 | REMOVESPIKES: Remove spikes from RRDtool databases. 16 | 17 | Usage: 18 | ./removespikes.pl -d -a [-l number] [-t maxval] name_of_database 19 | 20 | Where: 21 | -d enables debug messages 22 | -a runs only the analysis phase of the script 23 | -h prints this message 24 | -l sets the % limit of spikes bin-based chopping (default: 0.6) 25 | -t sets the value above which records are chopped. Disabled by default. 26 | Enabling value-based chopping will disable bin-based chopping 27 | 28 | -v Verbose mode. Shows some information 29 | name_of_database is the rrd file to be treated. 30 | removespikes> 31 | 32 | Enjoy 33 | 34 | Martin (knobi at knobisoft dot de) 35 | -------------------------------------------------------------------------------- /lib/apr_net.h: -------------------------------------------------------------------------------- 1 | #ifndef APR_NET_H 2 | #define APR_NET_H 1 3 | 4 | #include 5 | #include 6 | 7 | apr_socket_t * 8 | create_udp_client(apr_pool_t *context, char *ipaddr, apr_port_t port, const char *interface, char *bind_address, int bind_hostname); 9 | 10 | apr_socket_t * 11 | create_udp_server(apr_pool_t *context, int32_t family, apr_port_t port, char *bind); 12 | 13 | APR_DECLARE(apr_status_t) 14 | apr_sockaddr_ip_buffer_get(char *addr, int len, apr_sockaddr_t *sockaddr); 15 | 16 | int 17 | get_apr_os_socket(apr_socket_t *socket); 18 | 19 | apr_status_t 20 | join_mcast( apr_pool_t *context, apr_socket_t *sock, char *mcast_channel, apr_port_t port, char *ifname ); 21 | 22 | apr_socket_t * 23 | create_mcast_client(apr_pool_t *context, char *mcast_ip, apr_port_t port, int ttl, const char *interface, char *bind_address, int bind_hostname); 24 | 25 | int mcast_set_ttl(apr_socket_t *socket, int val); 26 | 27 | apr_socket_t * 28 | create_mcast_server(apr_pool_t *context, int32_t family, char *mcast_ip, apr_port_t port, char *bind, char *interface); 29 | 30 | apr_socket_t * 31 | create_tcp_server(apr_pool_t *context, int32_t family, apr_port_t port, char 32 | *bind, char *interface, int blocking, int32_t gzip_output); 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /lib/become_a_nobody.c: -------------------------------------------------------------------------------- 1 | #ifdef HAVE_CONFIG_H 2 | #include "config.h" 3 | #endif 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | #include "become_a_nobody.h" 11 | #include 12 | 13 | void 14 | become_a_nobody( const char *username ) 15 | { 16 | int rval; 17 | struct passwd *pw; 18 | 19 | pw = getpwnam(username); 20 | if ( pw == NULL ) 21 | { 22 | err_quit("user '%s' does not exist\n\n", username); 23 | } 24 | 25 | rval = getuid(); 26 | if ( rval != pw->pw_uid ) 27 | { 28 | if ( rval != 0 ) 29 | { 30 | err_quit("Must be root to setuid to \"%s\"\n\n", username); 31 | } 32 | 33 | rval = setgid(pw->pw_gid); 34 | if ( rval < 0 ) 35 | { 36 | err_quit("exiting. setgid %d error", (int) pw->pw_gid); 37 | } 38 | 39 | rval = initgroups(username, pw->pw_gid); 40 | if ( rval < 0 ) 41 | { 42 | err_quit("exiting. initgroups '%s', %d error", 43 | username, (int) pw->pw_gid); 44 | } 45 | 46 | rval = setuid(pw->pw_uid); 47 | if ( rval < 0 ) 48 | { 49 | err_quit("exiting. setuid '%s' error", username); 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /gmond/modules/perl/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | include $(top_srcdir)/ganglia.inc 3 | 4 | AM_CFLAGS = -D_LARGEFILE64_SOURCE -I$(top_builddir)/include -I$(top_builddir)/lib 5 | 6 | if STATIC_BUILD 7 | noinst_LTLIBRARIES = libmodperl.la 8 | libmodperl_la_SOURCES = mod_perl.c 9 | libmodperl_la_LDFLAGS = -export-all-symbols 10 | else 11 | pkglib_LTLIBRARIES = modperl.la 12 | modperl_la_SOURCES = mod_perl.c 13 | #modperl_la_CFLAGS = @PERL_CFLAGS@ 14 | modperl_la_LDFLAGS = -module -avoid-version @PERL_LDFLAGS@ 15 | 16 | EXTRA_DIST = README.in ../conf.d/modperl.conf.in 17 | endif 18 | 19 | README: README.in $(FIXCONFIG) 20 | $(FIXCONFIG) $< $@ 21 | 22 | $(builddir)/../conf.d/modperl.conf: $(srcdir)/../conf.d/modperl.conf.in $(FIXCONFIG) 23 | mkdir -p $(builddir)/../conf.d && \ 24 | $(FIXCONFIG) $< $@ 25 | 26 | # Note that README is listed as a dependency to be generated, but it 27 | # is not currently installed anywhere 28 | install-exec-hook: $(builddir)/../conf.d/modperl.conf README 29 | mkdir -p $(DESTDIR)$(sysconfdir)/conf.d && \ 30 | $(INSTALL_DATA) $(builddir)/../conf.d/modperl.conf $(DESTDIR)$(sysconfdir)/conf.d/modperl.conf 31 | 32 | CLEANFILES = $(builddir)/../conf.d/modperl.conf README 33 | 34 | uninstall-hook: 35 | rm $(DESTDIR)$(sysconfdir)/conf.d/modperl.conf 36 | 37 | INCLUDES = @APR_INCLUDES@ @PERL_INCLUDES@ 38 | -------------------------------------------------------------------------------- /gmond/modules/python/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | include $(top_srcdir)/ganglia.inc 3 | 4 | AM_CFLAGS = -D_LARGEFILE64_SOURCE -I$(top_builddir)/include -I$(top_builddir)/lib 5 | 6 | if STATIC_BUILD 7 | noinst_LTLIBRARIES = libmodpython.la 8 | libmodpython_la_SOURCES = mod_python.c 9 | libmodpython_la_LDFLAGS = -export-all-symbols 10 | else 11 | pkglib_LTLIBRARIES = modpython.la 12 | modpython_la_SOURCES = mod_python.c 13 | modpython_la_LDFLAGS = -module -avoid-version -lpython@PYTHON_VERSION@ 14 | 15 | EXTRA_DIST = README.in ../conf.d/modpython.conf.in 16 | endif 17 | 18 | README: README.in $(FIXCONFIG) 19 | $(FIXCONFIG) $< $@ 20 | 21 | $(builddir)/../conf.d/modpython.conf: $(srcdir)/../conf.d/modpython.conf.in $(FIXCONFIG) 22 | mkdir -p $(builddir)/../conf.d && \ 23 | $(FIXCONFIG) $< $@ 24 | 25 | # Note that README is listed as a dependency to be generated, but it 26 | # is not currently installed anywhere 27 | install-exec-hook: $(builddir)/../conf.d/modpython.conf README 28 | mkdir -p $(DESTDIR)$(sysconfdir)/conf.d && \ 29 | $(INSTALL_DATA) $(builddir)/../conf.d/modpython.conf $(DESTDIR)$(sysconfdir)/conf.d/modpython.conf 30 | 31 | CLEANFILES = $(builddir)/../conf.d/modpython.conf README 32 | 33 | uninstall-hook: 34 | rm $(DESTDIR)$(sysconfdir)/conf.d/modpython.conf 35 | 36 | INCLUDES = @APR_INCLUDES@ @PYTHON_INCLUDES@ 37 | -------------------------------------------------------------------------------- /gmond/python_modules/conf.d/varnish.pyconf.disabled: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "varnish" 4 | language = "python" 5 | 6 | param stats_command { 7 | value = "varnishstat -1" 8 | } 9 | } 10 | } 11 | 12 | collection_group { 13 | collect_every = 30 14 | time_threshold = 60 15 | 16 | # If you want all of metrics kept track by varnishstat ie. all 100 of them 17 | # you can simply uncomment line below and comment out all the other ones 18 | # metric { 19 | # name_match = "varnish_(.+)" 20 | # } 21 | 22 | metric { 23 | name = "varnish_client_req" 24 | title = "Client Requests" 25 | } 26 | metric { 27 | name = "varnish_backend_req" 28 | title = "Backend Requests" 29 | } 30 | metric { 31 | name = "varnish_backend_unhealthy" 32 | title = "Backend conn. not attempted" 33 | } 34 | metric { 35 | name = "varnish_backend_busy" 36 | title = "Backend conn. too many" 37 | } 38 | metric { 39 | name = "varnish_cache_hit_ratio" 40 | title = "Cache Hit Ratio" 41 | } 42 | metric { 43 | name = "varnish_n_object" 44 | title = "Objects in Cache" 45 | } 46 | metric { 47 | name = "varnish_sm_balloc" 48 | title = "Allocated Storage" 49 | } 50 | metric { 51 | name = "varnish_n_wrk" 52 | title = "Worker Threads" 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /mans/gmetad.py.1: -------------------------------------------------------------------------------- 1 | .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36. 2 | .TH GMETAD.PY "1" "January 2011" "gmetad.py" "User Commands" 3 | .SH NAME 4 | gmetad.py \- Ganglia Meta Daemon in Python 5 | .SH SYNOPSIS 6 | .B gmetad.py 7 | [\fIoptions\fR] 8 | .SH OPTIONS 9 | .TP 10 | \fB\-\-version\fR 11 | show program's version number and exit 12 | .TP 13 | \fB\-h\fR, \fB\-\-help\fR 14 | show this help message and exit 15 | .TP 16 | \fB\-d\fR DEBUG, \fB\-\-debug\fR=\fIDEBUG\fR 17 | Debug level. If five (5) or greater, daemon will stay 18 | in foreground. Values are: 0 \- FATAL 19 | 1 \- CRITICAL 2 \- ERROR (default) 20 | 3 \- WARNING 4 \- INFO 5 \- DEBUG 21 | .TP 22 | \fB\-p\fR PID_FILE, \fB\-\-pid_file\fR=\fIPID_FILE\fR 23 | Write process\-id to file 24 | .TP 25 | \fB\-c\fR CONF, \fB\-\-conf\fR=\fICONF\fR 26 | Location of gmetad configuration file 27 | (default='/etc/ganglia/gmetad\-python.conf') 28 | .TP 29 | \fB\-l\fR LOGFILE, \fB\-\-logfile\fR=\fILOGFILE\fR 30 | Log messages to this path in addition to syslog; 31 | overrides configuration 32 | .TP 33 | \fB\-i\fR INTERACTIVE_PORT, \fB\-\-interactive_port\fR=\fIINTERACTIVE_PORT\fR 34 | Interactive port to listen on (default=8652) 35 | .TP 36 | \fB\-x\fR XML_PORT, \fB\-\-xml_port\fR=\fIXML_PORT\fR 37 | XML port to listen on (default=8651) 38 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | Makefile.in 3 | aclocal.m4 4 | autom4te.cache/ 5 | build/ 6 | config.cache 7 | config.h 8 | config.h.in 9 | config.log 10 | config.status 11 | configure 12 | ganglia.spec 13 | gmetad-python/Gmetad/gmetad_config.py 14 | gmetad-python/gmetad-python.conf 15 | gmetad-python/gmetad-python.service 16 | gmetad-python/plugins/rrd_plugin.py 17 | gmetad-python/setup.py 18 | gmetad/conf.c 19 | gmetad/cmdline.c 20 | gmetad/gmetad.conf 21 | gmetad/gmetad 22 | gmetad/gmetad.service 23 | gmond/cmdline.c 24 | gmond/gmond.conf 25 | gmond/gmond 26 | gmond/gmond.service 27 | gmond/modules/**/*.lo 28 | gmond/modules/**/*.la 29 | gmond/modules/**/*.o 30 | gmond/modules/**/.deps 31 | gmond/modules/**/.libs 32 | gmond/gmond.conf.5 33 | gmond/gmond.conf.html 34 | gmetric/gmetric 35 | gmetric/cmdline.c 36 | gstat/gstat 37 | **/*.tmp 38 | btool 39 | **/Makefile 40 | **/Makefile.in 41 | **/.deps 42 | **/.libs 43 | **/*.o 44 | **/*.tmp 45 | **/*.a 46 | **/*.la 47 | **/*.lo 48 | *~ 49 | *.pyc 50 | scripts/fixconfig 51 | stamp-h1 52 | lib/default_conf.h 53 | lib/gm_protocol.h 54 | lib/gm_protocol_xdr.c 55 | lib/*.lo 56 | lib/*.la 57 | lib/*.a 58 | libmetrics/configure.lineno 59 | libmetrics/**/.deps 60 | libmetrics/**/.libs 61 | libmetrics/**/*.la 62 | libmetrics/**/*.lo 63 | libmetrics/**/*.o 64 | libtool 65 | .idea 66 | **/tags 67 | **/*.m4 68 | **/*.swp 69 | -------------------------------------------------------------------------------- /include/ganglia_gexec.h: -------------------------------------------------------------------------------- 1 | #ifndef GANGLIA_GEXEC_H 2 | #define GANGLIA_GEXEC_H 1 3 | 4 | extern int gexec_errno; 5 | 6 | #define GEXEC_TIMEOUT 60 7 | 8 | #define GEXEC_HOST_STRING_LEN 256 9 | struct gexec_host_t { 10 | char ip[64]; 11 | char name[GEXEC_HOST_STRING_LEN]; 12 | char domain[GEXEC_HOST_STRING_LEN]; 13 | double load_one; 14 | double load_five; 15 | double load_fifteen; 16 | double cpu_user; 17 | double cpu_nice; 18 | double cpu_system; 19 | double cpu_idle; 20 | double cpu_wio; 21 | unsigned int proc_run; 22 | unsigned int proc_total; 23 | unsigned int cpu_num; 24 | time_t last_reported; 25 | int gexec_on; 26 | int name_resolved; 27 | }; 28 | typedef struct gexec_host_t gexec_host_t; 29 | 30 | typedef struct 31 | { 32 | char name[256]; 33 | time_t localtime; 34 | unsigned int num_hosts; 35 | void *hosts; 36 | unsigned int num_gexec_hosts; 37 | void *gexec_hosts; 38 | unsigned int num_dead_hosts; 39 | void *dead_hosts; 40 | 41 | /* Used internally */ 42 | int malloc_error; 43 | gexec_host_t *host; 44 | int host_up; 45 | int start; 46 | } 47 | gexec_cluster_t; 48 | 49 | int gexec_cluster_free ( gexec_cluster_t *cluster ); 50 | int gexec_cluster (gexec_cluster_t *cluster, char *ip, unsigned short port); 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /gmetad/daemon_init.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file daemon_init.c Functions for standalone daemons 3 | */ 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include "daemon_init.h" 11 | 12 | #define MAXFD 64 13 | 14 | extern int daemon_proc; /* defined in error_msg.c */ 15 | 16 | /** 17 | * @fn void daemon_init (const char *pname, int facility) 18 | * @param pname The name of your program 19 | * @param facility See the openlog() manpage for details 20 | */ 21 | void 22 | daemon_init (const char *pname, int facility, mode_t rrd_umask) 23 | { 24 | int i; 25 | pid_t pid; 26 | 27 | pid = fork(); 28 | 29 | if (pid != 0) 30 | exit (0); /* parent terminates */ 31 | 32 | /* 41st child continues */ 33 | setsid (); /* become session leader */ 34 | 35 | signal (SIGHUP, SIG_IGN); 36 | if ((pid = fork ()) != 0) 37 | exit (0); /* 1st child terminates */ 38 | 39 | /* 42nd child continues */ 40 | daemon_proc = 1; /* for our err_XXX() functions */ 41 | 42 | i = chdir ("/"); /* change working directory */ 43 | 44 | /* filter out rrd file priviledges using umask */ 45 | umask (rrd_umask); 46 | 47 | for (i = 0; i < MAXFD; i++) 48 | close (i); 49 | 50 | openlog (pname, LOG_PID, facility); 51 | } 52 | -------------------------------------------------------------------------------- /lib/hash.h: -------------------------------------------------------------------------------- 1 | #ifndef HASH__H 2 | #define HASH__H 1 3 | 4 | #include /* For size_t */ 5 | #include 6 | 7 | #define HASH_FLAG_IGNORE_CASE 1 8 | 9 | typedef struct 10 | { 11 | void *data; 12 | unsigned int size; 13 | } 14 | datum_t; 15 | 16 | typedef struct node 17 | { 18 | datum_t *key; 19 | datum_t *val; 20 | struct node *next; 21 | char __pad[8]; 22 | } 23 | node_t; 24 | 25 | typedef struct 26 | { 27 | apr_pool_t *lockpool; 28 | apr_thread_rwlock_t **lock; 29 | size_t size; 30 | node_t *node; 31 | int flags; 32 | } 33 | hash_t; 34 | 35 | hash_t *hash_create (size_t size); 36 | void hash_destroy(hash_t *hash); 37 | 38 | int hash_get_flags(hash_t *hash); 39 | void hash_set_flags(hash_t *hash, int flags); 40 | 41 | datum_t *hash_insert (datum_t *key, datum_t *val, hash_t *hash); 42 | datum_t *hash_delete (datum_t *key, hash_t *hash); 43 | 44 | datum_t *hash_lookup (datum_t *key, hash_t *hash); 45 | int hash_foreach (hash_t *hash, int (*func)(datum_t *key, datum_t *val, void *), void *arg); 46 | int hash_walkfrom (hash_t *hash, size_t from, int (*func)(datum_t *key, datum_t *val, void *), void *arg); 47 | 48 | datum_t *datum_new ( void *data, size_t size ); 49 | void datum_free ( datum_t *datum ); 50 | 51 | size_t hashval ( datum_t *key, hash_t *hash ); 52 | 53 | #endif /* HASH__H */ 54 | -------------------------------------------------------------------------------- /gmond/python_modules/conf.d/tcpconn.pyconf.disabled: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "tcpconn" 4 | language = "python" 5 | param RefreshRate { 6 | value = 5 7 | } 8 | } 9 | } 10 | 11 | collection_group { 12 | collect_every = 10 13 | time_threshold = 20 14 | metric { 15 | name = "tcp_established" 16 | value_threshold = 1.0 17 | } 18 | metric { 19 | name = "tcp_listen" 20 | value_threshold = 1.0 21 | } 22 | metric { 23 | name = "tcp_timewait" 24 | value_threshold = 1.0 25 | } 26 | metric { 27 | name = "tcp_closewait" 28 | value_threshold = 1.0 29 | } 30 | metric { 31 | name = "tcp_synsent" 32 | value_threshold = 1.0 33 | } 34 | metric { 35 | name = "tcp_synrecv" 36 | value_threshold = 1.0 37 | } 38 | metric { 39 | name = "tcp_synwait" 40 | value_threshold = 1.0 41 | } 42 | metric { 43 | name = "tcp_finwait1" 44 | value_threshold = 1.0 45 | } 46 | metric { 47 | name = "tcp_finwait2" 48 | value_threshold = 1.0 49 | } 50 | metric { 51 | name = "tcp_closed" 52 | value_threshold = 1.0 53 | } 54 | metric { 55 | name = "tcp_lastack" 56 | value_threshold = 1.0 57 | } 58 | metric { 59 | name = "tcp_closing" 60 | value_threshold = 1.0 61 | } 62 | metric { 63 | name = "tcp_unknown" 64 | value_threshold = 1.0 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /lib/Makefile.am: -------------------------------------------------------------------------------- 1 | #SUFFIXES=.x 2 | #.c.x: rpcgen $< 3 | 4 | if STATIC_BUILD 5 | GCFLAGS = -D_LARGEFILE64_SOURCE 6 | GLDADD = 7 | GLDFLAGS = -static 8 | else 9 | GCFLAGS = -D_LARGEFILE64_SOURCE 10 | GLDADD = 11 | GLDFLAGS = 12 | endif 13 | if BUILD_SFLOW 14 | GCFLAGS += -DSFLOW 15 | endif 16 | 17 | INCLUDES = @APR_INCLUDES@ 18 | AM_CFLAGS = -I.. -I. -I$(top_srcdir)/include -I$(top_builddir)/include $(GCFLAGS) -DSYSCONFDIR='"$(sysconfdir)"' 19 | 20 | include_HEADERS = gm_protocol.h 21 | 22 | EXTRA_DIST=gm_protocol.x 23 | gm_protocol_xdr.c gm_protocol.h: gm_protocol.x 24 | rpcgen gm_protocol.x 25 | 26 | lib_LTLIBRARIES = libganglia.la 27 | libganglia_la_SOURCES = gm_protocol_xdr.c gm_protocol.h \ 28 | become_a_nobody.c become_a_nobody.h \ 29 | debug_msg.c update_pidfile.c update_pidfile.h file.c \ 30 | dotconf.c dotconf.h error_msg.c ganglia_priv.h \ 31 | ganglia.c hash.c hash.h inetaddr.c llist.c llist.h \ 32 | my_inet_ntop.c my_inet_ntop.h net.h rdwr.c rdwr.h readdir.c readdir.h tcp.c \ 33 | scoreboard.c gm_scoreboard.h apr_net.c apr_net.h libgmond.c 34 | libganglia_la_LDFLAGS = \ 35 | -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ 36 | -export-dynamic \ 37 | $(GLDFLAGS) 38 | 39 | libganglia_la_LIBADD = $(GLDADD) 40 | 41 | noinst_LIBRARIES = libgetopthelper.a 42 | # A little helper for getopt functions 43 | libgetopthelper_a_SOURCES = getopt1.c getopt.c getopt_init.c getopt.h 44 | -------------------------------------------------------------------------------- /debian/ganglia-monitor.init: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | ### BEGIN INIT INFO 3 | # Provides: ganglia-monitor 4 | # Required-Start: $network $named $remote_fs $syslog 5 | # Required-Stop: $network $named $remote_fs $syslog 6 | # Default-Start: 2 3 4 5 7 | # Default-Stop: 0 1 6 8 | ### END INIT INFO 9 | PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 10 | DAEMON=/usr/sbin/gmond 11 | NAME=gmond 12 | DESC="Ganglia Monitor Daemon" 13 | 14 | test -x $DAEMON || exit 0 15 | 16 | set -e 17 | 18 | case "$1" in 19 | start) 20 | echo -n "Starting $DESC: " 21 | start-stop-daemon --start --quiet -m --pidfile /var/run/$NAME.pid \ 22 | --exec $DAEMON 23 | echo "$NAME." 24 | ;; 25 | stop) 26 | echo -n "Stopping $DESC: " 27 | start-stop-daemon --stop --quiet --oknodo --name $NAME \ 28 | 2>&1 > /dev/null 29 | echo "$NAME." 30 | ;; 31 | status) 32 | if pidof -o %PPID gmond > /dev/null; then 33 | echo "Running" 34 | exit 0 35 | else 36 | echo "Not running" 37 | exit 1 38 | fi 39 | ;; 40 | reload) 41 | ;; 42 | restart|force-reload) 43 | $0 stop 44 | $0 start 45 | ;; 46 | *) 47 | N=/etc/init.d/$NAME 48 | # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 49 | echo "Usage: $N {start|stop|restart|status|force-reload}" >&2 50 | exit 1 51 | ;; 52 | esac 53 | 54 | exit 0 55 | -------------------------------------------------------------------------------- /gmetad/conf.h: -------------------------------------------------------------------------------- 1 | #ifndef CONFIG_H 2 | #define CONFIG_H 1 3 | #include 4 | 5 | #include 6 | #include 7 | #include "llist.h" 8 | 9 | #define MAX_RRAS 32 10 | typedef struct 11 | { 12 | char *gridname; 13 | int xml_port; 14 | int interactive_port; 15 | int server_threads; 16 | int umask; 17 | llist_entry *trusted_hosts; 18 | int unsummarized_sflow_vm_metrics; 19 | llist_entry *unsummarized_metrics; 20 | llist_entry *summarized_metrics; 21 | int debug_level; 22 | int should_setuid; 23 | char *setuid_username; 24 | char *rrd_rootdir; 25 | char *rrdcached_addrstr; 26 | struct sockaddr_in rrdcached_address; 27 | char *carbon_server; 28 | int carbon_port; 29 | char *carbon_protocol; 30 | int carbon_timeout; 31 | char *memcached_parameters; 32 | int memcached_include_cluster_in_key; 33 | char *graphite_prefix; 34 | char *graphite_path; 35 | int scalable_mode; 36 | int write_rrds; 37 | int all_trusted; 38 | int num_RRAs; 39 | char *RRAs[MAX_RRAS]; 40 | char *riemann_server; 41 | int riemann_port; 42 | char *riemann_protocol; 43 | char *riemann_attributes; 44 | int case_sensitive_hostnames; 45 | int shortest_step; 46 | } gmetad_config_t; 47 | 48 | int get_gmetad_config(char *conffile); 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /README.OPENBSD: -------------------------------------------------------------------------------- 1 | Using Ganglia on OpenBSD 2 | ~~~~~~~~~~~~~~~~~~~~ 3 | 4 | This version has been tested on the following OpenBSD releases: 5 | - OpenBSD 5.3 6 | 7 | 8 | Installation 9 | ~~~~~~~~~~~~ 10 | 11 | 1. install several prerequisite packages: 12 | pkg_add libfuse automake-1.9 autoconf-2.69 apr pcre 13 | (if you wish to run gmetad, install rrdtool) 14 | 15 | 1.a set env varialbes: 16 | export AUTOMAKE_VERSION=1.9 17 | export AUTOCONF_VERSION=2.69 18 | 19 | 2. run bootstrap script in the root folder of this repository, 20 | note any problems: 21 | ./bootstrap 22 | 23 | 3. If that completes OK, run configure: 24 | ./configure --with-libconfuse=/usr/local 25 | 26 | 4. compile: 27 | make && make install 28 | 29 | 5. configuring: 30 | mkdir -p /usr/local/etc/ganglia/conf.d 31 | gmond -t > /usr/local/etc/ganglia/gmond.conf 32 | 33 | 5.a manually edit that gmond.conf file and in modules {} section 34 | put absolute path for all mod.*.so strings, that is in vim: 35 | %s/mod.*.so/\/usr\/local\/lib\/ganglia\/&/g 36 | 37 | 5.b create an init script from sshd: 38 | cp /etc/rc.d/{sshd,gmond} 39 | edit it, and replace: 40 | - daemon with /usr/local/sbin/gmond 41 | - daemon_args="-c /usr/local/etc/ganglia/gmond.conf -p /var/run/gmond.pid" 42 | 43 | 5. running: 44 | /etc/rc.d/gmond start|stop 45 | 46 | 6. setting it to run at boot time: refer to OpenBSD documentation. 47 | -------------------------------------------------------------------------------- /contrib/ganglia_gmond.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /contrib/ganglia_gmetad.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /debian/gmetad.conf: -------------------------------------------------------------------------------- 1 | # This is an example of a Ganglia Meta Daemon configuration file 2 | # http://ganglia.sourceforge.net/ 3 | # 4 | # 5 | # Setting the debug_level above zero will make gmetad output 6 | # debugging information and stay in the foreground 7 | # default: 0 8 | # debug_level 10 9 | # 10 | # The data_source tag must immediately be followed by a unique 11 | # string which identifies the source then a list of machines 12 | # which service the data source in the format ip:port, or name:port. 13 | # If a # port is not specified then 8649 (the default gmond port) is 14 | # assumed. 15 | # default: There is no default value 16 | data_source "this host" localhost 17 | # data_source "my box" localhost my.machine.edu:8655 1.2.3.5:8655 18 | # data_source "another source" 1.3.4.7:8655 1.3.4.8 19 | # 20 | # List of machines this gmetad will share XML with 21 | # default: There is no default value 22 | trusted_hosts 127.0.0.1 23 | # 24 | # If you don't want gmetad to setuid then set this to off 25 | # default: on 26 | # setuid off 27 | # 28 | # User gmetad will setuid to (defaults to "nobody") 29 | # default: "nobody" 30 | setuid_username "ganglia" 31 | # 32 | # The port gmetad will answer requests for XML 33 | # default: 8651 34 | # xml_port 8651 35 | # 36 | # The number of threads answering XML requests 37 | # default: 2 38 | # server_threads 4 39 | # 40 | # Where gmetad stores its round-robin databases 41 | # default: "/var/lib/ganglia/rrds" 42 | # rrd_rootdir "/some/other/place" 43 | -------------------------------------------------------------------------------- /gmond/python_modules/conf.d/spfexample.pyconf.disabled: -------------------------------------------------------------------------------- 1 | #/* This configuration file configures the spoof example 2 | # module. This example module can be used to test the 3 | # modular spoofing functionality or it can be used 4 | # as an example to write your own spoof module. */ 5 | modules { 6 | module { 7 | name = "spfexample" 8 | language = "python" 9 | enabled = "no" 10 | } 11 | } 12 | 13 | #/* Collection groups for the 14 | # spoof example python module */ 15 | 16 | #/* This metric gathers a simulated 17 | # cpu utilization value */ 18 | collection_group { 19 | collect_every = 10 20 | time_threshold = 50 21 | 22 | metric { 23 | name = "spf_random_cpu_util" 24 | value_threshold = 1.0 25 | title = "Spoofed Random CPU Utilization" 26 | } 27 | } 28 | 29 | #/* This metric spoofs a heartbeat for an 30 | # imaginary box */ 31 | collection_group { 32 | collect_once = yes 33 | time_threshold = 20 34 | 35 | metric { 36 | name = "spf_heartbeat" 37 | title = "Spoofed Heartbeat" 38 | } 39 | } 40 | 41 | #/* These metrics spoof the location, boottime and OS name 42 | # for an imaginary box */ 43 | collection_group { 44 | collect_once = yes 45 | time_threshold = 1200 46 | 47 | metric { 48 | name = "spf_location" 49 | title = "Spoofed Location" 50 | } 51 | metric { 52 | name = "spf_boottime" 53 | title = "Spoofed Boot Time" 54 | } 55 | metric { 56 | name = "spf_osname" 57 | title = "Spoofed OS Name" 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /gmetad-python/setup.py.in: -------------------------------------------------------------------------------- 1 | from distutils.core import setup 2 | from glob import glob 3 | 4 | setup(name='gmetad-python', 5 | version='@VERSION@', 6 | description='Ganglia Meta daemon in Python', 7 | maintainer='Ganglia Development Team', 8 | maintainer_email='ganglia-developers@lists.sourceforge.net', 9 | url='http://ganglia.info', 10 | license='BSD', 11 | long_description= 12 | '''Ganglia is a scalable, real-time monitoring and execution environment 13 | with all execution requests and statistics expressed in an open 14 | well-defined XML format. 15 | 16 | This gmetad daemon aggregates monitoring data from several clusters 17 | to form a monitoring grid. It also keeps metric history using rrdtool. 18 | 19 | gmetad-python is a re-write of the original gmetad code (written in C) 20 | with pluggable interface. The RRD files, both the metric RRDs and summary 21 | RRDs are being written by RRD plugins rather than directly from gmetad. 22 | This provides the ability to plug in new metric storage modules to support 23 | other types of storage mechanisms other than RRD and also the ability to 24 | plug in any type of gmetad-level analysis.''', 25 | platforms='Many', 26 | packages=['Gmetad'], 27 | scripts=['gmetad.py'], 28 | data_files=[('@gsysconfdir@', ['gmetad-python.conf']), 29 | ('@libdir@/ganglia/python_modules/gmetad', glob('plugins/*.py')), 30 | ('@systemdsystemunitdir@', ['gmetad-python.service']), 31 | ] 32 | ) 33 | -------------------------------------------------------------------------------- /debian/po/templates.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: PACKAGE VERSION\n" 10 | "Report-Msgid-Bugs-To: ganglia@packages.debian.org\n" 11 | "POT-Creation-Date: 2009-07-29 20:19+0100\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=CHARSET\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | 19 | #. Type: boolean 20 | #. Description 21 | #: ../ganglia-webfrontend.templates:2001 22 | msgid "Automatically configure apache2?" 23 | msgstr "" 24 | 25 | #. Type: boolean 26 | #. Description 27 | #: ../ganglia-webfrontend.templates:2001 28 | msgid "" 29 | "The ganglia front-end will be unavailable until a web server is configured. " 30 | "Automatic configuration can be performed for the Apache 2 web server." 31 | msgstr "" 32 | 33 | #. Type: boolean 34 | #. Description 35 | #: ../ganglia-webfrontend.templates:3001 36 | msgid "Restart apache2?" 37 | msgstr "" 38 | 39 | #. Type: boolean 40 | #. Description 41 | #: ../ganglia-webfrontend.templates:3001 42 | msgid "" 43 | "In order to activate the new configuration, the web server needs to be " 44 | "restarted. If you choose not to do this automatically, you should do so " 45 | "manually at the first opportunity." 46 | msgstr "" 47 | -------------------------------------------------------------------------------- /lib/update_pidfile.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file update_pidfile.c Functions for standalone daemons 3 | */ 4 | #define _XOPEN_SOURCE 500 /* for getpgid */ 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include "update_pidfile.h" 14 | 15 | /** 16 | * @fn void update_pidfile (const char *pname) 17 | * @param argv0 name of this program 18 | */ 19 | void 20 | update_pidfile (char *pidfile) 21 | { 22 | long p; 23 | pid_t pid; 24 | mode_t prev_umask; 25 | FILE *file; 26 | 27 | /* make sure this program isn't already running. */ 28 | file = fopen (pidfile, "r"); 29 | if (file) 30 | { 31 | if (fscanf(file, "%ld", &p) == 1 && (pid = p) && 32 | (getpgid (pid) > -1)) 33 | { 34 | if (pid != getpid()) 35 | { 36 | err_msg("daemon already running: %s pid %ld\n", pidfile, p); 37 | exit (1); 38 | } 39 | else 40 | { 41 | /* We have the same PID so were probably HUP'd */ 42 | return; 43 | } 44 | } 45 | fclose (file); 46 | } 47 | 48 | /* write the pid of this process to the pidfile */ 49 | prev_umask = umask (0112); 50 | unlink(pidfile); 51 | 52 | file = fopen (pidfile, "w"); 53 | if (!file) 54 | { 55 | err_msg("Error writing pidfile '%s' -- %s\n", 56 | pidfile, strerror (errno)); 57 | exit (1); 58 | } 59 | fprintf (file, "%ld\n", (long) getpid()); 60 | fclose (file); 61 | umask (prev_umask); 62 | } 63 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | Copyright (c) 2001-2011, The Regents of the University of California 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | * Redistributions of source code must retain the above copyright 7 | notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | * Neither the name of the University of California nor the 12 | names of its contributors may be used to endorse or promote products 13 | derived from this software without specific prior written permission. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE FOR ANY 19 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /gmond/python_modules/ssl/entropy.py: -------------------------------------------------------------------------------- 1 | # This module allows you to collect available entropy on your system. Why is 2 | # entropy important. 3 | # [http://www.chrissearle.org/node/326] 4 | # There are two random number sources on linux - /dev/random and /dev/urandom. 5 | # /dev/random will block if there is nothing left in the entropy bit bucket. 6 | # /dev/urandom uses the same bucket - but will not block 7 | # (it can reuse the pool of bits). 8 | # Therefore if you are running SSL on the box you want to know this. 9 | 10 | import sys 11 | 12 | 13 | entropy_file = "/proc/sys/kernel/random/entropy_avail" 14 | 15 | 16 | def metrics_handler(name): 17 | try: 18 | f = open(entropy_file, 'r') 19 | 20 | except IOError: 21 | return 0 22 | 23 | for l in f: 24 | line = l 25 | 26 | return int(line) 27 | 28 | 29 | def metric_init(params): 30 | global descriptors, node_id 31 | 32 | dict = {'name': 'entropy_avail', 33 | 'call_back': metrics_handler, 34 | 'time_max': 90, 35 | 'value_type': 'uint', 36 | 'units': 'bits', 37 | 'slope': 'both', 38 | 'format': '%u', 39 | 'description': 'Entropy Available', 40 | 'groups': 'ssl'} 41 | 42 | descriptors = [dict] 43 | 44 | return descriptors 45 | 46 | 47 | def metric_cleanup(): 48 | '''Clean up the metric module.''' 49 | pass 50 | 51 | #This code is for debugging and unit testing 52 | if __name__ == '__main__': 53 | metric_init({}) 54 | for d in descriptors: 55 | v = d['call_back'](d['name']) 56 | print 'value for %s is %u' % (d['name'], v) 57 | -------------------------------------------------------------------------------- /scripts/package-ganglia-release: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # $Author$ 4 | # 5 | 6 | TAG=$1 7 | CURDIR="$( pwd )" 8 | 9 | if [ "$TAG" == "" ]; then 10 | echo "syntax: $0 TAG" 11 | exit 12 | fi 13 | 14 | 15 | TMP="/tmp/ganglia-export-$TAG" 16 | 17 | echo "Exporting tag $TAG" 18 | ( \ 19 | rm -rf "${TMP}"; \ 20 | mkdir -p "${TMP}"; \ 21 | cd "${TMP}" ; \ 22 | git clone git://github.com/ganglia/monitor-core.git ; \ 23 | cd monitor-core ; \ 24 | git checkout ${TAG}; \ 25 | git submodule init; \ 26 | git submodule update 27 | ) 28 | #svn export "https://ganglia.svn.sourceforge.net/svnroot/ganglia/tags/${TAG}" "$TMP" 29 | #svn export "https://ganglia.svn.sourceforge.net/svnroot/ganglia/branches/3.2" "$TMP" 30 | #svn export "https://ganglia.svn.sourceforge.net/svnroot/ganglia/trunk" "$TMP" 31 | 32 | ( 33 | cd "$TMP" 34 | ( 35 | cd monitor-core 36 | 37 | # Create all configure scripts, etc 38 | ./bootstrap 39 | 40 | # Cleanup git repo directories after autoconf uses them 41 | rm -Rf .git */.git 42 | 43 | # Create initial ganglia.spec file with RHEL5 defaults 44 | cp ganglia.spec.in ganglia.spec -f 45 | perl -pi -e 's/\@PACKAGE\@/ganglia/g;' ganglia.spec 46 | perl -pi -e "s/\@VERSION\@/${TAG}/g;" ganglia.spec 47 | perl -pi -e 's/\@REL\@/1/g;' ganglia.spec 48 | perl -pi -e 's/\@varstatedir\@/\/var\/lib/g;' ganglia.spec 49 | 50 | # Clean extra stuff 51 | rm -rf autom4te.cache libmetrics/autom4te.cache 52 | ) 53 | mv -v "monitor-core" "ganglia-$TAG" 54 | tar czvf "$CURDIR/ganglia-$TAG.tar.gz" "ganglia-$TAG" 55 | ) 56 | 57 | echo "Built tarball in $CURDIR/ganglia-$TAG.tar.gz" 58 | 59 | rm -Rf "$TMP" 60 | 61 | -------------------------------------------------------------------------------- /libmetrics/COPYING: -------------------------------------------------------------------------------- 1 | Copyright (c) 2001-2011, The Regents of the University of California 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | * Redistributions of source code must retain the above copyright 7 | notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | * Neither the name of the University of California nor the 12 | names of its contributors may be used to endorse or promote products 13 | derived from this software without specific prior written permission. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE FOR ANY 19 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /libmetrics/interface.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "interface.h" 5 | 6 | #ifdef MINGW 7 | int 8 | get_min_mtu( void ) 9 | { 10 | DWORD ret, dwInterface, dwSize = 0; 11 | PMIB_IFTABLE ifTable; 12 | PMIB_IFROW ifRow; 13 | unsigned min_mtu = 0; 14 | 15 | dwSize = sizeof(MIB_IFTABLE); 16 | ifTable = (PMIB_IFTABLE)malloc(dwSize); 17 | while ((ret = GetIfTable(ifTable, &dwSize, 1)) == ERROR_INSUFFICIENT_BUFFER) { 18 | ifTable = (PMIB_IFTABLE)realloc(ifTable, dwSize); 19 | } 20 | 21 | if (ret = NO_ERROR) { 22 | for (dwInterface = 0; dwInterface < (ifTable -> dwNumEntries); dwInterface++) { 23 | ifRow = &(ifTable -> table[dwInterface]); 24 | 25 | if ((ifRow -> dwType != MIB_IF_TYPE_LOOPBACK) && (ifRow -> dwOperStatus ==MIB_IF_OPER_STATUS_OPERATIONAL)) { 26 | if (min_mtu) { 27 | if (ifRow -> dwMtu < min_mtu) { 28 | min_mtu = ifRow -> dwMtu; 29 | } 30 | } else { 31 | min_mtu = ifRow -> dwMtu; 32 | } 33 | } 34 | } 35 | free(ifTable); 36 | } 37 | return min_mtu; 38 | } 39 | #else 40 | int 41 | get_min_mtu( void ) 42 | { 43 | struct ifi_info *info, *n; 44 | unsigned min_mtu_set = 0; 45 | unsigned min_mtu = 0; 46 | 47 | info = Get_ifi_info(AF_INET, 0); 48 | 49 | for(n = info; n; n = n->ifi_next) 50 | { 51 | if(!min_mtu_set) 52 | { 53 | min_mtu = n->ifi_mtu; 54 | min_mtu_set = 1; 55 | } 56 | else if( n->ifi_mtu < min_mtu ) 57 | { 58 | min_mtu = n->ifi_mtu; 59 | } 60 | } 61 | 62 | free_ifi_info(info); 63 | return min_mtu; 64 | } 65 | #endif 66 | -------------------------------------------------------------------------------- /Makefile.WiX: -------------------------------------------------------------------------------- 1 | 2 | # 3 | # Use this file for building a Windows (MSI) package 4 | # after compiling the binaries in Cygwin 5 | # 6 | # The build machine must have WiX 3.0 installed 7 | # 8 | # Use the command: 9 | # 10 | # make -f Makefile.WiX 11 | # 12 | # and gmond.msi will be produced in the project root dir 13 | # 14 | 15 | MSI=gmond 16 | SRCS=WiX/ganglia-gmond.wxs 17 | 18 | WIX_IND= 19 | #WIX_INC=-Ic:\\WiX\\Templates 20 | 21 | OBJS=$(SRCS:.wxs=.wixobj) 22 | CANDLE=candle.exe 23 | LIGHT=light.exe 24 | srcdir?= 25 | VPATH = $(srcdir).:. 26 | RM ?= del 27 | 28 | # Uncomment this if you have a custom action script: 29 | #CUST_VBS=WiX/gen_config.vbs 30 | 31 | # Uncomment these two lines if you want to try Python, although 32 | # more stuff probably needs to be bundled in to make it work: 33 | #PYTHON_DEP= /bin/cygcrypto-0.9.8.dll /bin/cygcurl-4.dll /bin/cygssh2-1.dll \ 34 | # /bin/cygssl-0.9.8.dll /bin/cygz.dll /bin/libpython2.5.dll 35 | 36 | DEPFILES= gmond/gmond.exe \ 37 | WiX/gmond.conf \ 38 | /bin/cygwin1.dll \ 39 | /bin/cygrunsrv.exe \ 40 | $(PYTHON_DEP) $(CUST_VBS) 41 | 42 | VERSION ?= unknown 43 | MSIVERSION ?= 0.0.0.0 44 | 45 | WFLAGS= -dVERSION="$(VERSION)" -dMSIVERSION="$(MSIVERSION)" -dsrcdir="$(srcdir)" $(WIX_INC) -ext WixUtilExtension 46 | 47 | .SUFFIXES: .wxs .wixobj 48 | 49 | all: $(MSI).msi 50 | 51 | $(MSI).msi: $(OBJS) $(DEPFILES) 52 | $(LIGHT) -nologo $(WFLAGS) -out $@ $(OBJS) 53 | 54 | .wxs.wixobj: 55 | $(CANDLE) -nologo $(WFLAGS) -out $@ $^ 56 | 57 | clean: 58 | $(RM) $(MSI).msi $(OBJS) 59 | 60 | install: $(MSI).msi 61 | $(RM) install.log 62 | msiexec -i $(MSI).msi -l*v install.log 63 | 64 | uninstall: 65 | msiexec -x $(MSI).msi 66 | 67 | -------------------------------------------------------------------------------- /gmetad/gmetad.init: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # chkconfig: 2345 20 80 4 | # description: gmetad startup script 5 | # 6 | GMETAD=/usr/sbin/gmetad 7 | 8 | . /etc/rc.d/init.d/functions 9 | 10 | test -f /etc/sysconfig/gmetad && . /etc/sysconfig/gmetad 11 | 12 | export RRDCACHED_ADDRESS 13 | 14 | start() { 15 | [ -x $GMETAD ] || exit 5 16 | [ -f /etc/ganglia/gmetad.conf ] || exit 6 17 | echo -n "Starting GANGLIA gmetad: " 18 | daemon $GMETAD 19 | RETVAL=$? 20 | echo 21 | [ $RETVAL -eq 0 ] && touch /var/lock/subsys/gmetad 22 | return $RETVAL 23 | } 24 | 25 | stop() { 26 | echo -n "Shutting down GANGLIA gmetad: " 27 | killproc $GMETAD 28 | RETVAL=$? 29 | echo 30 | [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/gmetad 31 | return $RETVAL 32 | } 33 | 34 | restart() { 35 | stop 36 | start 37 | } 38 | 39 | reload() { 40 | restart 41 | } 42 | 43 | force_reload() { 44 | restart 45 | } 46 | 47 | rh_status() { 48 | status $GMETAD 49 | } 50 | 51 | rh_status_q() { 52 | rh_status >/dev/null 2>&1 53 | } 54 | 55 | usage() { 56 | echo "Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" 57 | } 58 | 59 | case "$1" in 60 | start) 61 | rh_status_q && exit 0 62 | $1 63 | ;; 64 | stop) 65 | rh_status_q || exit 1 66 | $1 67 | ;; 68 | restart) 69 | $1 70 | ;; 71 | reload) 72 | rh_status_q || exit 7 73 | $1 74 | ;; 75 | force-reload) 76 | force_reload 77 | ;; 78 | status) 79 | rh_status 80 | ;; 81 | condrestart|try-restart) 82 | rh_status_q || exit 0 83 | restart 84 | ;; 85 | usage) 86 | $1 87 | ;; 88 | *) 89 | usage 90 | exit 2 91 | esac 92 | exit $? 93 | -------------------------------------------------------------------------------- /gmond/gmond.init: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # chkconfig: 2345 70 40 4 | # description: gmond startup script 5 | # 6 | GMOND=/usr/sbin/gmond 7 | 8 | # TMPDIR set to SysV IPC ramdrive to avoid include processing failures 9 | TMPDIR=/dev/shm 10 | export TMPDIR 11 | 12 | . /etc/rc.d/init.d/functions 13 | 14 | start() { 15 | [ -x $GMOND ] || exit 5 16 | [ -f /etc/ganglia/gmond.conf ] || exit 6 17 | echo -n "Starting GANGLIA gmond: " 18 | daemon $GMOND 19 | RETVAL=$? 20 | echo 21 | [ $RETVAL -eq 0 ] && touch /var/lock/subsys/gmond 22 | return $RETVAL 23 | } 24 | 25 | stop() { 26 | echo -n "Shutting down GANGLIA gmond: " 27 | killproc gmond 28 | RETVAL=$? 29 | echo 30 | [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/gmond 31 | return $RETVAL 32 | } 33 | 34 | restart() { 35 | stop 36 | start 37 | } 38 | 39 | reload() { 40 | restart 41 | } 42 | 43 | force_reload() { 44 | restart 45 | } 46 | 47 | rh_status() { 48 | status $GMOND 49 | } 50 | 51 | rh_status_q() { 52 | rh_status >/dev/null 2>&1 53 | } 54 | 55 | usage() { 56 | echo "Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" 57 | } 58 | 59 | case "$1" in 60 | start) 61 | rh_status_q && exit 0 62 | $1 63 | ;; 64 | stop) 65 | rh_status_q || exit 1 66 | $1 67 | ;; 68 | restart) 69 | $1 70 | ;; 71 | reload) 72 | rh_status_q || exit 7 73 | $1 74 | ;; 75 | force-reload) 76 | force_reload 77 | ;; 78 | status) 79 | rh_status 80 | ;; 81 | condrestart|try-restart) 82 | rh_status_q || exit 0 83 | restart 84 | ;; 85 | usage) 86 | $1 87 | ;; 88 | *) 89 | usage 90 | exit 2 91 | esac 92 | exit $? 93 | -------------------------------------------------------------------------------- /git2dist.rc: -------------------------------------------------------------------------------- 1 | 2 | # Used to deduce tarball name 3 | PROJECT_NAME=ganglia 4 | 5 | # username is required for ssh access on Sourceforge 6 | # on github, all users are just using the name git 7 | #SF_USER=d_pocock 8 | #SF_PROJECT= 9 | #GIT_REPO=ssh://${USER}@${PROJECT}.git.sourceforge.net/gitroot/${PROJECT}/${PROJECT} 10 | 11 | GITHUB_PROJECT=ganglia 12 | GITHUB_SUBPROJECT=monitor-core 13 | GIT_REPO=git@github.com:${GITHUB_PROJECT}/${GITHUB_SUBPROJECT}.git 14 | 15 | # the branch in the repository where the releases are prepared, 16 | # usually a release branch, possibly master for a small project 17 | #RELEASE_BRANCH=release/3.3 18 | RELEASE_BRANCH=master 19 | 20 | # Should submodules be initialized? 21 | GIT_SUBMODULE_INIT=1 22 | 23 | # Is there a special script to bootstrap? If not, autoreconf is tried 24 | BOOTSTRAP_SCRIPT=bootstrap 25 | 26 | # Any arguments to pass to configure for running make dist? 27 | # may be necessary to ensure that optional modules are included in the dist 28 | # for some large packages 29 | DIST_CONFIGURE_ARGS="--with-perl" 30 | # Any arguments to pass to configure for the tarball torture test phase? 31 | TEST_CONFIGURE_ARGS="" 32 | 33 | TEST_BINARY_IN_SRC="gmond" 34 | TEST_BINARY_IN_TREE="usr/local/sbin" 35 | TEST_BINARY="gmond" 36 | TEST_BINARY_ARGS="-t" 37 | 38 | 39 | WORK_ROOT=/tmp/ganglia-releases 40 | 41 | TAR_DIR=${HOME}/dist 42 | 43 | # automatically tag the release if all tests pass? 44 | AUTO_TAG=0 45 | # automatically push the tag back to the main repository? 46 | AUTO_PUSH=0 47 | 48 | # send an email notification? 49 | MAIL_NOTIFICATION=0 50 | # who to notify when a release is done? 51 | MAIL_RECIPIENT=user@example.org 52 | 53 | CLEANUP_WORK_ROOT=0 54 | 55 | -------------------------------------------------------------------------------- /gmond/modules/conf.d/multicpu.conf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "multicpu_module" 4 | path = "modmulticpu.so" 5 | } 6 | } 7 | 8 | /* Multi CPU DSO metric */ 9 | 10 | /* Additional metrics should be added to the 11 | collection group to represent each CPU 12 | discovered on the system. See available 13 | discovered metrics through ./gmond -m command. */ 14 | 15 | collection_group { 16 | collect_every = 10 17 | time_threshold = 50 18 | 19 | /* If using PCRE, you can enable all metrics for all CPUs by 20 | uncommenting the following metric template */ 21 | /* 22 | metric { 23 | name_match = "multicpu_([a-z]+)([0-9]+)" 24 | value_threshold = 1.0 25 | title = "CPU-\\2 \\1" 26 | } 27 | */ 28 | 29 | /* Manually describe each metric for each core individually 30 | as shown by the following commented example */ 31 | /* 32 | metric { 33 | name = "multicpu_user0" 34 | value_threshold = 1.0 35 | title = "CPU-0 User" 36 | } 37 | metric { 38 | name = "multicpu_nice0" 39 | value_threshold = 1.0 40 | title = "CPU-0 Nice" 41 | } 42 | metric { 43 | name = "multicpu_system0" 44 | value_threshold = 1.0 45 | title = "CPU-0 System" 46 | } 47 | metric { 48 | name = "multicpu_idle0" 49 | value_threshold = 1.0 50 | title = "CPU-0 Idle" 51 | } 52 | metric { 53 | name = "multicpu_wio0" 54 | value_threshold = 1.0 55 | title = "CPU-0 wio" 56 | } 57 | metric { 58 | name = "multicpu_intr0" 59 | value_threshold = 1.0 60 | title = "CPU-0 intr" 61 | } 62 | metric { 63 | name = "multicpu_sintr0" 64 | value_threshold = 1.0 65 | title = "CPU-0 sintr" 66 | } 67 | */ 68 | } 69 | -------------------------------------------------------------------------------- /libmetrics/unpifi.h: -------------------------------------------------------------------------------- 1 | /* Our own header for the programs that need interface configuration info. 2 | Include this file, instead of "unp.h". */ 3 | 4 | #ifndef __unp_ifi_h 5 | #define __unp_ifi_h 6 | 7 | #include 8 | #include 9 | 10 | #ifdef AIX 11 | #ifndef IP_MULTICAST 12 | #define IP_MULTICAST 13 | #endif 14 | #endif 15 | #include 16 | #ifdef AIX 17 | #undef IP_MULTICAST 18 | #endif 19 | 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | 26 | #define min(a,b) ((a) < (b) ? (a) : (b)) 27 | #define max(a,b) ((a) > (b) ? (a) : (b)) 28 | 29 | #define IFI_NAME 16 /* same as IFNAMSIZ in */ 30 | #define IFI_HADDR 8 /* allow for 64-bit EUI-64 in future */ 31 | 32 | struct ifi_info { 33 | char ifi_name[IFI_NAME]; /* interface name, null terminated */ 34 | u_char ifi_haddr[IFI_HADDR]; /* hardware address */ 35 | u_short ifi_hlen; /* #bytes in hardware address: 0, 6, 8 */ 36 | u_int ifi_mtu; 37 | short ifi_flags; /* IFF_xxx constants from */ 38 | short ifi_myflags; /* our own IFI_xxx flags */ 39 | struct sockaddr *ifi_addr; /* primary address */ 40 | struct sockaddr *ifi_brdaddr;/* broadcast address */ 41 | struct sockaddr *ifi_dstaddr;/* destination address */ 42 | struct ifi_info *ifi_next; /* next of these structures */ 43 | }; 44 | 45 | #define IFI_ALIAS 1 /* ifi_addr is an alias */ 46 | 47 | /* function prototypes */ 48 | struct ifi_info *get_ifi_info(int, int); 49 | struct ifi_info *Get_ifi_info(int, int); 50 | void free_ifi_info(struct ifi_info *); 51 | 52 | #endif /* __unp_ifi_h */ 53 | -------------------------------------------------------------------------------- /include/gm_mmn.h: -------------------------------------------------------------------------------- 1 | #ifndef GM_MMN_H 2 | #define GM_MMN_H 3 | 4 | /* 5 | * MODULE_MAGIC_NUMBER_MAJOR 6 | * Major API changes that could cause compatibility problems for older modules 7 | * such as structure size changes. No binary compatibility is possible across 8 | * a change in the major version. 9 | * 10 | * MODULE_MAGIC_NUMBER_MINOR 11 | * Minor API changes that do not cause binary compatibility problems. 12 | * Should be reset to 0 when upgrading MODULE_MAGIC_NUMBER_MAJOR. 13 | * 14 | * See the MODULE_MAGIC_AT_LEAST macro below for an example. 15 | */ 16 | 17 | /* 18 | * 20070222.0 (3.1.0-dev) MODULE_MAGIC_COOKIE set to "GM31" 19 | * 20070918.0 (3.1.0-dev) mmodule_struct change. Pass parameter list 20 | * C interface modules and python modules. Allow 21 | * configuration file access from a C module. 22 | * 20080913.0 (3.2-dev) slurpfile ABI incompatible change in libganglia 23 | */ 24 | 25 | #define MMODULE_MAGIC_COOKIE 0x474D3332UL /* "GM32" */ 26 | 27 | #ifndef MMODULE_MAGIC_NUMBER_MAJOR 28 | #define MMODULE_MAGIC_NUMBER_MAJOR 20080913 29 | #endif 30 | #define MMODULE_MAGIC_NUMBER_MINOR 0 /* 0...n */ 31 | 32 | /** 33 | * Determine if the current MMODULE_MAGIC_NUMBER is at least a 34 | * specified value. 35 | * @param major The major module magic number 36 | * @param minor The minor module magic number 37 | * @deffunc GM_MODULE_MAGIC_AT_LEAST(int major, int minor) 38 | */ 39 | #define GM_MODULE_MAGIC_AT_LEAST(major,minor) \ 40 | ((major) < MMODULE_MAGIC_NUMBER_MAJOR \ 41 | || ((major) == MMODULE_MAGIC_NUMBER_MAJOR \ 42 | && (minor) <= MMODULE_MAGIC_NUMBER_MINOR)) 43 | 44 | #endif /* !GM_MMN_H */ 45 | /** @} */ 46 | -------------------------------------------------------------------------------- /gmond/modules/system/mod_proc.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | mmodule proc_module; 5 | 6 | 7 | static int proc_metric_init ( apr_pool_t *p ) 8 | { 9 | int i; 10 | 11 | libmetrics_init(); 12 | 13 | for (i = 0; proc_module.metrics_info[i].name != NULL; i++) { 14 | /* Initialize the metadata storage for each of the metrics and then 15 | * store one or more key/value pairs. The define MGROUPS defines 16 | * the key for the grouping attribute. */ 17 | MMETRIC_INIT_METADATA(&(proc_module.metrics_info[i]),p); 18 | MMETRIC_ADD_METADATA(&(proc_module.metrics_info[i]),MGROUP,"process"); 19 | } 20 | 21 | return 0; 22 | } 23 | 24 | static void proc_metric_cleanup ( void ) 25 | { 26 | } 27 | 28 | static g_val_t proc_metric_handler ( int metric_index ) 29 | { 30 | g_val_t val; 31 | 32 | /* The metric_index corresponds to the order in which 33 | the metrics appear in the metric_info array 34 | */ 35 | switch (metric_index) { 36 | case 0: 37 | return proc_run_func(); 38 | case 1: 39 | return proc_total_func(); 40 | } 41 | 42 | /* default case */ 43 | val.uint32 = 0; 44 | return val; 45 | } 46 | 47 | static Ganglia_25metric proc_metric_info[] = 48 | { 49 | {0, "proc_run", 950, GANGLIA_VALUE_UNSIGNED_INT, " ", "both", "%u", UDP_HEADER_SIZE+8, "Total number of running processes"}, 50 | {0, "proc_total", 950, GANGLIA_VALUE_UNSIGNED_INT, " ", "both", "%u", UDP_HEADER_SIZE+8, "Total number of processes"}, 51 | {0, NULL} 52 | 53 | }; 54 | 55 | mmodule proc_module = 56 | { 57 | STD_MMODULE_STUFF, 58 | proc_metric_init, 59 | proc_metric_cleanup, 60 | proc_metric_info, 61 | proc_metric_handler, 62 | }; 63 | 64 | -------------------------------------------------------------------------------- /gmond/modules/perl/README.in: -------------------------------------------------------------------------------- 1 | This document is Work In Progress until mod_perl is fully implemented and tested. 2 | For now, please refer to the README in gmond/modules/python for basic setup/configuration 3 | instructions as the Perl DSO implementation is very close to the Python one. 4 | 5 | Quickstart 6 | - Build Ganglia with mod_perl support (it will be automatically built if /usr/bin/perl 7 | is found) 8 | - Copy Perl metric modules to /usr/lib/ganglia/perl_modules 9 | (eg. gmond/perl_modules/example/example.pl) 10 | - Copy Perl metric module configurations to /etc/ganglia/conf.d 11 | (eg. gmond/perl_modules/conf.d/example.plconf) 12 | - Start gmond 13 | 14 | Major differences between Python and Perl DSO: 15 | - Instead of a .py suffix, Perl modules are identified by .pl suffix 16 | - Similarly, instead of .pyconf suffix, Perl module configurations are identified by 17 | .plconf suffix 18 | - In Python DSO, the callback is an actual function, for Perl DSO, it is simply 19 | the name of the callback function 20 | - Perl does not seem to differentiate between double and float 21 | - In order to load Perl global variables into C, the entire script needs to be loaded 22 | and interperted. Since Perl cannot do if __name__ == '__main__', debugging code 23 | that prints to stdout will also be executed when the module is loaded by gmond. 24 | The current workaround is simply pipe all stdout of the script to /dev/null 25 | 26 | Known Issues: 27 | - Currently you cannot load more than one Perl metric module at a time. Loading 28 | multiple modules with different callback function names may lead to gmond crashing 29 | since it cannot find the correct handler function (issue with namespace perhaps) 30 | - perl_metric_cleanup() function has not yet been fully implemented 31 | -------------------------------------------------------------------------------- /debian/po/ja.po: -------------------------------------------------------------------------------- 1 | # Japanese translation of ganglia debconf templates. 2 | # Copyright (C) 2009 Hideki Yamane 3 | # This file is distributed under the same license as the dtc package. 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: ganglia 3.1.2-3\n" 8 | "Report-Msgid-Bugs-To: ganglia@packages.debian.org\n" 9 | "POT-Creation-Date: 2009-07-29 20:19+0100\n" 10 | "PO-Revision-Date: 2009-10-07 06:52+0900\n" 11 | "Last-Translator: Hideki Yamane (Debian-JP) \n" 12 | "Language-Team: Japanese \n" 13 | "Language: ja\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | 18 | #. Type: boolean 19 | #. Description 20 | #: ../ganglia-webfrontend.templates:2001 21 | msgid "Automatically configure apache2?" 22 | msgstr "apache2 を自動的に再設定しますか?" 23 | 24 | #. Type: boolean 25 | #. Description 26 | #: ../ganglia-webfrontend.templates:2001 27 | msgid "" 28 | "The ganglia front-end will be unavailable until a web server is configured. " 29 | "Automatic configuration can be performed for the Apache 2 web server." 30 | msgstr "" 31 | "ウェブサーバが設定されるまで、ganglia のフロントエンドは利用できません。" 32 | "Apache2 ウェブサーバは自動的に設定できます。" 33 | 34 | #. Type: boolean 35 | #. Description 36 | #: ../ganglia-webfrontend.templates:3001 37 | msgid "Restart apache2?" 38 | msgstr "apache2 を再起動しますか?" 39 | 40 | #. Type: boolean 41 | #. Description 42 | #: ../ganglia-webfrontend.templates:3001 43 | msgid "" 44 | "In order to activate the new configuration, the web server needs to be " 45 | "restarted. If you choose not to do this automatically, you should do so " 46 | "manually at the first opportunity." 47 | msgstr "" 48 | "新しい設定を有効にするため、ウェブサーバを再起動する必要があります。自動的に" 49 | "再起動を行いたくない場合は、作業可能になった際に手動で行う必要があります。" 50 | -------------------------------------------------------------------------------- /gmond/python_modules/conf.d/netstats.pyconf: -------------------------------------------------------------------------------- 1 | ####################################################################### 2 | # Use this config only if you interested in few metrics instead of 3 | # the 100 or so metrics possible 4 | ####################################################################### 5 | 6 | modules { 7 | module { 8 | name = "netstats" 9 | language = "python" 10 | } 11 | } 12 | 13 | collection_group { 14 | collect_every = 15 15 | time_threshold = 45 16 | 17 | metric { 18 | name = "tcpext_tcploss_percentage" 19 | title = "TCP loss percentage" 20 | value_threshold = 1.0 21 | } 22 | metric { 23 | name = "tcp_retrans_percentage" 24 | title = "TCP retransmit percentage" 25 | value_threshold = 1.0 26 | } 27 | metric { 28 | name = "tcp_outsegs" 29 | title = "TCP segments sent" 30 | value_threshold = 1.0 31 | } 32 | metric { 33 | name = "tcp_insegs" 34 | title = "TCP segments received" 35 | value_threshold = 1.0 36 | } 37 | metric { 38 | name = "udp_indatagrams" 39 | title = "UDP packets in" 40 | value_threshold = 1.0 41 | } 42 | metric { 43 | name = "udp_outdatagrams" 44 | title = "UDP packets out" 45 | value_threshold = 1.0 46 | } 47 | metric { 48 | name = "udp_inerrors" 49 | title = "UDP packet receive errors" 50 | value_threshold = 1.0 51 | } 52 | /* 53 | metric { 54 | name = "udp_rcvbuferrors" 55 | title = "UDP Receive buffer errors" 56 | value_threshold = 1.0 57 | } 58 | */ 59 | metric { 60 | name = "tcpext_listendrops" 61 | title = "SYNs sent to LISTENing sockets ignored" 62 | value_threshold = 1.0 63 | } 64 | metric { 65 | name = "tcp_attemptfails" 66 | title = "TCP Failed connection attempts" 67 | value_threshold = 1.0 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /tests/xdrclient.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | #include "gm_protocol.h" 8 | 9 | #define MAXMSGLEN 1500 10 | 11 | int main( void ) 12 | { 13 | XDR x; 14 | gangliaMessage message; 15 | int i, rval, encoded; 16 | char sendbuf[MAXMSGLEN]; 17 | 18 | gangliaMetricGroup group; 19 | gangliaNamedValue_1 values[20]; 20 | 21 | /* Create a message to send */ 22 | memset(&message, 0, sizeof(gangliaMessage)); 23 | message.format = GANGLIA_SIMPLE_METRIC; 24 | message.name = strdup("cpu_num"); 25 | 26 | /* Setup the info about the group */ 27 | group.collected = time(NULL); 28 | group.tn = 1; 29 | group.tmax = 20; 30 | group.dmax = 100; 31 | group.slope = GANGLIA_SLOPE_ZERO_1; 32 | group.quality = GANGLIA_QUALITY_NORMAL_1; 33 | 34 | #define NUM_VALUES 10 35 | group.data.data_len = NUM_VALUES; 36 | group.data.data_val = values; 37 | for(i=0; i 2 | #include 3 | 4 | mmodule load_module; 5 | 6 | 7 | static int load_metric_init ( apr_pool_t *p ) 8 | { 9 | int i; 10 | 11 | libmetrics_init(); 12 | 13 | for (i = 0; load_module.metrics_info[i].name != NULL; i++) { 14 | /* Initialize the metadata storage for each of the metrics and then 15 | * store one or more key/value pairs. The define MGROUPS defines 16 | * the key for the grouping attribute. */ 17 | MMETRIC_INIT_METADATA(&(load_module.metrics_info[i]),p); 18 | MMETRIC_ADD_METADATA(&(load_module.metrics_info[i]),MGROUP,"load"); 19 | } 20 | 21 | return 0; 22 | } 23 | 24 | static void load_metric_cleanup ( void ) 25 | { 26 | } 27 | 28 | static g_val_t load_metric_handler ( int metric_index ) 29 | { 30 | g_val_t val; 31 | 32 | /* The metric_index corresponds to the order in which 33 | the metrics appear in the metric_info array 34 | */ 35 | switch (metric_index) { 36 | case 0: 37 | return load_one_func(); 38 | case 1: 39 | return load_five_func(); 40 | case 2: 41 | return load_fifteen_func(); 42 | } 43 | 44 | /* default case */ 45 | val.f = 0; 46 | return val; 47 | } 48 | 49 | static Ganglia_25metric load_metric_info[] = 50 | { 51 | {0, "load_one", 70, GANGLIA_VALUE_FLOAT, " ", "both", "%.2f", UDP_HEADER_SIZE+8, "One minute load average"}, 52 | {0, "load_five", 325, GANGLIA_VALUE_FLOAT, " ", "both", "%.2f", UDP_HEADER_SIZE+8, "Five minute load average"}, 53 | {0, "load_fifteen", 950, GANGLIA_VALUE_FLOAT, " ", "both", "%.2f", UDP_HEADER_SIZE+8, "Fifteen minute load average"}, 54 | {0, NULL} 55 | }; 56 | 57 | mmodule load_module = 58 | { 59 | STD_MMODULE_STUFF, 60 | load_metric_init, 61 | load_metric_cleanup, 62 | load_metric_info, 63 | load_metric_handler, 64 | }; 65 | 66 | -------------------------------------------------------------------------------- /debian/po/et.po: -------------------------------------------------------------------------------- 1 | # Gangila Estonian translation 2 | # 3 | # Copyright (C) 2009 4 | # This file is distributed under the same license as the gangila package. 5 | # Mattias Põldaru , 2009. 6 | # 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: gangila\n" 10 | "Report-Msgid-Bugs-To: ganglia@packages.debian.org\n" 11 | "POT-Creation-Date: 2009-07-29 20:19+0100\n" 12 | "PO-Revision-Date: 2009-08-06 23:55+0300\n" 13 | "Last-Translator: Mattias Põldaru \n" 14 | "Language-Team: Gnome Estonian Translation Team \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=utf-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | 20 | #. Type: boolean 21 | #. Description 22 | #: ../ganglia-webfrontend.templates:2001 23 | msgid "Automatically configure apache2?" 24 | msgstr "Kas automaatselt seadistada apache2?" 25 | 26 | #. Type: boolean 27 | #. Description 28 | #: ../ganglia-webfrontend.templates:2001 29 | msgid "" 30 | "The ganglia front-end will be unavailable until a web server is configured. " 31 | "Automatic configuration can be performed for the Apache 2 web server." 32 | msgstr "" 33 | "Gangila kasutajaliides pole saadaval kuni veebiserver on häälestatud. Apache " 34 | "2 veebiserveri jaoks saab teha automaatse häälestuse." 35 | 36 | #. Type: boolean 37 | #. Description 38 | #: ../ganglia-webfrontend.templates:3001 39 | msgid "Restart apache2?" 40 | msgstr "Kas taaskäivitada apache2?" 41 | 42 | #. Type: boolean 43 | #. Description 44 | #: ../ganglia-webfrontend.templates:3001 45 | msgid "" 46 | "In order to activate the new configuration, the web server needs to be " 47 | "restarted. If you choose not to do this automatically, you should do so " 48 | "manually at the first opportunity." 49 | msgstr "" 50 | "Uue häälestuse rakendamiseks tuleb veebiserver taaskäivitada. Kui sa seda " 51 | "automaatselt ei soovi teha, peaksid esimesel võimalusel veebiserveri käsitsi " 52 | "taaskäivitama." 53 | -------------------------------------------------------------------------------- /debian/po/vi.po: -------------------------------------------------------------------------------- 1 | # Vietnamese translation for Ganglia. 2 | # Copyright © 2009 Free Software Foundation, Inc. 3 | # Clytie Siddall , 2009. 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: ganglia 3.1.2-3\n" 8 | "Report-Msgid-Bugs-To: ganglia@packages.debian.org\n" 9 | "POT-Creation-Date: 2009-07-29 20:19+0100\n" 10 | "PO-Revision-Date: 2009-09-22 23:55+0930\n" 11 | "Last-Translator: Clytie Siddall \n" 12 | "Language-Team: Vietnamese \n" 13 | "Language: vi\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "Plural-Forms: nplurals=1; plural=0;\n" 18 | "X-Generator: LocFactoryEditor 1.8\n" 19 | 20 | #. Type: boolean 21 | #. Description 22 | #: ../ganglia-webfrontend.templates:2001 23 | msgid "Automatically configure apache2?" 24 | msgstr "Tự động cấu hình apache2 ?" 25 | 26 | #. Type: boolean 27 | #. Description 28 | #: ../ganglia-webfrontend.templates:2001 29 | msgid "" 30 | "The ganglia front-end will be unavailable until a web server is configured. " 31 | "Automatic configuration can be performed for the Apache 2 web server." 32 | msgstr "" 33 | "Giao diện ganglia vẫn còn không sẵn sàng dùng đến khi một trình phục vụ Web " 34 | "được cấu hình. Có khả năng tự động cấu hình trình phục vụ Web Apache 2." 35 | 36 | #. Type: boolean 37 | #. Description 38 | #: ../ganglia-webfrontend.templates:3001 39 | msgid "Restart apache2?" 40 | msgstr "Khởi chạy lại apache2 ?" 41 | 42 | #. Type: boolean 43 | #. Description 44 | #: ../ganglia-webfrontend.templates:3001 45 | msgid "" 46 | "In order to activate the new configuration, the web server needs to be " 47 | "restarted. If you choose not to do this automatically, you should do so " 48 | "manually at the first opportunity." 49 | msgstr "" 50 | "Để kích hoạt cấu hình mới, trình phục vụ Web cần được khởi chạy lại. Nếu bạn " 51 | "không chọn tự động làm việc này, có nên tự làm đó vào lúc sớm nhất." 52 | -------------------------------------------------------------------------------- /gmond/core_metrics.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | mmodule core_metrics; 5 | 6 | /* 7 | ** A helper function to determine the number of cpustates in /proc/stat (MKN) 8 | */ 9 | 10 | static int core_metrics_init ( apr_pool_t *p ) 11 | { 12 | int i; 13 | 14 | for (i = 0; core_metrics.metrics_info[i].name != NULL; i++) { 15 | /* Initialize the metadata storage for each of the metrics and then 16 | * store one or more key/value pairs. The define MGROUPS defines 17 | * the key for the grouping attribute. */ 18 | MMETRIC_INIT_METADATA(&(core_metrics.metrics_info[i]),p); 19 | MMETRIC_ADD_METADATA(&(core_metrics.metrics_info[i]),MGROUP,"core"); 20 | } 21 | 22 | return 0; 23 | } 24 | 25 | static void core_metrics_cleanup ( void ) 26 | { 27 | } 28 | 29 | static g_val_t core_metrics_handler ( int metric_index ) 30 | { 31 | g_val_t val; 32 | 33 | /* The metric_index corresponds to the order in which 34 | the metrics appear in the metric_info array 35 | */ 36 | switch (metric_index) { 37 | case 0: 38 | return gexec_func(); 39 | case 1: 40 | return heartbeat_func(); 41 | case 2: 42 | return location_func(); 43 | } 44 | 45 | /* default case */ 46 | val.int32 = 0; 47 | return val; 48 | } 49 | 50 | static Ganglia_25metric core_metrics_info[] = 51 | { 52 | {0, "gexec", 300, GANGLIA_VALUE_STRING, "", "zero", "%s", UDP_HEADER_SIZE+32, "gexec available"}, 53 | {0, "heartbeat", 20, GANGLIA_VALUE_UNSIGNED_INT, "", "", "%u", UDP_HEADER_SIZE+8, "Last heartbeat"}, 54 | {0, "location", 1200, GANGLIA_VALUE_STRING, "(x,y,z)", "", "%s", UDP_HEADER_SIZE+12, "Location of the machine"}, 55 | {0, NULL} 56 | }; 57 | 58 | mmodule core_metrics = 59 | { 60 | STD_MMODULE_STUFF, 61 | core_metrics_init, 62 | core_metrics_cleanup, 63 | core_metrics_info, 64 | core_metrics_handler, 65 | }; 66 | 67 | -------------------------------------------------------------------------------- /gmond/python_modules/conf.d/multi_interface.pyconf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "multi_interface" 4 | language = "python" 5 | 6 | # Leaving the interfaces value empty will result in all interfaces being 7 | # used ie. anything you can see in /proc/net/dev. If you only want to 8 | # monitor specific ones change value to space delimited list of 9 | # network interfaces e.g. value = "eth0 eth1 bond0" 10 | param interfaces { 11 | value = "" 12 | } 13 | 14 | # If set to true interfaces that are indicated above will be summed 15 | # to produce bytes_out, bytes_in, pkts_out and pkts_in values 16 | # This may be useful in situations where you don't care about internal 17 | # interfaces ie. if machine is dual homed and really care about 18 | # traffic going only externally 19 | param send_aggregate_bytes_packets { 20 | value = False 21 | } 22 | 23 | # Alternatively leave the interfaces list at value = "" then exclude 24 | # specific interfaces by name or regular expression e.g. dummy, lo, eth[0-9]+ etc. 25 | param excluded_interfaces { 26 | value = "lo vnet[0-9]+" 27 | } 28 | } 29 | } 30 | 31 | collection_group { 32 | collect_every = 15 33 | time_threshold = 45 34 | 35 | metric { 36 | name_match = "rx_(.+)" 37 | value_threshold = 1.0 38 | } 39 | metric { 40 | name_match = "tx_(.+)" 41 | value_threshold = 1.0 42 | } 43 | 44 | # Uncomment only if param send_aggregate_bytes_packets set to True 45 | # metric { 46 | # name = "bytes_out" 47 | # value_threshold = 4096 48 | # title = "Bytes Sent" 49 | # } 50 | # metric { 51 | # name = "bytes_in" 52 | # value_threshold = 4096 53 | # title = "Bytes Received" 54 | # } 55 | # metric { 56 | # name = "pkts_in" 57 | # value_threshold = 256 58 | # title = "Packets Received" 59 | # } 60 | # metric { 61 | # name = "pkts_out" 62 | # value_threshold = 256 63 | # title = "Packets Sent" 64 | # } 65 | } 66 | -------------------------------------------------------------------------------- /debian/po/fi.po: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2009 2 | # This file is distributed under the same license as the ganglia package. 3 | # 4 | # Esko Arajärvi , 2009. 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: ganglia\n" 8 | "Report-Msgid-Bugs-To: ganglia@packages.debian.org\n" 9 | "POT-Creation-Date: 2009-07-29 20:19+0100\n" 10 | "PO-Revision-Date: 2009-07-30 20:28+0300\n" 11 | "Last-Translator: Esko Arajärvi \n" 12 | "Language-Team: Finnish \n" 13 | "Language: fi\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "X-Generator: Lokalize 0.3\n" 18 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 19 | 20 | #. Type: boolean 21 | #. Description 22 | #: ../ganglia-webfrontend.templates:2001 23 | msgid "Automatically configure apache2?" 24 | msgstr "Tehdäänkö apache2:n asetukset automaattisesti?" 25 | 26 | #. Type: boolean 27 | #. Description 28 | #: ../ganglia-webfrontend.templates:2001 29 | msgid "" 30 | "The ganglia front-end will be unavailable until a web server is configured. " 31 | "Automatic configuration can be performed for the Apache 2 web server." 32 | msgstr "" 33 | "ganglia-käyttöliittymää ei voi käyttää ennen kuin verkkopalvelimen asetukset " 34 | "on tehty. Apache 2 -verkkopalvelimen asetukset voidaan tehdä automaattisesti." 35 | 36 | #. Type: boolean 37 | #. Description 38 | #: ../ganglia-webfrontend.templates:3001 39 | msgid "Restart apache2?" 40 | msgstr "Käynnistetäänkö apache2 uudelleen?" 41 | 42 | #. Type: boolean 43 | #. Description 44 | #: ../ganglia-webfrontend.templates:3001 45 | msgid "" 46 | "In order to activate the new configuration, the web server needs to be " 47 | "restarted. If you choose not to do this automatically, you should do so " 48 | "manually at the first opportunity." 49 | msgstr "" 50 | "Verkkopalvelin täytyy käynnistää uudelleen uusien asetusten ottamiseksi " 51 | "käyttöön. Jos et halua tehdä tätä automaattisesti, tee se käsin " 52 | "mahdollisimman pian." 53 | -------------------------------------------------------------------------------- /debian/po/gl.po: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2009 Debian 2 | # This file is distributed under the same license as the ganglia package. 3 | # 4 | # Marce Villarino , 2009. 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: \n" 8 | "Report-Msgid-Bugs-To: ganglia@packages.debian.org\n" 9 | "POT-Creation-Date: 2009-07-29 20:19+0100\n" 10 | "PO-Revision-Date: 2009-11-09 20:30+0100\n" 11 | "Last-Translator: Marce Villarino \n" 12 | "Language-Team: Galician \n" 13 | "Language: gl\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "X-Generator: Lokalize 1.0\n" 18 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 19 | 20 | #. Type: boolean 21 | #. Description 22 | #: ../ganglia-webfrontend.templates:2001 23 | msgid "Automatically configure apache2?" 24 | msgstr "Desexa configurar automaticamente apache2?" 25 | 26 | #. Type: boolean 27 | #. Description 28 | #: ../ganglia-webfrontend.templates:2001 29 | msgid "" 30 | "The ganglia front-end will be unavailable until a web server is configured. " 31 | "Automatic configuration can be performed for the Apache 2 web server." 32 | msgstr "" 33 | "A interface de ganglia non estará dispoñíbel até que se configure un " 34 | "servidor web. Pode facerse unha configuración automática para o servidor web " 35 | "Apache 2." 36 | 37 | #. Type: boolean 38 | #. Description 39 | #: ../ganglia-webfrontend.templates:3001 40 | msgid "Restart apache2?" 41 | msgstr "Desexa reiniciar apache2?" 42 | 43 | #. Type: boolean 44 | #. Description 45 | #: ../ganglia-webfrontend.templates:3001 46 | msgid "" 47 | "In order to activate the new configuration, the web server needs to be " 48 | "restarted. If you choose not to do this automatically, you should do so " 49 | "manually at the first opportunity." 50 | msgstr "" 51 | "Para activar a nova configuración precísase reiniciar o servidor web. Se " 52 | "escolle non facelo automaticamente debería facelo á mao á primeira " 53 | "oportunidade." 54 | -------------------------------------------------------------------------------- /debian/po/da.po: -------------------------------------------------------------------------------- 1 | # Danish translation ganglia. 2 | # Copyright (C) 2010 ganglia og nedenstående oversættere. 3 | # This file is distributed under the same license as ganglia package. 4 | # Joe Hansen , 2010. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: ganglia\n" 9 | "Report-Msgid-Bugs-To: ganglia@packages.debian.org\n" 10 | "POT-Creation-Date: 2009-07-29 20:19+0100\n" 11 | "PO-Revision-Date: 2010-11-28 17:30+01:00\n" 12 | "Last-Translator: Joe Hansen \n" 13 | "Language-Team: Danish \n" 14 | "Language: da\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | 19 | #. Type: boolean 20 | #. Description 21 | #: ../ganglia-webfrontend.templates:2001 22 | msgid "Automatically configure apache2?" 23 | msgstr "Konfigurer automatisk apache2?" 24 | 25 | #. Type: boolean 26 | #. Description 27 | #: ../ganglia-webfrontend.templates:2001 28 | msgid "" 29 | "The ganglia front-end will be unavailable until a web server is configured. " 30 | "Automatic configuration can be performed for the Apache 2 web server." 31 | msgstr "" 32 | "Brugergrænsefladen til ganglia vil være utilgængelig indtil en " 33 | "internetserver er konfigureret. Automatisk konfiguration kan udføres for " 34 | "Apache 2-internetserveren." 35 | 36 | #. Type: boolean 37 | #. Description 38 | #: ../ganglia-webfrontend.templates:3001 39 | msgid "Restart apache2?" 40 | msgstr "Genstart apache2?" 41 | 42 | #. Type: boolean 43 | #. Description 44 | #: ../ganglia-webfrontend.templates:3001 45 | msgid "" 46 | "In order to activate the new configuration, the web server needs to be " 47 | "restarted. If you choose not to do this automatically, you should do so " 48 | "manually at the first opportunity." 49 | msgstr "" 50 | "For at aktivere den nye konfiguration, skal internetserveren genstartes. " 51 | "Hvis du vælger ikke at gøre dette automatisk, bør du gøre dette manuelt, ved " 52 | "den første lejlighed som byder sig." 53 | -------------------------------------------------------------------------------- /debian/po/de.po: -------------------------------------------------------------------------------- 1 | # Translation of ganglia debconf templates to German 2 | # Copyright (C) Helge Kreutzmann , 2009. 3 | # This file is distributed under the same license as the ganglia package. 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: ganglia 3.1.2-3\n" 8 | "Report-Msgid-Bugs-To: ganglia@packages.debian.org\n" 9 | "POT-Creation-Date: 2009-07-29 20:19+0100\n" 10 | "PO-Revision-Date: 2009-08-03 17:43+0200\n" 11 | "Last-Translator: Helge Kreutzmann \n" 12 | "Language-Team: de \n" 13 | "Language: \n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | 18 | #. Type: boolean 19 | #. Description 20 | #: ../ganglia-webfrontend.templates:2001 21 | msgid "Automatically configure apache2?" 22 | msgstr "Apache2 automatisch konfigurieren?" 23 | 24 | #. Type: boolean 25 | #. Description 26 | #: ../ganglia-webfrontend.templates:2001 27 | msgid "" 28 | "The ganglia front-end will be unavailable until a web server is configured. " 29 | "Automatic configuration can be performed for the Apache 2 web server." 30 | msgstr "" 31 | "Die Oberfläche von Ganglia ist nicht verfügbar, solange kein Webserver " 32 | "konfiguriert wurde. Der Webserver Apache 2 kann automatisch konfiguriert " 33 | "werden." 34 | 35 | #. Type: boolean 36 | #. Description 37 | #: ../ganglia-webfrontend.templates:3001 38 | msgid "Restart apache2?" 39 | msgstr "Apache2 neustarten?" 40 | 41 | #. Type: boolean 42 | #. Description 43 | #: ../ganglia-webfrontend.templates:3001 44 | msgid "" 45 | "In order to activate the new configuration, the web server needs to be " 46 | "restarted. If you choose not to do this automatically, you should do so " 47 | "manually at the first opportunity." 48 | msgstr "" 49 | "Um die neue Konfiguration zu aktivieren, muss der Webserver neu gestartet " 50 | "werden. Falls Sie dies nicht automatisch durchführen lassen, sollten Sie es " 51 | "bei der nächsten Möglichkeit manuell durchführen." 52 | -------------------------------------------------------------------------------- /lib/llist.h: -------------------------------------------------------------------------------- 1 | /* 2 | * "Copyright (c) 1999 by Brent N. Chun and The Regents of the University 3 | * of California. All rights reserved." 4 | * 5 | * Permission to use, copy, modify, and distribute this software and its 6 | * documentation for any purpose, without fee, and without written agreement is 7 | * hereby granted, provided that the above copyright notice and the following 8 | * two paragraphs appear in all copies of this software. 9 | * 10 | * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR 11 | * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT 12 | * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF 13 | * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 14 | * 15 | * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, 16 | * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 17 | * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS 18 | * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO 19 | * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 20 | */ 21 | #ifndef LLIST_H 22 | #define LLIST_H 1 23 | 24 | /* programmer manages setting/storage for val */ 25 | typedef struct _llist_entry { 26 | struct _llist_entry *prev; /* Previous entry on list */ 27 | struct _llist_entry *next; /* Next entry on list */ 28 | void *val; /* Entry value */ 29 | } llist_entry; 30 | 31 | void llist_add(llist_entry **llist, llist_entry *e); 32 | int llist_strncmp(const char *s1, const char *s2); 33 | int llist_remove(llist_entry **llist, llist_entry *e); 34 | int llist_search(llist_entry **llist, void *val, 35 | int (*compare_function)(const char *,const char *), 36 | llist_entry **e); 37 | int llist_sort(llist_entry *llist, int (*compare_function)(llist_entry *, llist_entry *)); 38 | int llist_print(llist_entry **llist); 39 | #endif /* LLIST_H */ 40 | -------------------------------------------------------------------------------- /debian/po/it.po: -------------------------------------------------------------------------------- 1 | # ITALIAN TRANSLATION FOR GANGLIA'S PO-DEBCONF FILE. 2 | # COPYRIGHT (C) 2009 THE GANGLIA'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the ganglia package. 4 | # 5 | # Vincenzo Campanella , 2009. 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: ganglia 3.1.2-3\n" 9 | "Report-Msgid-Bugs-To: ganglia@packages.debian.org\n" 10 | "POT-Creation-Date: 2009-07-29 20:19+0100\n" 11 | "PO-Revision-Date: 2009-11-13 16:24+0100\n" 12 | "Last-Translator: Vincenzo Campanella \n" 13 | "Language-Team: Italian \n" 14 | "Language: it\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | 19 | #. Type: boolean 20 | #. Description 21 | #: ../ganglia-webfrontend.templates:2001 22 | msgid "Automatically configure apache2?" 23 | msgstr "Configurare apache2 automaticamente?" 24 | 25 | #. Type: boolean 26 | #. Description 27 | #: ../ganglia-webfrontend.templates:2001 28 | msgid "" 29 | "The ganglia front-end will be unavailable until a web server is configured. " 30 | "Automatic configuration can be performed for the Apache 2 web server." 31 | msgstr "" 32 | "L'interfaccia ganglia non sarà disponibile finché non sarà stato configurato " 33 | "un server web. La configurazione automatica può essere eseguita per il " 34 | "server web Apache 2." 35 | 36 | #. Type: boolean 37 | #. Description 38 | #: ../ganglia-webfrontend.templates:3001 39 | msgid "Restart apache2?" 40 | msgstr "Riavviare apache2?" 41 | 42 | #. Type: boolean 43 | #. Description 44 | #: ../ganglia-webfrontend.templates:3001 45 | msgid "" 46 | "In order to activate the new configuration, the web server needs to be " 47 | "restarted. If you choose not to do this automatically, you should do so " 48 | "manually at the first opportunity." 49 | msgstr "" 50 | "Per attivare la nuova configurazione è necessario riavviare il server web. " 51 | "Se non si effettua tale riavvio adesso, lo si dovrebbe fare manualmente alla " 52 | "prima occasione possibile." 53 | -------------------------------------------------------------------------------- /scripts/build-solaris.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # If the code has just been taken from svn, this needs to be run first: 4 | # PATH=/opt/csw/bin:$PATH ./bootstrap 5 | 6 | if [ ! -f configure ]; 7 | then 8 | echo "Please run ./bootstrap first, it will generate configure, e.g." 9 | echo ' PATH=/opt/csw/bin:$PATH ./bootstrap' 10 | exit 1 11 | fi 12 | 13 | # Change these if you have installed them elsewhere 14 | 15 | # APR is provided by CSWapache2rt (apache2rt) 16 | # libConfuse is provided by CSWlibconfuse (libconfuse) 17 | 18 | CSW_HOME=/opt/csw 19 | APR=${CSW_HOME}/bin/apr-1-config 20 | LIBCONFUSE=${CSW_HOME}/apache2 21 | 22 | if [ ! -d ${CSW} ]; 23 | then 24 | echo "Couldn't find ${CSW} - please make sure that" 25 | echo "Blastwave is installed and the path is correct in $0" 26 | exit 1 27 | fi 28 | 29 | if [ ! -x ${APR} ]; 30 | then 31 | echo "Couldn't execute ${APR} - please make sure that" 32 | echo "apr is installed and the path is correct in $0" 33 | exit 1 34 | fi 35 | 36 | if [ ! -d ${LIBCONFUSE} ]; 37 | then 38 | echo "Couldn't find ${LIBCONFUSE} - please make sure that" 39 | echo "confuse is installed and the path is correct in $0" 40 | exit 1 41 | fi 42 | 43 | MAKE=${CSW_HOME}/bin/gmake 44 | 45 | if [ ! -x ${GMAKE} ]; 46 | then 47 | echo "Couldn't execute ${GMAKE} - please make sure that" 48 | echo "gmake is installed and the path is correct in $0" 49 | exit 1 50 | fi 51 | 52 | MINOR=`uname -r | cut -d "." -f 2` 53 | if [ $MINOR -lt 10 ]; 54 | then 55 | echo "C99 not supported for Solaris < 10" 56 | ac_cv_prog_cc_c99=no 57 | export ac_cv_prog_cc_c99 58 | fi 59 | 60 | ./configure \ 61 | --prefix=/usr/local \ 62 | --without-gcc --disable-nls \ 63 | --enable-shared --disable-static --disable-static-build \ 64 | --without-gmetad --disable-python \ 65 | --with-libapr=${APR} --with-libconfuse=${LIBCONFUSE} --with-libexpat=${CSW_HOME} \ 66 | CC=/opt/SUNWspro/bin/cc \ 67 | LD=/usr/ccs/bin/ld \ 68 | MAKE=${MAKE} \ 69 | AR=/usr/ccs/bin/ar \ 70 | LDFLAGS="-R/opt/csw/lib" 71 | 72 | ${MAKE} 73 | 74 | 75 | -------------------------------------------------------------------------------- /debian/po/pt.po: -------------------------------------------------------------------------------- 1 | # translation of ganglia debconf to Portuguese 2 | # Copyright (C) 2009 the ganglia's copyright holder 3 | # This file is distributed under the same license as the ganglia package. 4 | # 5 | # Am??rico Monteiro , 2009. 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: ganglia 3.1.2-3\n" 9 | "Report-Msgid-Bugs-To: ganglia@packages.debian.org\n" 10 | "POT-Creation-Date: 2009-07-29 20:19+0100\n" 11 | "PO-Revision-Date: 2009-07-30 00:45+0100\n" 12 | "Last-Translator: Am??rico Monteiro \n" 13 | "Language-Team: Portuguese \n" 14 | "Language: pt\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | 19 | #. Type: boolean 20 | #. Description 21 | #: ../ganglia-webfrontend.templates:2001 22 | msgid "Automatically configure apache2?" 23 | msgstr "Configurar o apache2 automaticamente?" 24 | 25 | #. Type: boolean 26 | #. Description 27 | #: ../ganglia-webfrontend.templates:2001 28 | msgid "" 29 | "The ganglia front-end will be unavailable until a web server is configured. " 30 | "Automatic configuration can be performed for the Apache 2 web server." 31 | msgstr "" 32 | "O 'front-end' ganglia estar?? indispon??vel at?? que um servidor web esteja " 33 | "configurado. Pode ser realizada uma configura????o autom??tica para o " 34 | "servidor web apache 2." 35 | 36 | #. Type: boolean 37 | #. Description 38 | #: ../ganglia-webfrontend.templates:3001 39 | msgid "Restart apache2?" 40 | msgstr "Reiniciar o apache2?" 41 | 42 | #. Type: boolean 43 | #. Description 44 | #: ../ganglia-webfrontend.templates:3001 45 | msgid "" 46 | "In order to activate the new configuration, the web server needs to be " 47 | "restarted. If you choose not to do this automatically, you should do so " 48 | "manually at the first opportunity." 49 | msgstr "" 50 | "De modo a activar a nova configura????o, o servidor web precisa ser " 51 | "reiniciado. Se voc?? escolher n??o fazer isto automaticamente, dever?? faz??-" 52 | "lo manualmente na primeira oportunidade." 53 | -------------------------------------------------------------------------------- /debian/po/sv.po: -------------------------------------------------------------------------------- 1 | # Translation of ganglia debconf template to Swedish 2 | # Copyright (C) 2009 Martin Bagge 3 | # This file is distributed under the same license as the ganglia package. 4 | # 5 | # Martin Bagge , 2009 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: ganglia\n" 9 | "Report-Msgid-Bugs-To: ganglia@packages.debian.org\n" 10 | "POT-Creation-Date: 2009-07-29 20:19+0100\n" 11 | "PO-Revision-Date: 2009-07-29 22:52+0100\n" 12 | "Last-Translator: Martin Bagge \n" 13 | "Language-Team: Swedish \n" 14 | "Language: sv\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=utf-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "X-Poedit-Language: Swedish\n" 19 | "X-Poedit-Country: Sweden\n" 20 | 21 | #. Type: boolean 22 | #. Description 23 | #: ../ganglia-webfrontend.templates:2001 24 | msgid "Automatically configure apache2?" 25 | msgstr "Ska inställningar för apache2 göras?" 26 | 27 | #. Type: boolean 28 | #. Description 29 | #: ../ganglia-webfrontend.templates:2001 30 | msgid "" 31 | "The ganglia front-end will be unavailable until a web server is configured. " 32 | "Automatic configuration can be performed for the Apache 2 web server." 33 | msgstr "" 34 | "Det finns inget användargränssnitt innan korrekta inställningar för en " 35 | "webbserver gjorts. Detta kan göras automatiskt för webbservern Apache 2." 36 | 37 | #. Type: boolean 38 | #. Description 39 | #: ../ganglia-webfrontend.templates:3001 40 | msgid "Restart apache2?" 41 | msgstr "Starta om apache2?" 42 | 43 | #. Type: boolean 44 | #. Description 45 | #: ../ganglia-webfrontend.templates:3001 46 | msgid "" 47 | "In order to activate the new configuration, the web server needs to be " 48 | "restarted. If you choose not to do this automatically, you should do so " 49 | "manually at the first opportunity." 50 | msgstr "" 51 | "För att aktivera de nya inställningarna måste webbservern startas om. Om du " 52 | "väljer att inte göra detta automatisk måste du göra det manuellt så fort som " 53 | "möjligt." 54 | -------------------------------------------------------------------------------- /gimond/rrd/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | 12 | 13 | RRD Graphs 14 | 15 | 16 | 17 | RRD URL: 18 | 20 | 21 |
22 | 23 | 24 | 25 |
Javascript needed for this page to work
26 | 27 |
28 | 29 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /debian/po/eu.po: -------------------------------------------------------------------------------- 1 | # translation of ganglia-templates.po to Euskara 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # 5 | # Piarres Beobide , 2009. 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: ganglia-templates\n" 9 | "Report-Msgid-Bugs-To: ganglia@packages.debian.org\n" 10 | "POT-Creation-Date: 2009-07-29 20:19+0100\n" 11 | "PO-Revision-Date: 2009-08-04 09:47+0200\n" 12 | "Last-Translator: Piarres Beobide \n" 13 | "Language-Team: Euskara \n" 14 | "Language: \n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "X-Generator: KBabel 1.11.4\n" 19 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 20 | 21 | #. Type: boolean 22 | #. Description 23 | #: ../ganglia-webfrontend.templates:2001 24 | msgid "Automatically configure apache2?" 25 | msgstr "Automatikoki konfiguratu apache2?" 26 | 27 | #. Type: boolean 28 | #. Description 29 | #: ../ganglia-webfrontend.templates:2001 30 | msgid "" 31 | "The ganglia front-end will be unavailable until a web server is configured. " 32 | "Automatic configuration can be performed for the Apache 2 web server." 33 | msgstr "" 34 | "Ganglia interfazea ez da eskuragarri egongo web-zerbitzaria konfiguratzen " 35 | "den arte. Apache2 web-zerbitzariaren konfigurazio automatikoa egin daiteke." 36 | 37 | #. Type: boolean 38 | #. Description 39 | #: ../ganglia-webfrontend.templates:3001 40 | msgid "Restart apache2?" 41 | msgstr "Berrabiarazi apache2?" 42 | 43 | #. Type: boolean 44 | #. Description 45 | #: ../ganglia-webfrontend.templates:3001 46 | msgid "" 47 | "In order to activate the new configuration, the web server needs to be " 48 | "restarted. If you choose not to do this automatically, you should do so " 49 | "manually at the first opportunity." 50 | msgstr "" 51 | "Konfigurazio berriak eragin izan dezan, web-zerbitzaria berrabiarazi egin " 52 | "behar da. Hau automatikoki egitea ala ez hautatu dezakezu baina aukera duzun " 53 | "bezain laster egitea gomendatzen da." 54 | -------------------------------------------------------------------------------- /gmetad-python/Gmetad/gmetad_random.py: -------------------------------------------------------------------------------- 1 | #/******************************************************************************* 2 | #* Portions Copyright (C) 2008 Novell, Inc. All rights reserved. 3 | #* 4 | #* Redistribution and use in source and binary forms, with or without 5 | #* modification, are permitted provided that the following conditions are met: 6 | #* 7 | #* - Redistributions of source code must retain the above copyright notice, 8 | #* this list of conditions and the following disclaimer. 9 | #* 10 | #* - Redistributions in binary form must reproduce the above copyright notice, 11 | #* this list of conditions and the following disclaimer in the documentation 12 | #* and/or other materials provided with the distribution. 13 | #* 14 | #* - Neither the name of Novell, Inc. nor the names of its 15 | #* contributors may be used to endorse or promote products derived from this 16 | #* software without specific prior written permission. 17 | #* 18 | #* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' 19 | #* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | #* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | #* ARE DISCLAIMED. IN NO EVENT SHALL Novell, Inc. OR THE CONTRIBUTORS 22 | #* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 | #* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 | #* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | #* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 | #* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | #* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 | #* POSSIBILITY OF SUCH DAMAGE. 29 | #* 30 | #* Authors: Matt Ryan (mrayn novell.com) 31 | #* Brad Nicholes (bnicholes novell.com) 32 | #******************************************************************************/ 33 | 34 | from random import randrange 35 | 36 | def getRandomInterval(midpoint, range=5): 37 | return randrange(max(midpoint-range,0), midpoint+range) 38 | -------------------------------------------------------------------------------- /gmetad/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | include $(top_srcdir)/ganglia.inc 3 | 4 | if STATIC_BUILD 5 | GCFLAGS = -D_LARGEFILE64_SOURCE 6 | GLDADD = 7 | GLDFLAGS = -static 8 | else 9 | GCFLAGS = -D_LARGEFILE64_SOURCE 10 | GLDADD = 11 | GLDFLAGS = 12 | endif 13 | 14 | INCLUDES = @APR_INCLUDES@ 15 | AM_CFLAGS = -I$(top_srcdir)/lib -I$(top_builddir)/lib -I$(top_srcdir)/gmond -I$(top_srcdir)/libmetrics -I$(top_builddir)/libmetrics -I$(top_builddir)/include $(GCFLAGS) @PROTOBUF_C_CFLAGS@ 16 | 17 | sbin_PROGRAMS = gmetad 18 | 19 | cmdline.c: cmdline.c.in $(FIXCONFIG) 20 | $(FIXCONFIG) $< $@ 21 | 22 | gmetad_SOURCES = gmetad.c cmdline.c.in cmdline.c cmdline.h gmetad.h data_thread.c \ 23 | server.c process_xml.c rrd_helpers.c export_helpers.c conf.c conf.h type_hash.c \ 24 | xml_hash.c cleanup.c rrd_helpers.h export_helpers.h daemon_init.c daemon_init.h \ 25 | server_priv.h 26 | 27 | if BUILD_RIEMANN 28 | gmetad_SOURCES += circuit_breaker.c 29 | nodist_gmetad_SOURCES = riemann.pb-c.h riemann.pb-c.c 30 | endif 31 | 32 | gmetad_LDADD = $(top_builddir)/lib/libganglia.la -lrrd -lm \ 33 | $(top_builddir)/libmetrics/libmetrics.la \ 34 | $(GLDADD) $(DEPS_LIBS) @PROTOBUF_C_LIBS@ 35 | 36 | gmetad_LDFLAGS = $(GLDFLAGS) 37 | 38 | EXTRA_DIST = gmetad.aix.init gmetad.conf.in gmetad.init gmetad.init.SuSE \ 39 | type_hash.gperf xml_hash.gperf gmetad-default cmdline.sh gmetad.service.in 40 | 41 | xml_hash.c: xml_hash.gperf 42 | gperf -l -H xml_hash -t -F ', 0' -N in_xml_list -k '1,$$' -W xml_tags xml_hash.gperf > xml_hash.c 43 | 44 | type_hash.c: type_hash.gperf 45 | gperf -G -l -H type_hash -t -F ', 0' -N in_type_list -k '1,$$' -W types type_hash.gperf > type_hash.c 46 | 47 | gmetad.conf: gmetad.conf.in $(FIXCONFIG) 48 | $(FIXCONFIG) $< $@ 49 | 50 | gmetad.service: gmetad.service.in $(FIXCONFIG) 51 | $(FIXCONFIG) $< $@ 52 | 53 | install-data-hook: gmetad.conf 54 | mkdir -p $(DESTDIR)$(sysconfdir) && \ 55 | $(INSTALL_DATA) gmetad.conf $(DESTDIR)$(sysconfdir)/gmetad.conf 56 | 57 | CLEANFILES = cmdline.c 58 | 59 | if HAVE_SYSTEMD 60 | systemdsystemunit_DATA = \ 61 | gmetad.service 62 | endif 63 | -------------------------------------------------------------------------------- /gmond/modules/network/mod_net.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | mmodule net_module; 5 | 6 | 7 | 8 | static int net_metric_init ( apr_pool_t *p ) 9 | { 10 | int i; 11 | 12 | libmetrics_init(); 13 | 14 | for (i = 0; net_module.metrics_info[i].name != NULL; i++) { 15 | /* Initialize the metadata storage for each of the metrics and then 16 | * store one or more key/value pairs. The define MGROUPS defines 17 | * the key for the grouping attribute. */ 18 | MMETRIC_INIT_METADATA(&(net_module.metrics_info[i]),p); 19 | MMETRIC_ADD_METADATA(&(net_module.metrics_info[i]),MGROUP,"network"); 20 | } 21 | 22 | return 0; 23 | } 24 | 25 | static void net_metric_cleanup ( void ) 26 | { 27 | } 28 | 29 | static g_val_t net_metric_handler ( int metric_index ) 30 | { 31 | g_val_t val; 32 | 33 | /* The metric_index corresponds to the order in which 34 | the metrics appear in the metric_info array 35 | */ 36 | switch (metric_index) { 37 | case 0: 38 | return bytes_out_func(); 39 | case 1: 40 | return bytes_in_func(); 41 | case 2: 42 | return pkts_in_func(); 43 | case 3: 44 | return pkts_out_func(); 45 | } 46 | 47 | /* default case */ 48 | val.f = 0; 49 | return val; 50 | } 51 | 52 | static Ganglia_25metric net_metric_info[] = 53 | { 54 | {0, "bytes_out", 300, GANGLIA_VALUE_FLOAT, "bytes/sec", "both", "%.2f", UDP_HEADER_SIZE+8, "Number of bytes out per second"}, 55 | {0, "bytes_in", 300, GANGLIA_VALUE_FLOAT, "bytes/sec", "both", "%.2f", UDP_HEADER_SIZE+8, "Number of bytes in per second"}, 56 | {0, "pkts_in", 300, GANGLIA_VALUE_FLOAT, "packets/sec", "both", "%.2f", UDP_HEADER_SIZE+8, "Packets in per second"}, 57 | {0, "pkts_out", 300, GANGLIA_VALUE_FLOAT, "packets/sec", "both", "%.2f", UDP_HEADER_SIZE+8, "Packets out per second"}, 58 | {0, NULL} 59 | }; 60 | 61 | mmodule net_module = 62 | { 63 | STD_MMODULE_STUFF, 64 | net_metric_init, 65 | net_metric_cleanup, 66 | net_metric_info, 67 | net_metric_handler, 68 | }; 69 | 70 | -------------------------------------------------------------------------------- /README.GIT: -------------------------------------------------------------------------------- 1 | Welcome to the Bleeding Edge of Ganglia Development 2 | 3 | The git source represents the latest snapshot of Ganglia 4 | development. 5 | 6 | For best results, make sure you have in your development environment 7 | at least the following tools installed. 8 | 9 | automake (GNU automake) 1.8.3 10 | autoconf (GNU autoconf) 2.53 11 | ltmain.sh (GNU libtool) 1.4.2 12 | pkg-config (FreeDesktop) 13 | 14 | Additionally, you might need the following 15 | 16 | gperf (GNU gperf) 3.0.3 (used in gmetad's xml and type hash functions) 17 | 18 | CheckOut the source files of Ganglia: 19 | 20 | git clone git://github.com/ganglia/monitor-core.git ganglia 21 | 22 | and update the submodules 23 | 24 | cd ganglia 25 | git submodule init 26 | git submodule update 27 | 28 | To prepare the distribution for compilation, run the bootstrapping script: 29 | 30 | ./bootstrap 31 | 32 | To build a distribution tarball (*), run: 33 | 34 | ./configure 35 | make dist-gzip 36 | 37 | To prepare a distribution tree, run: 38 | 39 | ./configure 40 | make distdir 41 | 42 | To build RPMs in Linux after building the tarball, run (ex: 32bit x86 43 | Pentium or higher) 44 | 45 | rpmbuild -ta --clean --target i686,noarch 46 | 47 | Beware that building the RPM requires that all build dependendencies are 48 | fist installed; which might include in some cases packages that are not 49 | available in the standard package repository from your distribution, and 50 | therefore requiring additional external repositories to be added. For 51 | example, for RHEL or derived distributions, rrdtool-devel can be obtained 52 | from Fedora EPEL. 53 | 54 | For Solaris users with Blastwave and Sun Studio, you can 55 | use this script to run configure and make: 56 | 57 | ./scripts/build-solaris.sh 58 | 59 | Using Sun Studio's C compiler for Solaris eliminates 60 | the need to deploy GCC runtime libraries with Ganglia. 61 | The latest versions of Sun Studio are a free download 62 | for Solaris 8 and higher. 63 | 64 | (*) other distribution formats are available if you have the needed tools 65 | installed by using dist-bzip2, dist-zip, or dist-tarZ (dist target) 66 | -------------------------------------------------------------------------------- /debian/po/ru.po: -------------------------------------------------------------------------------- 1 | # translation of ru.po to Russian 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # 5 | # Yuri Kozlov , 2009. 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: ganglia 3.1.2-3\n" 9 | "Report-Msgid-Bugs-To: ganglia@packages.debian.org\n" 10 | "POT-Creation-Date: 2009-07-29 20:19+0100\n" 11 | "PO-Revision-Date: 2009-08-10 20:34+0400\n" 12 | "Last-Translator: Yuri Kozlov \n" 13 | "Language-Team: Russian \n" 14 | "Language: ru\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "X-Generator: KBabel 1.11.4\n" 19 | "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" 20 | "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" 21 | 22 | #. Type: boolean 23 | #. Description 24 | #: ../ganglia-webfrontend.templates:2001 25 | msgid "Automatically configure apache2?" 26 | msgstr "Настроить apache2 автоматически?" 27 | 28 | #. Type: boolean 29 | #. Description 30 | #: ../ganglia-webfrontend.templates:2001 31 | msgid "" 32 | "The ganglia front-end will be unavailable until a web server is configured. " 33 | "Automatic configuration can be performed for the Apache 2 web server." 34 | msgstr "" 35 | "Пользовательский интерфейс ganglia будет недоступен до тех пор, пока не " 36 | "настроен веб-сервер. Для веб-сервера Apache 2 возможна автоматическая " 37 | "настройка." 38 | 39 | #. Type: boolean 40 | #. Description 41 | #: ../ganglia-webfrontend.templates:3001 42 | msgid "Restart apache2?" 43 | msgstr "Перезапустить apache2?" 44 | 45 | #. Type: boolean 46 | #. Description 47 | #: ../ganglia-webfrontend.templates:3001 48 | msgid "" 49 | "In order to activate the new configuration, the web server needs to be " 50 | "restarted. If you choose not to do this automatically, you should do so " 51 | "manually at the first opportunity." 52 | msgstr "" 53 | "Чтобы новая настройка начала действовать, требуется перезапустить веб-" 54 | "сервер. Если вы не выберите автоматический перезапуск, то сделайте это " 55 | "вручную при первой возможности." 56 | -------------------------------------------------------------------------------- /gmond/modules/conf.d/modgstatus.conf: -------------------------------------------------------------------------------- 1 | /* Uncomment the modules section to load the module, 2 | then uncomment some or all of the metrics that are required */ 3 | 4 | /* 5 | modules { 6 | module { 7 | name = "gstatus_module" 8 | path = "modgstatus.so" 9 | } 10 | } 11 | 12 | collection_group { 13 | collect_once = yes 14 | time_threshold = 1200 15 | metric { 16 | name = "gmond_version" 17 | title = "gmond version" 18 | } 19 | metric { 20 | name = "gmond_version_full" 21 | title = "gmond version and release" 22 | } 23 | } 24 | */ 25 | 26 | /* Gmond status metrics */ 27 | /* 28 | collection_group { 29 | collect_every = 10 30 | time_threshold = 20 31 | metric { 32 | name = "gmond_pkts_recvd_all" 33 | value_threshold = 1.0 34 | title = "Gmond All Pkts Recvd" 35 | } 36 | metric { 37 | name = "gmond_pkts_recvd_failed" 38 | value_threshold = 1.0 39 | title = "Gmond Failed Pkts Recvd" 40 | } 41 | metric { 42 | name = "gmond_pkts_recvd_ignored" 43 | value_threshold = 1.0 44 | title = "Gmond Ignored Pkts Recvd" 45 | } 46 | metric { 47 | name = "gmond_pkts_recvd_metadata" 48 | value_threshold = 1.0 49 | title = "Gmond Metadata Pkts Recvd" 50 | } 51 | metric { 52 | name = "gmond_pkts_recvd_value" 53 | value_threshold = 1.0 54 | title = "Gmond Data Pkts Recvd" 55 | } 56 | metric { 57 | name = "gmond_pkts_recvd_request" 58 | value_threshold = 1.0 59 | title = "Gmond Metadata Request Pkts" 60 | } 61 | metric { 62 | name = "gmond_pkts_sent_all" 63 | value_threshold = 1.0 64 | title = "Gmond All Sent Pkts" 65 | } 66 | metric { 67 | name = "gmond_pkts_sent_failed" 68 | value_threshold = 1.0 69 | title = "Gmond Failed Pkts Sent" 70 | } 71 | metric { 72 | name = "gmond_pkts_sent_metadata" 73 | value_threshold = 1.0 74 | title = "Gmond Metadata Pkts Sent" 75 | } 76 | metric { 77 | name = "gmond_pkts_sent_value" 78 | value_threshold = 1.0 79 | title = "Gmond Data Pkts Sent" 80 | } 81 | metric { 82 | name = "gmond_pkts_sent_request" 83 | value_threshold = 1.0 84 | title = "Gmond Metadata Requests Sent" 85 | } 86 | } 87 | */ 88 | -------------------------------------------------------------------------------- /debian/po/fr.po: -------------------------------------------------------------------------------- 1 | # Translation of ganglia debconf templates to French 2 | # Copyright (C) 2009 Debian French l10n team 3 | # This file is distributed under the same license as the ganglia package. 4 | # 5 | # Translators: 6 | # Alexandre Normand , 2009 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: ganglia 3.1.2-2\n" 10 | "Report-Msgid-Bugs-To: ganglia@packages.debian.org\n" 11 | "POT-Creation-Date: 2009-07-29 20:19+0100\n" 12 | "PO-Revision-Date: 2009-08-04 21:00+0100\n" 13 | "Last-Translator: Alexandre Normand \n" 14 | "Language-Team: French \n" 15 | "Language: fr\n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=utf-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | "X-Poedit-Language: French\n" 20 | "X-Poedit-Country: FRANCE\n" 21 | "X-Poedit-SourceCharset: utf-8\n" 22 | 23 | #. Type: boolean 24 | #. Description 25 | #: ../ganglia-webfrontend.templates:2001 26 | msgid "Automatically configure apache2?" 27 | msgstr "Configurer apache2 automatiquement ?" 28 | 29 | #. Type: boolean 30 | #. Description 31 | #: ../ganglia-webfrontend.templates:2001 32 | msgid "" 33 | "The ganglia front-end will be unavailable until a web server is configured. " 34 | "Automatic configuration can be performed for the Apache 2 web server." 35 | msgstr "" 36 | "L'interface ganglia sera indisponible tant qu'aucun serveur web n'aura été " 37 | "configuré. La configuration automatique peut être effectuée pour le serveur " 38 | "web Apache 2." 39 | 40 | #. Type: boolean 41 | #. Description 42 | #: ../ganglia-webfrontend.templates:3001 43 | msgid "Restart apache2?" 44 | msgstr "Redémarrer apache2 ?" 45 | 46 | #. Type: boolean 47 | #. Description 48 | #: ../ganglia-webfrontend.templates:3001 49 | msgid "" 50 | "In order to activate the new configuration, the web server needs to be " 51 | "restarted. If you choose not to do this automatically, you should do so " 52 | "manually at the first opportunity." 53 | msgstr "" 54 | "Pour que la nouvelle configuration soit prise en compte, le serveur web doit " 55 | "être redémarré. Si vous décidez de ne pas le faire maintenant, vous devriez " 56 | "le faire vous-même dès que possible." 57 | -------------------------------------------------------------------------------- /gmond/perl_modules/example/example.pl: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2010 Bernard Li 3 | # All Rights Reserved. 4 | # 5 | # This code is part of a perl module for ganglia. 6 | # 7 | # Contributors : Nicolas Brousse 8 | # 9 | 10 | use strict; 11 | our @descriptors; 12 | our $Random_Max = 50; 13 | our $Constant_Value = 50; 14 | use vars qw(@descriptors $Random_Max $Constant_Value); 15 | 16 | sub Random_Numbers { 17 | my $i = int(rand($Random_Max)); 18 | printf("Value from Random_Numbers : %d\n", $i); 19 | return $i; 20 | } 21 | 22 | sub Constant_Number { 23 | my $i = int($Constant_Value); 24 | printf("Value from Constant_Numbers : %d\n", $i); 25 | return $i; 26 | } 27 | 28 | sub metric_init { 29 | my $params = shift; 30 | 31 | if (exists($params->{'RandomMax'})) { 32 | $Random_Max = int($params->{'RandomMax'}); 33 | } 34 | 35 | if (exists($params->{'ConstantValue'})) { 36 | $Constant_Value = int($params->{'ConstantValue'}); 37 | } 38 | 39 | my %d1 = ( 40 | 'name' => 'PlRandom_Numbers', 41 | 'call_back' => 'Random_Numbers', 42 | 'time_max' => 90, 43 | 'value_type' => 'uint', 44 | 'units' => 'N', 45 | 'slope' => 'both', 46 | 'format' => '%u', 47 | 'description' => 'Example module metric (random numbers)', 48 | 'groups' => 'example,random' 49 | ); 50 | my %d2 = ( 51 | 'name' => 'PlConstant_Number', 52 | 'call_back' => 'Constant_Number', 53 | 'time_max' => 90, 54 | 'value_type' => 'uint', 55 | 'units' => 'N', 56 | 'slope' => 'zero', 57 | 'format' => '%u', 58 | 'description' => 'Example module metric (constant number)', 59 | 'groups' => 'example' 60 | ); 61 | 62 | push @descriptors, { %d1 }; 63 | push @descriptors, { %d2 }; 64 | return @descriptors; 65 | } 66 | 67 | sub metric_cleanup { 68 | } 69 | 70 | if ($ENV{_} !~ /gmond/) { 71 | my $params = {'RandomMax' => 500, 'ConstantValue' => 322}; 72 | 73 | metric_init($params); 74 | foreach (@descriptors) { 75 | my $v = eval($_->{'call_back'}); 76 | printf("value for %s is %u\n", $_->{'name'}, $v); 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /mans/gmetad.1: -------------------------------------------------------------------------------- 1 | .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36. 2 | .TH GMETAD "1" "March 2008" "gmetad" "User Commands" 3 | .SH NAME 4 | gmetad \- manual page for Ganglia Meta Daemon 5 | .SH SYNOPSIS 6 | .B gmetad 7 | [\fIOPTIONS\fR]... 8 | .SH DESCRIPTION 9 | The Ganglia Meta Daemon (gmetad) collects information from 10 | multiple gmond or gmetad data sources, saves the information to local 11 | round\-robin databases, and exports XML which is the concatentation of 12 | all data sources 13 | .TP 14 | \fB\-h\fR, \fB\-\-help\fR 15 | Print help and exit 16 | .TP 17 | \fB\-V\fR, \fB\-\-version\fR 18 | Print version and exit 19 | .TP 20 | \fB\-c\fR, \fB\-\-conf\fR=\fISTRING\fR 21 | Location of gmetad configuration file 22 | (default='/etc/ganglia/gmetad.conf') 23 | .TP 24 | \fB\-d\fR, \fB\-\-debug\fR=\fIINT\fR 25 | Debug level. If greater than zero, daemon will stay in 26 | foreground. (default='0') 27 | .TP 28 | \fB\-p\fR, \fB\-\-pid\-file\fR=\fISTRING\fR 29 | Write process\-id to file 30 | .SH AUTHOR 31 | Matt Massie 32 | .SH "REPORTING BUGS" 33 | Report all bugs to the Ganglia Github project at 34 | 35 | https://github.com/ganglia/monitor-core/issues 36 | .SH COPYRIGHT 37 | Copyright (c) 2001, 2002, 2003, 2004, 2005 by 38 | The Regents of the University of California. All rights reserved. 39 | 40 | Permission to use, copy, modify, and distribute this software and its 41 | documentation for any purpose, without fee, and without written agreement is 42 | hereby granted, provided that the above copyright notice and the following 43 | two paragraphs appear in all copies of this software. 44 | 45 | IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR 46 | DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT 47 | OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF 48 | CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | 50 | THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, 51 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 52 | AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS 53 | ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO 54 | PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 55 | -------------------------------------------------------------------------------- /lib/rdwr.c: -------------------------------------------------------------------------------- 1 | /******************************************************** 2 | * An example source module to accompany... 3 | * 4 | * "Using POSIX Threads: Programming with Pthreads" 5 | * by Brad nichols, Dick Buttlar, Jackie Farrell 6 | * O'Reilly & Associates, Inc. 7 | * 8 | ******************************************************** 9 | * rdwr.c -- 10 | * 11 | * Library of functions implementing reader/writer locks 12 | */ 13 | #include 14 | #include "rdwr.h" 15 | 16 | int 17 | pthread_rdwr_init_np (pthread_rdwr_t * rdwrp) 18 | { 19 | rdwrp->readers_reading = 0; 20 | rdwrp->writer_writing = 0; 21 | pthread_mutex_init (&(rdwrp->mutex), NULL); 22 | pthread_cond_init (&(rdwrp->lock_free), NULL); 23 | return 0; 24 | } 25 | 26 | int 27 | pthread_rdwr_rlock_np (pthread_rdwr_t * rdwrp) 28 | { 29 | pthread_mutex_lock (&(rdwrp->mutex)); 30 | while (rdwrp->writer_writing) 31 | { 32 | pthread_cond_wait (&(rdwrp->lock_free), &(rdwrp->mutex)); 33 | } 34 | rdwrp->readers_reading++; 35 | pthread_mutex_unlock (&(rdwrp->mutex)); 36 | return 0; 37 | } 38 | 39 | int 40 | pthread_rdwr_runlock_np (pthread_rdwr_t * rdwrp) 41 | { 42 | pthread_mutex_lock (&(rdwrp->mutex)); 43 | if (rdwrp->readers_reading == 0) 44 | { 45 | pthread_mutex_unlock (&(rdwrp->mutex)); 46 | return -1; 47 | } 48 | else 49 | { 50 | rdwrp->readers_reading--; 51 | if (rdwrp->readers_reading == 0) 52 | { 53 | pthread_cond_signal (&(rdwrp->lock_free)); 54 | } 55 | pthread_mutex_unlock (&(rdwrp->mutex)); 56 | return 0; 57 | } 58 | } 59 | 60 | int 61 | pthread_rdwr_wlock_np (pthread_rdwr_t * rdwrp) 62 | { 63 | pthread_mutex_lock (&(rdwrp->mutex)); 64 | while (rdwrp->writer_writing || rdwrp->readers_reading) 65 | { 66 | pthread_cond_wait (&(rdwrp->lock_free), &(rdwrp->mutex)); 67 | } 68 | rdwrp->writer_writing++; 69 | pthread_mutex_unlock (&(rdwrp->mutex)); 70 | return 0; 71 | } 72 | 73 | int 74 | pthread_rdwr_wunlock_np (pthread_rdwr_t * rdwrp) 75 | { 76 | pthread_mutex_lock (&(rdwrp->mutex)); 77 | if (rdwrp->writer_writing == 0) 78 | { 79 | pthread_mutex_unlock (&(rdwrp->mutex)); 80 | return -1; 81 | } 82 | else 83 | { 84 | rdwrp->writer_writing = 0; 85 | pthread_cond_broadcast (&(rdwrp->lock_free)); 86 | pthread_mutex_unlock (&(rdwrp->mutex)); 87 | return 0; 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /gmond/modules/system/mod_sys.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | mmodule sys_module; 5 | 6 | static int sys_metric_init ( apr_pool_t *p ) 7 | { 8 | int i; 9 | 10 | libmetrics_init(); 11 | 12 | for (i = 0; sys_module.metrics_info[i].name != NULL; i++) { 13 | /* Initialize the metadata storage for each of the metrics and then 14 | * store one or more key/value pairs. The define MGROUPS defines 15 | * the key for the grouping attribute. */ 16 | MMETRIC_INIT_METADATA(&(sys_module.metrics_info[i]),p); 17 | MMETRIC_ADD_METADATA(&(sys_module.metrics_info[i]),MGROUP,"system"); 18 | } 19 | 20 | return 0; 21 | } 22 | 23 | static void sys_metric_cleanup ( void ) 24 | { 25 | } 26 | 27 | static g_val_t sys_metric_handler ( int metric_index ) 28 | { 29 | g_val_t val; 30 | 31 | /* The metric_index corresponds to the order in which 32 | the metrics appear in the metric_info array 33 | */ 34 | switch (metric_index) { 35 | case 0: 36 | return boottime_func(); 37 | case 1: 38 | return sys_clock_func(); 39 | case 2: 40 | return machine_type_func(); 41 | case 3: 42 | return os_name_func(); 43 | case 4: 44 | return os_release_func(); 45 | case 5: 46 | return mtu_func(); 47 | } 48 | 49 | /* default case */ 50 | val.uint32 = 0; 51 | return val; 52 | } 53 | 54 | static Ganglia_25metric sys_metric_info[] = 55 | { 56 | {0, "boottime", 1200, GANGLIA_VALUE_UNSIGNED_INT, "s", "zero", "%u", UDP_HEADER_SIZE+8, "The last time that the system was started"}, 57 | {0, "sys_clock", 1200, GANGLIA_VALUE_UNSIGNED_INT, "s", "zero", "%u", UDP_HEADER_SIZE+8, "Time as reported by the system clock"}, 58 | {0, "machine_type", 1200, GANGLIA_VALUE_STRING, "", "zero", "%s", UDP_HEADER_SIZE+32, "System architecture"}, 59 | {0, "os_name", 1200, GANGLIA_VALUE_STRING, "", "zero", "%s", UDP_HEADER_SIZE+32, "Operating system name"}, 60 | {0, "os_release", 1200, GANGLIA_VALUE_STRING, "", "zero", "%s", UDP_HEADER_SIZE+32, "Operating system release date"}, 61 | {0, "mtu", 1200, GANGLIA_VALUE_UNSIGNED_INT, "", "both", "%u", UDP_HEADER_SIZE+8, "Network maximum transmission unit"}, 62 | {0, NULL} 63 | 64 | }; 65 | 66 | mmodule sys_module = 67 | { 68 | STD_MMODULE_STUFF, 69 | sys_metric_init, 70 | sys_metric_cleanup, 71 | sys_metric_info, 72 | sys_metric_handler, 73 | }; 74 | 75 | -------------------------------------------------------------------------------- /gmond/gmond_internal.h: -------------------------------------------------------------------------------- 1 | /** @file gmond_internal.h 2 | * @brief expose just enough of gmond internals to allow tightly-coupled receivers (such as sflow.c) to submit metrics 3 | * @author Neil McKee */ 4 | 5 | #ifndef GMOND_INTERNAL_H 6 | #define GMOND_INTERNAL_H 7 | 8 | /* If we use autoconf. */ 9 | #ifdef HAVE_CONFIG_H 10 | #include "config.h" 11 | #endif 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif /* __cplusplus */ 16 | 17 | #ifdef SOLARIS 18 | #define fabsf(f) ((float)fabs(f)) 19 | #endif 20 | #ifdef _AIX 21 | #ifndef _AIX52 22 | /* _AIX52 is defined on all versions of AIX >= 5.2 23 | fabsf doesn't exist on versions prior to 5.2 */ 24 | #define fabsf(f) ((float)fabs(f)) 25 | #endif 26 | #endif 27 | 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include /* for apr_proc_detach(). no threads used. */ 37 | #include 38 | #include 39 | #include 40 | 41 | /* The "hosts" hash contains values of type "hostdata" */ 42 | struct Ganglia_host { 43 | /* Name of the host */ 44 | char *hostname; 45 | /* The IP of this host */ 46 | char *ip; 47 | /* The location of this host */ 48 | char *location; 49 | /* Timestamp of when the remote host gmond started */ 50 | unsigned int gmond_started; 51 | /* The pool used to malloc memory for this host */ 52 | apr_pool_t *pool; 53 | /* A hash containing the full metric data from the host */ 54 | apr_hash_t *metrics; 55 | /* A hash containing the last data update from the host */ 56 | apr_hash_t *gmetrics; 57 | /* First heard from */ 58 | apr_time_t first_heard_from; 59 | /* Last heard from */ 60 | apr_time_t last_heard_from; 61 | /* Thread mutex */ 62 | apr_thread_mutex_t *mutex; 63 | #ifdef SFLOW 64 | struct _SFlowAgent *sflow; 65 | #endif 66 | }; 67 | typedef struct Ganglia_host Ganglia_host; 68 | 69 | Ganglia_host *Ganglia_host_get( char *remIP, apr_sockaddr_t *sa, Ganglia_metric_id *metric_id); 70 | 71 | void Ganglia_metadata_save( Ganglia_host *host, Ganglia_metadata_msg *message ); 72 | void Ganglia_value_save( Ganglia_host *host, Ganglia_value_msg *message ); 73 | void Ganglia_update_vidals( Ganglia_host *host, Ganglia_value_msg *vmsg); 74 | void Ganglia_metadata_check(Ganglia_host *host, Ganglia_value_msg *vmsg ); 75 | 76 | #ifdef __cplusplus 77 | } 78 | #endif /* __cplusplus */ 79 | #endif /* GMOND_INTERNAL_H */ 80 | -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | Source: ganglia 2 | Section: net 3 | Priority: optional 4 | Maintainer: Stuart Teasdale 5 | Homepage: http://www.ganglia.info/ 6 | Build-Depends: debhelper (>> 5.0.0), librrd2-dev, autoconf, autotools-dev, automake, libapr1-dev, libexpat1-dev, python-dev, libconfuse-dev, po-debconf, libxml2-dev, libdbi0-dev, libpcre3-dev, gperf 7 | Standards-Version: 3.8.4 8 | 9 | Package: ganglia-monitor 10 | Architecture: any 11 | Depends: ${misc:Depends}, ${shlibs:Depends}, adduser, libganglia1 (=${binary:Version}) 12 | Description: cluster monitoring toolkit - node daemon 13 | Ganglia is a scalable, real-time cluster monitoring environment 14 | that collects cluster statistics in an open and well-defined XML format. 15 | . 16 | This package contains the monitor core program. 17 | 18 | Package: ganglia-monitor-python 19 | Architecture: all 20 | Depends: ${misc:Depends}, ${shlibs:Depends}, python, ganglia-monitor (=${binary:Version}) 21 | Description: cluster monitoring toolkit - python modules 22 | Ganglia is a scalable, real-time cluster monitoring environment 23 | that collects cluster statistics in an open and well-defined XML format. 24 | . 25 | This package contains the monitor core python plugins. 26 | 27 | Package: gmetad 28 | Architecture: any 29 | Depends: ${misc:Depends}, ${shlibs:Depends}, adduser, libganglia1 (=${binary:Version}) 30 | Suggests: ganglia-monitor 31 | Description: cluster monitoring toolkit - Ganglia Meta-Daemon 32 | Ganglia is a scalable, real-time cluster monitoring environment 33 | that collects cluster statistics in an open and well-defined XML format. 34 | . 35 | This package contains the 'gmetad' daemon, which collects information from 36 | ganglia monitor clients and writes it to RRD databases. 37 | 38 | Package: libganglia1 39 | Architecture: any 40 | Section: libs 41 | Depends: ${misc:Depends}, ${shlibs:Depends} 42 | Description: cluster monitoring toolkit - shared libraries 43 | Ganglia is a scalable, real-time cluster monitoring environment 44 | that collects cluster statistics in an open and well-defined XML format. 45 | . 46 | This package contains shared libraries. 47 | 48 | Package: libganglia1-dev 49 | Architecture: any 50 | Section: libdevel 51 | Depends: ${misc:Depends}, libganglia1 (=${binary:Version}), ${shlibs:Depends} 52 | Description: cluster monitoring toolkit - development libraries 53 | Ganglia is a scalable, real-time cluster monitoring environment 54 | that collects cluster statistics in an open and well-defined XML format. 55 | . 56 | This package contains development libraries. 57 | 58 | -------------------------------------------------------------------------------- /gmetad/export_helpers.h: -------------------------------------------------------------------------------- 1 | #include "ganglia.h" 2 | 3 | #ifdef WITH_MEMCACHED 4 | #include 5 | #include 6 | #endif /* WITH_MEMCACHED */ 7 | 8 | /* Tracks the macros we need to interpret in the graphite_path */ 9 | typedef struct 10 | { 11 | char *torepl; 12 | char *replwith; 13 | } 14 | graphite_path_macro; 15 | 16 | #ifdef WITH_MEMCACHED 17 | int 18 | write_data_to_memcached ( const char *cluster, const char *host, const char *metric, 19 | const char *sum, unsigned int process_time, unsigned int expiry ); 20 | #endif /* WITH_MEMCACHED */ 21 | 22 | g_udp_socket* 23 | init_carbon_udp_socket (const char *hostname, uint16_t port); 24 | int 25 | write_data_to_carbon ( const char *source, const char *host, const char *metric, 26 | const char *sum, unsigned int process_time); 27 | #ifdef WITH_RIEMANN 28 | #include "riemann.pb-c.h" 29 | 30 | g_udp_socket* 31 | init_riemann_udp_socket (const char *hostname, uint16_t port); 32 | 33 | g_tcp_socket* 34 | init_riemann_tcp_socket (const char *hostname, uint16_t port); 35 | 36 | Event * /* Ganglia => Riemann */ 37 | create_riemann_event (const char *grid, /* grid => grid */ 38 | const char *cluster, /* cluster => cluster */ 39 | const char *host, /* host => host */ 40 | const char *ip, /* ip => ip */ 41 | const char *metric, /* metric => service */ 42 | const char *value, /* value => metric (if int or float) or state (if string) */ 43 | const char *type, /* "int", "float" or "string" */ 44 | const char *units, /* units => description */ 45 | const char *state, /* not used => state (overrides metric value if also supplied) */ 46 | unsigned int localtime, /* localtime => time */ 47 | const char *tags, /* tags => tags */ 48 | const char *location, /* location => location */ 49 | unsigned int ttl /* tmax => ttl */ 50 | ); 51 | int 52 | send_event_to_riemann (Event *event); 53 | 54 | int 55 | send_message_to_riemann (Msg *message); 56 | 57 | int 58 | destroy_riemann_event(Event *event); 59 | 60 | int 61 | destroy_riemann_msg(Msg *message); 62 | #endif /* WITH_RIEMANN */ 63 | -------------------------------------------------------------------------------- /gmond/gmond.aix.init: -------------------------------------------------------------------------------- 1 | #!/usr/bin/ksh 2 | # 3 | # description: gmond startup script 4 | # 5 | # Oct 27, 2010, Michael Perzl (michael@perzl.org) 6 | # 7 | 8 | GMOND_BIN=/opt/freeware/sbin/gmond 9 | 10 | PIDFILE=/var/run/gmond.pid 11 | 12 | RUN_AS_USER="nobody" 13 | 14 | 15 | # define some generic commands 16 | AWK=/usr/bin/awk 17 | CAT=/usr/bin/cat 18 | ECHO=/usr/bin/echo 19 | GREP=/usr/bin/grep 20 | KILL=/usr/bin/kill 21 | MKDIR=/usr/bin/mkdir 22 | PRINTF=/usr/bin/printf 23 | PS=/usr/bin/ps 24 | RM=/usr/bin/rm 25 | 26 | 27 | # check for missing binaries (stale symlinks should not happen) 28 | test -x ${GMOND_BIN} || 29 | { 30 | $ECHO "${GMOND_BIN} not installed" 31 | if [ "$1" = "stop" ] ; then 32 | exit 0 33 | else 34 | exit 5 35 | fi 36 | } 37 | 38 | # check for existence of necessary config file 39 | GMOND_CONFIG=/etc/ganglia/gmond.conf 40 | test -r ${GMOND_CONFIG} || 41 | { 42 | $ECHO "${GMOND_CONFIG} does not exist" 43 | if [ "$1" = "stop" ] ; then 44 | exit 0 45 | else 46 | exit 6 47 | fi 48 | } 49 | 50 | 51 | case "$1" in 52 | start) 53 | if [ -r ${PIDFILE} ]; then 54 | pid=`$CAT ${PIDFILE}` 55 | if [ "`$PS -ef | $GREP -v grep | $GREP ${pid} | $AWK '{ print $2 }'`" = "${pid}" ] ; then 56 | $ECHO "GANGLIA gmond daemon is already running with PID ${pid}." 57 | exit 1 58 | else 59 | $RM -f ${PIDFILE} 60 | fi 61 | fi 62 | $PRINTF "Starting GANGLIA gmond... " 63 | 64 | ## start daemon and write PID to file ${PIDFILE} 65 | $MKDIR -p /var/run 66 | ${GMOND_BIN} -p ${PIDFILE} -c ${GMOND_CONFIG} 67 | $ECHO "done." 68 | ;; 69 | stop) 70 | $PRINTF "Shutting down GANGLIA gmond daemon... " 71 | ## stop daemon 72 | if [ -r ${PIDFILE} ]; then 73 | $KILL -HUP `$CAT ${PIDFILE}` 74 | $RM -f ${PIDFILE} 75 | fi 76 | $ECHO "done." 77 | ;; 78 | status) 79 | if [ -r ${PIDFILE} ]; then 80 | pid=`$CAT ${PIDFILE}` 81 | if [ `$PS -ef | $GREP -v grep | $GREP ${pid} | $AWK '{ print $2 }'` = ${pid} ] ; then 82 | $ECHO "GANGLIA gmond daemon is running with PID ${pid}." 83 | fi 84 | else 85 | $ECHO "GANGLIA gmond daemon is not running." 86 | fi 87 | ;; 88 | restart) 89 | ## Stop the service and regardless of whether it was 90 | ## running or not, start it again. 91 | $0 stop 92 | $0 start 93 | ;; 94 | *) 95 | $ECHO "Usage: $0 {start|stop|status|restart}" 96 | exit 1 97 | ;; 98 | esac 99 | 100 | -------------------------------------------------------------------------------- /gmetad/gmetad.aix.init: -------------------------------------------------------------------------------- 1 | #!/usr/bin/ksh 2 | # 3 | # description: gmetad startup script 4 | # 5 | # Oct 27, 2010, Michael Perzl (michael@perzl.org) 6 | # 7 | 8 | GMETAD_BIN=/opt/freeware/sbin/gmetad 9 | 10 | PIDFILE=/var/run/gmetad.pid 11 | 12 | RUN_AS_USER="nobody" 13 | 14 | 15 | # define some generic commands 16 | AWK=/usr/bin/awk 17 | CAT=/usr/bin/cat 18 | ECHO=/usr/bin/echo 19 | GREP=/usr/bin/grep 20 | KILL=/usr/bin/kill 21 | MKDIR=/usr/bin/mkdir 22 | PRINTF=/usr/bin/printf 23 | PS=/usr/bin/ps 24 | RM=/usr/bin/rm 25 | 26 | 27 | # check for missing binaries (stale symlinks should not happen) 28 | test -x ${GMETAD_BIN} || 29 | { 30 | $ECHO "${GMETAD_BIN} not installed" 31 | if [ "$1" = "stop" ] ; then 32 | exit 0 33 | else 34 | exit 5 35 | fi 36 | } 37 | 38 | # check for existence of necessary config file 39 | GMETAD_CONFIG=/etc/ganglia/gmetad.conf 40 | test -r ${GMETAD_CONFIG} || 41 | { 42 | $ECHO "${GMETAD_CONFIG} does not exist" 43 | if [ "$1" = "stop" ] ; then 44 | exit 0 45 | else 46 | exit 6 47 | fi 48 | } 49 | 50 | 51 | case "$1" in 52 | start) 53 | if [ -r ${PIDFILE} ]; then 54 | pid=`$CAT ${PIDFILE}` 55 | if [ "`$PS -ef | $GREP -v grep | $GREP ${pid} | $AWK '{ print $2 }'`" = "${pid}" ] ; then 56 | $ECHO "GANGLIA gmetad daemon is already running with PID ${pid}." 57 | exit 1 58 | else 59 | $RM -f ${PIDFILE} 60 | fi 61 | fi 62 | $PRINTF "Starting GANGLIA gmetad... " 63 | 64 | ## start daemon and write PID to file ${PIDFILE} 65 | $MKDIR -p /var/run 66 | ${GMETAD_BIN} -p ${PIDFILE} -c ${GMETAD_CONFIG} 67 | $ECHO "done." 68 | ;; 69 | stop) 70 | $PRINTF "Shutting down GANGLIA gmetad daemon... " 71 | ## stop daemon 72 | if [ -r ${PIDFILE} ]; then 73 | $KILL -HUP `$CAT ${PIDFILE}` 74 | $RM -f ${PIDFILE} 75 | fi 76 | $ECHO "done." 77 | ;; 78 | status) 79 | if [ -r ${PIDFILE} ]; then 80 | pid=`$CAT ${PIDFILE}` 81 | if [ `$PS -ef | $GREP -v grep | $GREP ${pid} | $AWK '{ print $2 }'` = ${pid} ] ; then 82 | $ECHO "GANGLIA gmetad daemon is running with PID ${pid}." 83 | fi 84 | else 85 | $ECHO "GANGLIA gmetad daemon is not running." 86 | fi 87 | ;; 88 | restart) 89 | ## Stop the service and regardless of whether it was 90 | ## running or not, start it again. 91 | $0 stop 92 | $0 start 93 | ;; 94 | *) 95 | $ECHO "Usage: $0 {start|stop|status|restart}" 96 | exit 1 97 | ;; 98 | esac 99 | 100 | -------------------------------------------------------------------------------- /contrib/README.contrib: -------------------------------------------------------------------------------- 1 | The files in this directory have been graciously contributed by the 2 | Ganglia users' community and while they are open source, they may 3 | have a different license or copyright holder than Ganglia itself. 4 | 5 | While the various files and scripts are believed to work, The Ganglia 6 | development team does not maintain or support them, but merely distributes 7 | them for our users' convenience 'AS IS' and without any express or implied 8 | warranties. Use at your own risk. 9 | 10 | If you have any questions about the files, please contact the original 11 | authors or try emailing the ganglia-general mailing list. Information 12 | about joining this list can be found at: 13 | 14 | https://lists.sourceforge.net/lists/listinfo/ganglia-general 15 | 16 | New contributions are welcome! Please send them to the ganglia-general 17 | mailing list as well. 18 | 19 | ======================================================================== 20 | The files: 21 | ------------------------------------------------------------------------ 22 | 23 | ganglia_gmond.xml 24 | ganglia_gmetad.xml 25 | Contributed by Ben Rockwood ( benr _AT_ joyent.com ) 26 | Solaris/X86 SMF Manifest files. Both manifests assume that 27 | Ganglia was installed with the prefix /opt/ganglia. To load 28 | them (for example for gmond) run : 29 | 30 | # svccfg import ganglia_gmond.xml 31 | 32 | diskfree_report.php 33 | Contributed by Jesse Becker ( hawson _AT_ gmail.com ) 34 | Fancy diskfree report that attempts to predict when you 35 | will run out of disk space. Currently only works on aggregate 36 | disk usage, but could be altered to work on individual hosts 37 | as well. 38 | 39 | ganglia-rrd-modify.pl 40 | Contributed by Jason A. Smith ( smithj _AT_ bnl.gov ) 41 | Simple script to read ganglia's rrds and modify some of their 42 | configuration values. It can also dump & restore rrd files. 43 | Useful when moving ganglia to a new architecture. 44 | 45 | check_ganglia.py 46 | Contributed by Kostas Georgiou ( k.georgiou _AT_ imperial.ac.uk ) 47 | NRPE plugin to translate ganglia metric values into nagios 48 | alarms. 49 | 50 | removespikes.pl 51 | README-removespikes 52 | Contributed by Martin Knoblauch ( knobi _AT_ knobisoft.de ) with 53 | explicit permission from Tobias Oetiker ( tobi _AT_ oetiker.ch ) 54 | Perl script to remove "spikes" from RRD databases. 55 | 56 | ganglia-hosts-lowercase.sh 57 | Contributed by Daniel Pocock ( daniel _AT_ pocock.com.au ) 58 | Script template to help convert hostname rrds to lowercase to correct 59 | BUG232 in a live gmetad repository. 60 | -------------------------------------------------------------------------------- /mans/gstat.1: -------------------------------------------------------------------------------- 1 | .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36. 2 | .TH GSTAT "1" "March 2008" "gstat" "User Commands" 3 | .SH NAME 4 | gstat \- manual page for Ganglia Status Tool 5 | .SH SYNOPSIS 6 | .B gstat 7 | [\fIOPTIONS\fR]... 8 | .SH DESCRIPTION 9 | The Ganglia Status Client (gstat) connects with a 10 | Ganglia Monitoring Daemon (gmond) and outputs a load\-balanced list 11 | of hosts 12 | .TP 13 | \fB\-h\fR, \fB\-\-help\fR 14 | Print help and exit 15 | .TP 16 | \fB\-V\fR, \fB\-\-version\fR 17 | Print version and exit 18 | .TP 19 | \fB\-a\fR, \fB\-\-all\fR 20 | List all hosts. Not just hosts running gexec 21 | (default=off) 22 | .TP 23 | \fB\-d\fR, \fB\-\-dead\fR 24 | Print only the hosts which are dead (default=off) 25 | .TP 26 | \fB\-m\fR, \fB\-\-mpifile\fR 27 | Print a load\-balanced mpifile (default=off) 28 | .TP 29 | \fB\-1\fR, \fB\-\-single_line\fR 30 | Print host and information all on one line (default= 31 | off) 32 | .TP 33 | \fB\-l\fR, \fB\-\-list\fR 34 | Print ONLY the host list (default=off) 35 | .TP 36 | \fB\-n\fR, \fB\-\-numeric\fR 37 | Print numeric addresses instead of hostnames (default=off) 38 | .TP 39 | \fB\-i\fR, \fB\-\-gmond_ip\fR=\fISTRING\fR 40 | Specify the ip address of the gmond to query 41 | (default=`localhost') 42 | .TP 43 | \fB\-p\fR, \fB\-\-gmond_port\fR=\fIINT\fR 44 | Specify the gmond port to query (default=`8649') 45 | .SH AUTHOR 46 | Matt Massie 47 | .SH "REPORTING BUGS" 48 | Report all bugs to the Ganglia Github project at 49 | 50 | https://github.com/ganglia/monitor-core/issues 51 | .SH COPYRIGHT 52 | Copyright (c) 2001, 2002, 2003, 2004, 2005 by 53 | The Regents of the University of California. All rights reserved. 54 | 55 | Permission to use, copy, modify, and distribute this software and its 56 | documentation for any purpose, without fee, and without written agreement is 57 | hereby granted, provided that the above copyright notice and the following 58 | two paragraphs appear in all copies of this software. 59 | 60 | IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR 61 | DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT 62 | OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF 63 | CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 64 | 65 | THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, 66 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 67 | AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS 68 | ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO 69 | PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 70 | -------------------------------------------------------------------------------- /gmond/python_modules/conf.d/apache_status.pyconf.disabled: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "apache_status" 4 | language = "python" 5 | param url { 6 | value = "http://localhost:7070/server-status" 7 | } 8 | 9 | # Which metric group should these metrics be put into 10 | param metric_group { 11 | value = "apache" 12 | } 13 | 14 | # Collecting SSL metrics under Apache 2.2 appears to cause a memory leak 15 | # in mod_status. Watch Apache memory utilization if you enable them 16 | param collect_ssl { 17 | value = False 18 | } 19 | } 20 | } 21 | 22 | collection_group { 23 | collect_every = 30 24 | time_threshold = 90 25 | 26 | metric { 27 | name = "ap_busy_workers" 28 | title = "Busy Threads" 29 | value_threshold = 0 30 | } 31 | metric { 32 | name = "ap_idle_workers" 33 | title = "Idle Threads" 34 | value_threshold = 0 35 | } 36 | metric { 37 | name = "ap_logging" 38 | title = "Logging" 39 | value_threshold = 0 40 | } 41 | metric { 42 | name = "ap_open_slot" 43 | title = "Open slot with no current process" 44 | value_threshold = 0 45 | } 46 | metric { 47 | name = "ap_reading_request" 48 | title = "Reading Request" 49 | value_threshold = 0 50 | } 51 | metric { 52 | name = "ap_waiting" 53 | title = "Waiting for Connection" 54 | value_threshold = 0 55 | } 56 | metric { 57 | name = "ap_sending_reply" 58 | title = "Sending Reply" 59 | value_threshold = 0 60 | } 61 | metric { 62 | name = "ap_idle" 63 | title = "Idle cleanup of worker" 64 | value_threshold = 0 65 | } 66 | metric { 67 | name = "ap_dns_lookup" 68 | title = "DNS Lookup" 69 | value_threshold = 0 70 | } 71 | metric { 72 | name = "ap_closing" 73 | title = "Closing connection" 74 | value_threshold = 0 75 | } 76 | metric { 77 | name = "ap_starting" 78 | title = "Starting up" 79 | value_threshold = 0 80 | } 81 | metric { 82 | name = "ap_gracefully_fin" 83 | title = "Gracefully finishing" 84 | value_threshold = 0 85 | } 86 | metric { 87 | name = "ap_keepalive" 88 | title = "Keepalive (read)" 89 | value_threshold = 0 90 | } 91 | metric { 92 | name = "ap_rps" 93 | title = "Requests per second" 94 | value_threshold = 0.0 95 | } 96 | metric { 97 | name = "ap_cpuload" 98 | title = "Pct of time CPU utilized" 99 | value_threshold = 0.0 100 | } 101 | # Uncomment if you are collecting SSL metrics 102 | # metric { 103 | # name_match = "apssl_(.+)" 104 | # value_threshold = 0.0 105 | # } 106 | } 107 | --------------------------------------------------------------------------------