├── scribe ├── README.md ├── conf.d │ └── scribe_stats.pyconf └── python_modules │ └── scribe_stats.py ├── .gitignore ├── memcached ├── python_modules │ └── tokyotyrant.py ├── README.mkdn └── conf.d │ ├── tokyotyrant.conf │ ├── tokyotyrant.conf.tmpl │ ├── memcached.conf.tmpl │ └── memcached.conf ├── jmxsh ├── extra │ ├── jmxsh.jar │ └── jmxsh.r25.patch ├── graph.d │ ├── jmx_sessions_report.php │ ├── jmx_threads_report.php │ └── jmx_heap_report.php ├── conf.d │ ├── jmx-basic.pyconf │ └── jmx-jetty-web.pyconf └── README ├── diskstat ├── examples │ ├── IOTime.png │ ├── Operations.png │ ├── TimeOnDisk.png │ └── data_transferred.png ├── conf.d │ └── diskstat.pyconf ├── README.mkdn └── graph.d │ ├── diskstat_iotime_report.php │ ├── diskstat_disktime_report.php │ ├── diskstat_readwritekb_report.php │ └── diskstat_operations_report.php ├── openstack_monitor ├── MANIFEST.in ├── postscript.sh ├── setup.cfg ├── conf.d │ ├── modpython.conf │ └── compute-metrics.pyconf ├── README ├── setup.py └── graph.d │ └── nova_services_report.php ├── mysql ├── README.mkdn └── conf.d │ └── mysql.conf ├── kestrel ├── README.mkdn └── conf.d │ └── kestrel.conf ├── system ├── hwmon │ ├── conf.d │ │ └── hwmon.pyconf │ ├── README.mkdn │ └── python_modules │ │ └── hwmon.py ├── vm_stats │ ├── conf.d │ │ ├── vm_stats.pyconf │ │ └── vm_stats.basic.pyconf │ └── README.mkdn ├── mem_fragmentation │ ├── conf.d │ │ └── mem_fragmentation.pyconf │ └── README.mkdn ├── cpu_stats │ ├── conf.d │ │ └── cpu_stats.pyconf │ └── README.mkdn └── mem_stats │ ├── conf.d │ └── mem_stats.pyconf │ └── README.mkdn ├── ssl └── entropy │ ├── conf.d │ └── entropy.pyconf │ ├── README.mkdn │ └── python_modules │ └── entropy.py ├── diskpart ├── README.mkdn └── conf.d │ └── diskpart.conf ├── network ├── conntrack │ ├── conf.d │ │ └── conntrack.pyconf │ └── README.mkdn ├── netiron │ ├── netiron.pyconf │ └── README ├── netstats │ ├── conf.d │ │ ├── netstats.pyconf │ │ └── netstats.basic.pyconf │ └── README.mkdn └── multi_interface │ ├── conf.d │ └── multi_interface.pyconf │ └── README.mkdn ├── apc_status ├── README.mkdn ├── document_root │ └── apc-json.php └── conf.d │ └── apc_status.pyconf ├── diskfree ├── README.mkdn └── conf.d │ └── diskfree.pyconf ├── blueeyes_service ├── README.mkdn └── conf.d │ └── blueeyes_service.conf ├── netapp_api ├── conf.d │ └── netapp_api.pyconf └── README.mkdn ├── varnish ├── README.mkdn └── conf.d │ └── varnish.pyconf ├── celery ├── conf.d │ └── celery.pyconf └── README.md ├── elasticsearch ├── README.mkdn ├── conf.d │ └── elasticsearch.pyconf └── graph.d │ └── es_report.json ├── xenstats ├── README.mkdn ├── conf.d │ └── xenstats.pyconf ├── graph.d │ ├── xen_vms_report.php │ └── xen_mem_report.php └── python_modules │ └── xenstats.py ├── tokyo_tyrant ├── README.mkdn └── conf.d │ └── tokyo_tyrant.conf ├── nfsstats └── README.mkdn ├── fibrechannel ├── fibrechannel.pyconf └── README.mkdn ├── README ├── procstat ├── conf.d │ └── procstat.pyconf └── graph.d │ ├── procstat_cpu_report.php │ └── procstat_mem_report.php ├── rabbit ├── conf.d │ └── rabbitmq.pyconf └── README.mkdn ├── riak ├── README.mkdn └── riak.conf ├── passenger ├── README.mkdn └── conf.d │ └── passenger.pyconf ├── beanstalk ├── README.mkdn └── conf.d │ └── beanstalk.conf ├── multi_nginx_status ├── conf.d │ └── multi_nginx_status.pyconf └── README.mkdn ├── apache_status ├── README.mkdn ├── conf.d │ └── apache_status.pyconf └── graph.d │ └── apache_status_report.php ├── gpu └── nvidia │ ├── nvidia-ml-py-3.295.00 │ ├── PKG-INFO │ └── setup.py │ ├── graph.d │ ├── gpu_mem_report.php │ ├── gpu0_mem_report.php │ ├── gpu1_mem_report.php │ ├── gpu2_mem_report.php │ ├── gpu3_mem_report.php │ ├── gpu_temp_report.php │ ├── gpu_sm_speed_report.php │ ├── gpu_mem_speed_report.php │ ├── gpu_core_speed_report.php │ ├── gpu_util_report.php │ └── gpu_mem_util_report.php │ └── README ├── ipmi ├── conf.d │ └── ipmi.pyconf ├── README.mkdn └── python_modules │ └── ipmi.py ├── nginx_status ├── README.mkdn ├── conf.d │ └── nginx_status.pyconf └── graph.d │ ├── nginx_accepts_ratio_report.php │ └── nginx_scoreboard_report.php ├── squid ├── README.mkdn └── graph.d │ ├── squid_5min_service_report.json │ └── squid_60min_service_report.json ├── zeromq_pub ├── conf.d │ └── zpubmon.pyconf └── README.rst ├── memcached_maxage ├── README.md ├── python_modules │ └── every.py └── conf.d │ └── memcached.pyconf ├── jenkins ├── README.mkdn └── conf.d │ └── jenkins.pyconf ├── mongodb ├── README.mkdn └── conf.d │ └── mongodb.conf ├── recoverpoint ├── README.mkdn └── recoverpoint.pyconf ├── kumofs ├── conf.d │ └── kumofs.conf └── README.mkdn ├── redis-gmond ├── conf.d │ └── redis-gmond.pyconf └── README.md ├── mysqld └── graph.d │ ├── mysql_traffic_report.php │ ├── mysql_qcache_hitrate_report.php │ ├── mysql_temporary_objects_report.php │ ├── mysql_innodb_bp_activity_report.php │ ├── mysql_qcache_mem_report.php │ ├── mysql_table_locks_report.php │ ├── mysql_qcache_report.php │ ├── mysql_innodb_io_report.php │ ├── mysql_simple_query_report.php │ ├── mysql_select_types_report.php │ ├── mysql_query_report.php │ └── mysql_connections_report.php ├── ehcache └── graph.d │ └── jmx_ehcache_hitrate_report.php ├── php_fpm ├── conf.d │ └── php_fpm.pyconf └── README.mkdn ├── httpd ├── graph.d │ └── apache_workers_report.php └── conf.d │ └── httpd.pyconf └── couchdb └── README.mkdn /scribe/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | -------------------------------------------------------------------------------- /memcached/python_modules/tokyotyrant.py: -------------------------------------------------------------------------------- 1 | memcached.py -------------------------------------------------------------------------------- /jmxsh/extra/jmxsh.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrypnz/gmond_python_modules/master/jmxsh/extra/jmxsh.jar -------------------------------------------------------------------------------- /diskstat/examples/IOTime.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrypnz/gmond_python_modules/master/diskstat/examples/IOTime.png -------------------------------------------------------------------------------- /diskstat/examples/Operations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrypnz/gmond_python_modules/master/diskstat/examples/Operations.png -------------------------------------------------------------------------------- /diskstat/examples/TimeOnDisk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrypnz/gmond_python_modules/master/diskstat/examples/TimeOnDisk.png -------------------------------------------------------------------------------- /diskstat/examples/data_transferred.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerrypnz/gmond_python_modules/master/diskstat/examples/data_transferred.png -------------------------------------------------------------------------------- /openstack_monitor/MANIFEST.in: -------------------------------------------------------------------------------- 1 | include graph.d/* 2 | include conf.d/* 3 | include python_modules/* 4 | include setup.cfg 5 | include README 6 | -------------------------------------------------------------------------------- /openstack_monitor/postscript.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | mv /etc/ganglia/python_modules/compute-metrics.py /usr/lib64/ganglia/python_modules/ 4 | -------------------------------------------------------------------------------- /openstack_monitor/setup.cfg: -------------------------------------------------------------------------------- 1 | [bdist_rpm] 2 | python=/usr/bin/python2.6 3 | requires=python,ganglia-gmond-python 4 | post-install=postscript.sh 5 | -------------------------------------------------------------------------------- /mysql/README.mkdn: -------------------------------------------------------------------------------- 1 | mysql 2 | =============== 3 | 4 | python module for ganglia 3.1. 5 | 6 | "mysql" send metrics on MySQL 7 | 8 | ## AUTHOR 9 | 10 | HIROSE Masaaki 11 | 12 | -------------------------------------------------------------------------------- /memcached/README.mkdn: -------------------------------------------------------------------------------- 1 | memcached 2 | =============== 3 | 4 | python module for ganglia 3.1. 5 | 6 | This module sends metrics on memcached protocol "stats". 7 | 8 | ## AUTHOR 9 | 10 | HIROSE Masaaki 11 | 12 | -------------------------------------------------------------------------------- /kestrel/README.mkdn: -------------------------------------------------------------------------------- 1 | kestrel 2 | =============== 3 | 4 | python module for ganglia 3.1. 5 | 6 | This module sends metrics on kestrel protocol "stats". 7 | 8 | ## AUTHOR 9 | 10 | Matt Erkkila 11 | 12 | -------------------------------------------------------------------------------- /openstack_monitor/conf.d/modpython.conf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "python_module" 4 | path = "/usr/lib/ganglia/modpython.so" 5 | params = "/etc/ganglia/python_modules" 6 | } 7 | } 8 | 9 | include ('/etc/ganglia/conf.d/*.pyconf') 10 | 11 | -------------------------------------------------------------------------------- /system/hwmon/conf.d/hwmon.pyconf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "hwmon" 4 | language = "python" 5 | } 6 | } 7 | 8 | collection_group { 9 | collect_every = 10 10 | time_threshold = 50 11 | metric { 12 | name_match = "hwmon_(.+)" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /ssl/entropy/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 | } -------------------------------------------------------------------------------- /system/vm_stats/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_match = "vm_(.+)" 14 | value_threshold = 1.0 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /diskpart/README.mkdn: -------------------------------------------------------------------------------- 1 | diskpart 2 | =============== 3 | 4 | python module for ganglia 3.1. 5 | 6 | "diskpart" send metrics on disk pattition. 7 | 8 | * total size [GB] 9 | * used size [GB] 10 | * total number of inode 11 | * used number of inode 12 | 13 | ## AUTHOR 14 | 15 | HIROSE Masaaki 16 | 17 | -------------------------------------------------------------------------------- /network/conntrack/conf.d/conntrack.pyconf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "conntrack" 4 | language = "python" 5 | } 6 | } 7 | 8 | collection_group { 9 | collect_every = 15 10 | time_threshold = 45 11 | 12 | metric { 13 | name_match = "conntrack_(.+)" 14 | value_threshold = 1.0 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /apc_status/README.mkdn: -------------------------------------------------------------------------------- 1 | apc_status 2 | =============== 3 | 4 | python module for ganglia 3.1. 5 | 6 | "apc_status" sends metrics on Another PHP Cache process status refering to 7 | apc-json.php. 8 | 9 | To use this you will need to copy apc-json.php to your webdir. 10 | 11 | ## AUTHOR 12 | 13 | Jacob V. Rasmussen 14 | -------------------------------------------------------------------------------- /system/mem_fragmentation/conf.d/mem_fragmentation.pyconf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "mem_fragmentation" 4 | language = "python" 5 | } 6 | } 7 | 8 | collection_group { 9 | collect_every = 15 10 | time_threshold = 30 11 | 12 | metric { 13 | name_match = "buddy_(.+)" 14 | value_threshold = 1.0 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /scribe/conf.d/scribe_stats.pyconf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "scribe_stats" 4 | language = "python" 5 | } 6 | } 7 | 8 | collection_group { 9 | 10 | collect_every = 20 11 | time_threshold = 90 12 | 13 | metric { 14 | name = "scribe_overall_messages_per_second" 15 | title = "avg messages/second" 16 | value_threshold = 0 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /diskfree/README.mkdn: -------------------------------------------------------------------------------- 1 | diskfree 2 | =============== 3 | 4 | Python module for ganglia 3.1. 5 | 6 | This module reads a list of mountpoints from the "mounts" parameter (probably 7 | /proc/mounts) and creates a "disk_free_(absolute|percent)_*" metric for each 8 | mountpoint it finds. 9 | 10 | ## AUTHOR 11 | 12 | Author: Michael T. Conigliaro <mike [at] conigliaro [dot] org> 13 | -------------------------------------------------------------------------------- /diskfree/conf.d/diskfree.pyconf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "diskfree" 4 | language = "python" 5 | param mounts { 6 | value = '/proc/mounts' 7 | } 8 | } 9 | } 10 | 11 | collection_group { 12 | collect_every = 60 13 | time_threshold = 180 14 | metric { 15 | name_match = "disk_free_(.+)" 16 | } 17 | 18 | } 19 | 20 | -------------------------------------------------------------------------------- /blueeyes_service/README.mkdn: -------------------------------------------------------------------------------- 1 | blueeyes_service 2 | =============== 3 | 4 | Python module for ganglia 3.1. 5 | 6 | This module parses health statistics from a BlueEyes service and creates 7 | "blueeyes_*" metrics: 8 | 9 | * DELETE/GET/POST/PUT requests per second 10 | * DELETE/GET/POST/PUT errors per second 11 | 12 | ## AUTHOR 13 | 14 | Author: Michael T. Conigliaro <mike [at] conigliaro [dot] org> 15 | -------------------------------------------------------------------------------- /netapp_api/conf.d/netapp_api.pyconf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "netapp_api" 4 | language = "python" 5 | } 6 | } 7 | #/* Collection groups for the 8 | # example python module */ 9 | collection_group { 10 | collect_every = 15 11 | time_threshold = 70 12 | metric { 13 | name_match = "(.+)latency" 14 | } 15 | metric { 16 | name_match = "(.+)ops" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /diskstat/conf.d/diskstat.pyconf: -------------------------------------------------------------------------------- 1 | # 2 | 3 | modules { 4 | module { 5 | name = 'diskstat' 6 | language = 'python' 7 | 8 | param devices { 9 | value = 'sda' 10 | } 11 | 12 | #param device-mapper { 13 | # value = 'true' 14 | #} 15 | } 16 | } 17 | 18 | collection_group { 19 | collect_every = 30 20 | time_threshold = 30 21 | 22 | metric { 23 | name_match = "diskstat_(.+)" 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /varnish/README.mkdn: -------------------------------------------------------------------------------- 1 | varnish 2 | =============== 3 | 4 | Python module for ganglia 3.1. 5 | 6 | This module parses output from the varnishstat command and creates "varnish_*" 7 | metrics: 8 | 9 | * Client Requests per second 10 | * Backend Requests per second 11 | * Cache Hit Ratio 12 | * Objects in Cache 13 | * Allocated Storage 14 | * Worker Threads 15 | 16 | ## AUTHOR 17 | 18 | Author: Michael T. Conigliaro <mike [at] conigliaro [dot] org> 19 | -------------------------------------------------------------------------------- /celery/conf.d/celery.pyconf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "ganglia_celery" 4 | language = "python" 5 | # Don't forget the trailing slash on the URL 6 | param url { 7 | value = "http://localhost:10000/api/worker/" 8 | } 9 | 10 | } 11 | } 12 | 13 | collection_group { 14 | collect_every = 30 15 | time_threshold = 60 16 | 17 | metric { 18 | name_match = "celery_(.+)" 19 | value_threshold = 0.0 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /elasticsearch/README.mkdn: -------------------------------------------------------------------------------- 1 | elasticsearch 2 | =============== 3 | 4 | python module for ganglia 3.1. 5 | 6 | "elasticsearch" sends metrics on ElasticSearch nodes using the stats api 7 | 8 | http://(node-ip):9200/_cluster/nodes/(node-ip)/stats 9 | 10 | This module requires that jsonpath python module be installed on the machine. 11 | 12 | 13 | ## AUTHORS 14 | 15 | Jeremy Carroll 16 | Matt Radtke 17 | Dave Rawks 18 | -------------------------------------------------------------------------------- /xenstats/README.mkdn: -------------------------------------------------------------------------------- 1 | xenstats 2 | =============== 3 | 4 | Python module for ganglia 3.1. 5 | 6 | This module parses output from the xenserver command and creates "xen_*" 7 | metrics: 8 | 9 | * xen_vms - VMs Running 10 | * xen_mem - Xen Memory availability 11 | * xen_cpu - Number of CPUs 12 | * xen_mem_use - Memory usage 13 | 14 | ## DEPENDS 15 | Python Libvirt 16 | libvirtd Daemon 17 | 18 | ## AUTHOR 19 | 20 | Author: Marcos M. Amorim <marcosmamorim@gmail.com> 21 | 22 | -------------------------------------------------------------------------------- /tokyo_tyrant/README.mkdn: -------------------------------------------------------------------------------- 1 | tokyo_tyrant 2 | =============== 3 | 4 | Python module for ganglia 3.1. 5 | 6 | This module parses output from the tcrmgr command and creates "tokyo_tyrant_*" 7 | metrics: 8 | 9 | * Record number 10 | * File size 11 | * Replication delay 12 | * Put operations / missed per second 13 | * Out operations / missed per second 14 | * Get operations / missed per second 15 | 16 | ## AUTHOR 17 | 18 | Author: Michael T. Conigliaro <mike [at] conigliaro [dot] org> 19 | -------------------------------------------------------------------------------- /system/hwmon/README.mkdn: -------------------------------------------------------------------------------- 1 | hwmon 2 | ===== 3 | 4 | Python module for ganglia 3.1. 5 | 6 | This module collects system temperature data (and anything else) 7 | from the devices in `/sys/class/hwmon`. 8 | 9 | Install 10 | ======= 11 | 12 | 1. Copy `hwmon.py` to your python modules directory (often `/usr/lib/ganglia/python_modules`). 13 | 2. Copy `hwmon.pyconf` to your ganglia config directory (often `/etc/ganglia/conf.d`). 14 | 3. Restart gmond. 15 | 16 | ## AUTHOR 17 | 18 | Author: Adam Compton 19 | -------------------------------------------------------------------------------- /system/mem_fragmentation/README.mkdn: -------------------------------------------------------------------------------- 1 | mem_stats 2 | =============== 3 | 4 | Python module for ganglia 3.1+. 5 | 6 | This module allows you to collect buddy info from 7 | 8 | /proc/buddyinfo 9 | 10 | 11 | Install 12 | =============== 13 | 14 | Copy mem_fragmentation.py from python_modules to your python modules directory e.g. 15 | 16 | /usr/lib64/ganglia/python_modules 17 | 18 | and mem_fragmentation.pyconf to 19 | 20 | /etc/ganglia/conf.d/ 21 | 22 | Restart Gmond and you are done. 23 | 24 | ## AUTHOR 25 | 26 | Author: Vladimir Vuksan https://github.com/vvuksan 27 | -------------------------------------------------------------------------------- /nfsstats/README.mkdn: -------------------------------------------------------------------------------- 1 | nfsstats 2 | ======== 3 | 4 | Python module for ganglia 3.1. 5 | 6 | This module reads NFS client and server statistics out of /proc and 7 | creates a nfs_v3_* and nfsd_v3_* metric for each. 8 | 9 | Originally based on Vladimir Vuksan's perl scripts, this version differs 10 | in the following significant respects: 11 | 12 | 1) it is written as a python plugin 13 | 2) the code is structured in a way intended to make it easy to repurpose 14 | the code for extracting other information out of /proc 15 | 16 | ## AUTHOR 17 | 18 | Author: Alexis Huxley <ahuxley [at] gmx [dot] net> 19 | -------------------------------------------------------------------------------- /network/netiron/netiron.pyconf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "netiron" 4 | language = "python" 5 | param netiron_1 { 6 | # ip:hostname 7 | value = '192.168.1.1:switch1' 8 | } 9 | #param netiron_2 { 10 | # value = '192.168.1.2:switch2' 11 | #} 12 | } 13 | } 14 | #/* Collection groups for the 15 | # example python module */ 16 | collection_group { 17 | collect_every = 20 18 | time_threshold = 50 19 | metric { 20 | name_match = "(.+)in" 21 | } 22 | metric { 23 | name_match = "(.+)out" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /fibrechannel/fibrechannel.pyconf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "fibrechannel" 4 | language = "python" 5 | param switch_1 { 6 | # ip:hostname 7 | value = '192.168.1.1:switch1' 8 | } 9 | #param switch_2 { 10 | # value = '192.168.1.2:switch2' 11 | #} 12 | } 13 | } 14 | #/* Collection groups for the 15 | # example python module */ 16 | collection_group { 17 | collect_every = 20 18 | time_threshold = 50 19 | metric { 20 | name_match = "(.+)in" 21 | } 22 | metric { 23 | name_match = "(.+)out" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | This is the official repository for hosting all user-contributed Gmond Python DSO metric modules. 2 | 3 | To have your modules added here, please fork the repository, create separate sub-directories for each module 4 | and submit a pull request. 5 | 6 | If you have any questions, you could reach us at: 7 | 8 | ganglia-developers@lists.sourceforge.net 9 | 10 | (subscription required: http://lists.sourceforge.net/lists/listinfo/ganglia-developers) 11 | 12 | Alternatively, you could join our IRC channel on irc.freenode.net #ganglia and 13 | ping one of the developers. 14 | 15 | Thank you for your contribution! 16 | 17 | -- Ganglia Development Team 18 | -------------------------------------------------------------------------------- /diskpart/conf.d/diskpart.conf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "diskpart" 4 | language = "python" 5 | } 6 | } 7 | 8 | collection_group { 9 | collect_every = 20 10 | time_threshold = 90 11 | 12 | metric { 13 | name = "diskpart-root-total" 14 | title = "total partition space: root" 15 | } 16 | metric { 17 | name = "diskpart-root-used" 18 | title = "partition space used: root" 19 | } 20 | metric { 21 | name = "diskpart-root-inode-total" 22 | title = "total number of inode: root" 23 | } 24 | metric { 25 | name = "diskpart-root-inode-used" 26 | title = "number of inode used: root" 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /xenstats/conf.d/xenstats.pyconf: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /procstat/conf.d/procstat.pyconf: -------------------------------------------------------------------------------- 1 | # 2 | 3 | modules { 4 | module { 5 | name = 'procstat' 6 | language = 'python' 7 | 8 | param httpd { 9 | value = '/var/run/httpd.pid' 10 | } 11 | 12 | param mysqld { 13 | value = '/\/usr\/libexec\/mysqld/' 14 | } 15 | 16 | param splunk { 17 | value = '/splunkd.*start/' 18 | } 19 | 20 | param splunk-web { 21 | value = '/twistd.*SplunkWeb/' 22 | } 23 | } 24 | } 25 | 26 | collection_group { 27 | collect_every = 30 28 | time_threshold = 30 29 | 30 | metric { 31 | name_match = "procstat_(.+)_cpu" 32 | } 33 | 34 | metric { 35 | name_match = "procstat_(.+)_mem" 36 | } 37 | } 38 | 39 | -------------------------------------------------------------------------------- /system/cpu_stats/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 | metric { 12 | name = "procs_blocked" 13 | title = "Processes blocked" 14 | value_threshold = 0.0 15 | } 16 | 17 | metric { 18 | name = "procs_created" 19 | title = "Processes/Threads created" 20 | value_threshold = 0.0 21 | } 22 | 23 | metric { 24 | name_match = "softirq_(.+)" 25 | value_threshold = 1.0 26 | } 27 | 28 | metric { 29 | name_match = "cpu_(.+)" 30 | value_threshold = 1.0 31 | } 32 | 33 | 34 | 35 | } 36 | -------------------------------------------------------------------------------- /system/vm_stats/conf.d/vm_stats.basic.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 | value_threshold = 1.0 15 | } 16 | 17 | metric { 18 | name = "vm_pgmajfault" 19 | value_threshold = 1.0 20 | } 21 | 22 | metric { 23 | name = "vm_pgpgin" 24 | value_threshold = 1.0 25 | } 26 | 27 | metric { 28 | name = "vm_pgpgout" 29 | value_threshold = 1.0 30 | } 31 | 32 | metric { 33 | name = "vm_nr_written" 34 | value_threshold = 1.0 35 | } 36 | 37 | 38 | } 39 | -------------------------------------------------------------------------------- /network/netiron/README: -------------------------------------------------------------------------------- 1 | This is gmond python module that allows SNMP polling of network switches to get interface packet and throughput metrics. 2 | 3 | * It works for Foundry NetIrons, and probably for any other SNMP enabled switch. 4 | * It requires pysnmp (available in debian repositorys) 5 | * Handles polling multiple switches from a single gmond. 6 | * Spoofs the switch hostname, so each switch shows up separately in ganglia 7 | 8 | If you're handling a large number of metrics, you may wish to set your sysctl settings as below: 9 | 10 | net.core.rmem_max=104857600 11 | net.core.rmem_default=104857600 12 | vm.dirty_ratio=100 13 | vm.dirty_background_ratio=100 14 | vm.dirty_expire_centisecs=720000 15 | 16 | -------------------------------------------------------------------------------- /rabbit/conf.d/rabbitmq.pyconf: -------------------------------------------------------------------------------- 1 | # 2 | 3 | modules { 4 | module { 5 | name = "rabbitmq" 6 | language = "python" 7 | 8 | param metric_group { 9 | value = "rabbitmq" 10 | } 11 | param host { 12 | value = "localhost" 13 | } 14 | 15 | param vhost { 16 | value = "/,vhost1,vhost2" 17 | } 18 | param username { 19 | value = "guest" 20 | } 21 | param password { 22 | value = "guest" 23 | } 24 | param port { 25 | value = "15672" 26 | } 27 | 28 | param metric_group { 29 | value = "rmq" 30 | } 31 | 32 | } 33 | } 34 | 35 | collection_group { 36 | collect_every = 30 37 | time_threshold = 60 38 | 39 | metric { 40 | name_match = "rmq_(.+)" 41 | } 42 | } 43 | 44 | -------------------------------------------------------------------------------- /celery/README.md: -------------------------------------------------------------------------------- 1 | celery 2 | =============== 3 | 4 | Python module for ganglia 3.1. 5 | 6 | This module allows you to collect from Celery Distributed Task Queue 7 | from http://docs.celeryproject.org. 8 | 9 | Prerequisite 10 | ============ 11 | 12 | Make sure Celery exposes it's API over HTTP e.g. 13 | 14 | curl http://localhost:8989/api/worker/ 15 | 16 | or similar needs to succeed for this module to work. 17 | 18 | 19 | Install 20 | =============== 21 | 22 | Copy ganglia_celery.py from python_modules to your python modules directory e.g. 23 | 24 | /usr/lib64/ganglia/python_modules 25 | 26 | and celery.pyconf to 27 | 28 | /etc/ganglia/conf.d/ 29 | 30 | Restart Gmond and you are done. 31 | 32 | ## AUTHOR 33 | 34 | Author: Vladimir Vuksan https://github.com/vvuksan 35 | -------------------------------------------------------------------------------- /network/netstats/conf.d/netstats.pyconf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "netstats" 4 | language = "python" 5 | } 6 | } 7 | 8 | collection_group { 9 | collect_every = 15 10 | time_threshold = 45 11 | 12 | metric { 13 | name_match = "tcpext_(.+)" 14 | value_threshold = 1.0 15 | } 16 | metric { 17 | name_match = "tcp_(.+)" 18 | value_threshold = 1.0 19 | } 20 | metric { 21 | name_match = "udp_(.+)" 22 | value_threshold = 1.0 23 | } 24 | metric { 25 | name_match = "ip_(.+)" 26 | value_threshold = 1.0 27 | } 28 | metric { 29 | name_match = "icmpmsg_(.+)" 30 | value_threshold = 1.0 31 | } 32 | 33 | metric { 34 | name_match = "icmp_(.+)" 35 | value_threshold = 1.0 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /riak/README.mkdn: -------------------------------------------------------------------------------- 1 | riak 2 | =============== 3 | 4 | a python module for ganglia 3.1. 5 | 6 | [Riak](https://wiki.basho.com/display/RIAK/Riak) is a Dynamo-inspired 7 | key/value store. 8 | 9 | This module collects metrics from the JSON stats interface of riak, available 10 | at http://localhost:8098/stats. The statistics-aggregator must be enabled in 11 | your riak configuration for this to work: 12 | 13 | {riak_kv, [ 14 | 15 | %% ... 16 | 17 | {riak_kv_stat, true}, 18 | 19 | %% ... 20 | 21 | ]}, 22 | 23 | You'll want to edit the url key in riak.conf to point at the interface your 24 | riak install is listening on: 25 | 26 | param url { 27 | value = "http://10.0.1.123:8098/stats" 28 | } 29 | 30 | 31 | ## AUTHOR 32 | 33 | Jesse Newland 34 | 35 | -------------------------------------------------------------------------------- /system/vm_stats/README.mkdn: -------------------------------------------------------------------------------- 1 | vm_stats 2 | =============== 3 | 4 | Python module for ganglia 3.1. 5 | 6 | This module allows you to collect VM metrics. 7 | are values that are collected from 8 | 9 | /proc/vmstat 10 | 11 | 12 | Install 13 | =============== 14 | 15 | Copy vm_stats.py from python_modules to your python modules directory e.g. 16 | 17 | /usr/lib64/ganglia/python_modules 18 | 19 | and vm_stats.pyconf to 20 | 21 | /etc/ganglia/conf.d/ 22 | 23 | If you would like only specific metrics emitted you will need to comment out the name_match section 24 | 25 | metric { 26 | name = "vm_numa_interleave" 27 | title = "NUMA interleave" 28 | value_threshold = 1.0 29 | } 30 | 31 | Restart Gmond and you are done. 32 | 33 | ## AUTHOR 34 | 35 | Author: Vladimir Vuksan https://github.com/vvuksan 36 | -------------------------------------------------------------------------------- /blueeyes_service/conf.d/blueeyes_service.conf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "blueeyes_service_example_v1" 4 | language = "python" 5 | param service_name { 6 | value = "example" 7 | } 8 | param service_version { 9 | value = "v1" 10 | } 11 | param stats_command { 12 | value = "curl --silent http://localhost/blueeyes/services/example/v1/health" 13 | } 14 | } 15 | } 16 | 17 | collection_group { 18 | collect_every = 30 19 | time_threshold = 90 20 | 21 | metric { 22 | name = "blueeyes_service_example_v1_requests" 23 | title = "Requests per Second" 24 | } 25 | metric { 26 | name = "blueeyes_service_example_v1_errors" 27 | title = "Errors per Second" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /network/netstats/README.mkdn: -------------------------------------------------------------------------------- 1 | netstats 2 | =============== 3 | 4 | Python module for ganglia 3.1. 5 | 6 | This module allows you to collect network stats. These values that are collected from 7 | 8 | /proc/net/netstat 9 | 10 | 11 | Install 12 | =============== 13 | 14 | Copy netstats.py from python_modules to your python modules directory e.g. 15 | 16 | /usr/lib64/ganglia/python_modules 17 | 18 | and netstats.pyconf to 19 | 20 | /etc/ganglia/conf.d/ 21 | 22 | If you would like only specific metrics emitted you will need to comment out the name_match section 23 | 24 | metric { 25 | name = "vm_numa_interleave" 26 | title = "NUMA interleave" 27 | value_threshold = 1.0 28 | } 29 | 30 | Restart Gmond and you are done. 31 | 32 | ## AUTHOR 33 | 34 | Author: Vladimir Vuksan https://github.com/vvuksan 35 | -------------------------------------------------------------------------------- /passenger/README.mkdn: -------------------------------------------------------------------------------- 1 | passenger 2 | =============== 3 | 4 | a python module for ganglia 3.1. 5 | 6 | [Passenger](http://www.modrails.com/) is a Ruby on Rails / Rack Application server. 7 | 8 | This module collects metrics from the passenger-status command, including: 9 | 10 | * Active Processes 11 | * Idle Processes 12 | * Global Queue Depth 13 | * Max Pool Size 14 | 15 | ## Installation 16 | 17 | Metrics are collected using the `passenger-status` and 18 | `passenger-memory-stats` commands via `sudo`. Assuming the `ganglia` user is 19 | running your gmond process, you'll have to add this to sudoers: 20 | 21 | Cmnd_Alias STATS = /usr/bin/passenger-status, \ 22 | /usr/bin/passenger-memory-stats 23 | 24 | ganglia ALL=(ALL) NOPASSWD: STATS 25 | 26 | ## AUTHOR 27 | 28 | Jesse Newland 29 | 30 | -------------------------------------------------------------------------------- /elasticsearch/conf.d/elasticsearch.pyconf: -------------------------------------------------------------------------------- 1 | # 2 | 3 | modules { 4 | module { 5 | name = "elasticsearch" 6 | language = "python" 7 | 8 | param metric_group { 9 | value = "elasticsearch" 10 | } 11 | 12 | param host { 13 | value = "http://localhost:9200/" 14 | } 15 | 16 | # In order to get index specific stats specify each index seperated by 17 | # whitespace. 18 | # 19 | # indices can be grouped by using comma, 20 | # e.g. index3,index4 will give statistics (docs_count, etc.) for both 21 | # index1 and index2 22 | param indices { 23 | value = "*" 24 | # value = "index1 index2 index3,index4" 25 | } 26 | } 27 | } 28 | 29 | collection_group { 30 | collect_every = 30 31 | time_threshold = 60 32 | 33 | metric { 34 | name_match = "es_(.+)" 35 | } 36 | } 37 | 38 | -------------------------------------------------------------------------------- /beanstalk/README.mkdn: -------------------------------------------------------------------------------- 1 | beanstalk 2 | =============== 3 | 4 | python module for ganglia 3.1. 5 | 6 | *NOTE*: [beanstalkc](https://github.com/earl/beanstalkc/) *must* be in your python path. 7 | 8 | This module connects to a [beanstalkd](http://kr.github.com/beanstalkd/) instance and grabs some metrics: 9 | 10 | * current-connections 11 | * total-jobs 12 | * current-jobs-ready 13 | * current-jobs-buried 14 | * current-jobs-delayed 15 | * current-waiting 16 | * job-timeouts 17 | * cmd-bury 18 | 19 | In addition it grabs the following metrics about individual tubes: 20 | 21 | * total-jobs 22 | * current-watching 23 | * current-jobs-buried 24 | * current-jobs-ready 25 | * current-waiting 26 | 27 | It should be fairly easy to add a custom metric 28 | 29 | ## AUTHOR 30 | 31 | [Stephen Holiday](http://stephenholiday.com) -------------------------------------------------------------------------------- /multi_nginx_status/conf.d/multi_nginx_status.pyconf: -------------------------------------------------------------------------------- 1 | # 2 | 3 | modules { 4 | module { 5 | name = 'multi_nginx_status' 6 | language = 'python' 7 | 8 | param server_1 { 9 | value = 'nginxserver1:8081' 10 | } 11 | param server_2 { 12 | value = 'nginxserver2:8081' 13 | } 14 | } 15 | } 16 | 17 | 18 | collection_group { 19 | collect_every = 10 20 | time_threshold = 20 21 | 22 | metric { 23 | name_match = "(.+)activeConn" 24 | } 25 | 26 | metric { 27 | name_match = "(.+)accepts" 28 | } 29 | metric { 30 | name_match = "(.+)handled" 31 | } 32 | metric { 33 | name_match = "(.+)requests" 34 | } 35 | metric { 36 | name_match = "(.+)reading" 37 | } 38 | metric { 39 | name_match = "(.+)writing" 40 | } 41 | metric { 42 | name_match = "(.+)waiting" 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /apache_status/README.mkdn: -------------------------------------------------------------------------------- 1 | apache_status 2 | =============== 3 | 4 | python module for ganglia 3.1. 5 | 6 | "apache_status" sends metrics on Apache process status refering to 7 | server-status(mod_status.so). 8 | 9 | To use this you will need to enable mod_status in Apache. For example you 10 | add following to your Apache config. 11 | 12 | Listen 8001 13 | 14 | ServerName health.site 15 | 16 | SetHandler server-status 17 | Order deny,allow 18 | Deny from all 19 | Allow from 127.0.0.1 20 | 21 | 22 | 23 | Restart Apache. Now you should be able to hit 24 | 25 | http://localhost:8001/server-status 26 | 27 | on the box and get a web page with Apache status. 28 | 29 | 30 | ## AUTHOR 31 | 32 | HIROSE Masaaki 33 | 34 | Modified by Vladimir Vuksan -------------------------------------------------------------------------------- /system/cpu_stats/README.mkdn: -------------------------------------------------------------------------------- 1 | cpu_stats 2 | =============== 3 | 4 | Python module for ganglia 3.1. 5 | 6 | This module allows you to collect CPU stats that have been left out of stock 7 | Ganglia gmond. 8 | 9 | /proc/meminfo 10 | 11 | 12 | Install 13 | =============== 14 | 15 | Copy cpu_stats.py from python_modules to your python modules directory e.g. 16 | 17 | /usr/lib64/ganglia/python_modules 18 | 19 | and cpu_stats.pyconf to 20 | 21 | /etc/ganglia/conf.d/ 22 | 23 | Restart Gmond and you should be set. If you would like only specific metrics 24 | instead of all replace the name_match stanza with entries like these 25 | 26 | metric { 27 | name = "procs_blocked" 28 | title = "Blocked processes" 29 | value_threshold = 1.0 30 | } 31 | 32 | Restart Gmond and you are done. 33 | 34 | ## AUTHOR 35 | 36 | Author: Vladimir Vuksan https://github.com/vvuksan 37 | -------------------------------------------------------------------------------- /network/conntrack/README.mkdn: -------------------------------------------------------------------------------- 1 | conntrack 2 | =============== 3 | 4 | Python module for ganglia 3.1. 5 | 6 | This module allows you to collect conntrack stats. These values that are collected by 7 | executing 8 | 9 | conntrack -S 10 | 11 | 12 | Install 13 | =============== 14 | 15 | Copy conntrack.py from python_modules to your python modules directory e.g. 16 | 17 | /usr/lib64/ganglia/python_modules 18 | 19 | and conntrack.pyconf to 20 | 21 | /etc/ganglia/conf.d/ 22 | 23 | If you would like only specific metrics emitted you will need to comment out the name_match section 24 | and replace it with a specific set of metrics e.g. 25 | 26 | metric { 27 | name = "conntrack_entries" 28 | title = "Conntrack entries" 29 | value_threshold = 1.0 30 | } 31 | 32 | Restart Gmond and you are done. 33 | 34 | ## AUTHOR 35 | 36 | Author: Vladimir Vuksan https://github.com/vvuksan -------------------------------------------------------------------------------- /elasticsearch/graph.d/es_report.json: -------------------------------------------------------------------------------- 1 | { 2 | "report_name" : "es_report", 3 | "report_type" : "standard", 4 | "title" : "Elasticsearch", 5 | "vertical_label" : "ms", 6 | "series" : [ 7 | { "metric": "es_fetch_time", "color": "BBBBBB", "label": "Fetch", "type": "line" }, 8 | { "metric": "es_get_time", "color": "00FF00", "label": "Get", "line_width": "2", "type": "line" }, 9 | { "metric": "es_flush_time", "color": "FF0000", "label": "Flush", "line_width": "2", "type": "line" }, 10 | { "metric": "es_gc_time", "color": "2030F4", "label": "GC", "line_width": "2", "type": "line" }, 11 | { "metric": "es_indexing_delete_time", "color": "FF30F4", "label": "Indexing Delete", "line_width": "2", "type": "line" }, 12 | { "metric": "es_indexing_index_time", "color": "20FFF4", "label": "Indexing Index", "line_width": "2", "type": "line" } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /system/mem_stats/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 | metric { 12 | name = "mem_writeback" 13 | title = "Mem actively being written to disk" 14 | value_threshold = 1.0 15 | } 16 | metric { 17 | name = "mem_dirty" 18 | title = "Mem waiting to be written to disk" 19 | value_threshold = 1.0 20 | } 21 | 22 | metric { 23 | name = "mem_anonpages" 24 | title = "AnonPages" 25 | value_threshold = 1.0 26 | } 27 | 28 | metric { 29 | name = "mem_mapped" 30 | title = "Memory Mapped" 31 | value_threshold = 1.0 32 | } 33 | 34 | metric { 35 | name = "mem_hardware_corrupted" 36 | title = "Memory HardwareCorrupted" 37 | value_threshold = 1.0 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /gpu/nvidia/nvidia-ml-py-3.295.00/PKG-INFO: -------------------------------------------------------------------------------- 1 | Metadata-Version: 1.0 2 | Name: nvidia-ml-py 3 | Version: 3.295.00 4 | Summary: Python Bindings for the NVIDIA Management Library 5 | Home-page: http://www.nvidia.com/ 6 | Author: NVIDIA Corporation 7 | Author-email: nvml-bindings@nvidia.com 8 | License: BSD 9 | Description: UNKNOWN 10 | Platform: UNKNOWN 11 | Classifier: Development Status :: 5 - Production/Stable 12 | Classifier: Intended Audience :: Developers 13 | Classifier: Intended Audience :: System Administrators 14 | Classifier: License :: OSI Approved :: BSD License 15 | Classifier: Operating System :: Microsoft :: Windows 16 | Classifier: Operating System :: POSIX :: Linux 17 | Classifier: Programming Language :: Python 18 | Classifier: Topic :: Software Development :: Libraries :: Python Modules 19 | Classifier: Topic :: System :: Hardware 20 | Classifier: Topic :: System :: Systems Administration 21 | -------------------------------------------------------------------------------- /netapp_api/README.mkdn: -------------------------------------------------------------------------------- 1 | NetApp Filer API metrics 2 | ======================== 3 | 4 | This is a GMOND Python Module that gathers metrics from NetApp appliances via the Netapp Data ONTAP APIs. 5 | The API allows counter access to many more metrics than available through SNMP. 6 | 7 | This module currently gathers per volume Read/Write/Average IOPs and Latency and handles multiple filers. 8 | 9 | ## DEPENDS 10 | * Netapp Managemability SDK 5.0 (download from now.netapp.com to /opt/netapp) 11 | 12 | ## USAGE 13 | * Save the netapp_api.pyconf into /etc/ganglia/conf.d 14 | * Save the netapp_api.py into your ganglia python module dir eg: /usr/lib/ganglia/python_modules. 15 | * Update the Username, password, IP and filer name. 16 | * Restart gmond and the volume latency & iop metrics should appear in ganglia. 17 | 18 | ## AUTHOR 19 | * Author: Evan Fraser <evan.fraser@trademe.co.nz> 20 | -------------------------------------------------------------------------------- /ipmi/conf.d/ipmi.pyconf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "ipmi" 4 | language = "python" 5 | } 6 | 7 | # If you change this entry make sure you put it under name_match section 8 | param metric_prefix { 9 | value = "ipmi" 10 | } 11 | 12 | # IP of rhe IPMI 13 | param ipmi_ip { 14 | value = "10.1.2.3" 15 | } 16 | 17 | param username { 18 | value = "admin" 19 | } 20 | 21 | param password { 22 | value = "secret" 23 | } 24 | 25 | # Location of timeout binary 26 | param timeout_bin { 27 | value = "/usr/bin/timeout" 28 | } 29 | 30 | # Location of ipmitool binary 31 | param timeout_bin { 32 | value = "/usr/bin/ipmitool" 33 | } 34 | 35 | 36 | } 37 | 38 | collection_group { 39 | collect_every = 60 40 | time_threshold = 90 41 | 42 | metric { 43 | name_match = "ipmi_(.+)" 44 | value_threshold = 1.0 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /nginx_status/README.mkdn: -------------------------------------------------------------------------------- 1 | nginx_status 2 | =============== 3 | 4 | python module for ganglia 3.1. 5 | 6 | "nginx_status" send metrics on nginx's [status stub module](http://wiki.nginx.org/HttpStubStatusModule). 7 | 8 | ## Metrics 9 | * nginx_server_version 10 | * nginx_active_connections 11 | * nginx_accepts 12 | * nginx_handled 13 | * nginx_requests 14 | * nginx_reading 15 | * nginx_writing 16 | * nginx_waiting 17 | 18 | ## Params 19 | * status_url (The url to query for nginx status. Default: 'http://localhost/nginx_status') 20 | * nginx_bin (The full path to the nginx binary. Default '/usr/sbin/nginx') 21 | * refresh_rate (The time in seconds between polling nginx. Default: 15) 22 | 23 | ## NOTES 24 | * This has only been tested on python 2.6.5 on Ubuntu 10.04. 25 | * Ensure that the status stub module is setup correctly when using this module. 26 | 27 | ## AUTHOR 28 | 29 | Patrick Ting 30 | 31 | -------------------------------------------------------------------------------- /squid/README.mkdn: -------------------------------------------------------------------------------- 1 | squid 2 | ======== 3 | 4 | Python module for ganglia 3.1. 5 | 6 | This module uses squidclient to get statistics from a running squid proxy. 7 | It attempts to parse the output into key/value pairs, it will need to be 8 | updated if new metrics are added to squidclient. The metric names are based 9 | on those returned by the squid snmp module, new ones were created with 10 | similar names where there were values in the output that didn't map directly 11 | to existing snmp metrics. 12 | 13 | It has been tested on squid 2.6 and 2.7, I believe it should work on 3.1 14 | as well. 15 | 16 | ## NOTES 17 | The user running gmond will need to have the rights to run 18 | "squidclient mgr:info". 19 | 20 | The python module may be run as a standalone script to see the 21 | metrics that generated when included into gmond. 22 | 23 | ## AUTHOR 24 | 25 | Author: Daniel Rich <drich [at] employees [dot] org> 26 | 27 | -------------------------------------------------------------------------------- /ssl/entropy/README.mkdn: -------------------------------------------------------------------------------- 1 | entropy 2 | =============== 3 | 4 | Python module for ganglia 3.1. 5 | 6 | This module allows you to collect available entropy on your system. Why is 7 | entropy important. 8 | 9 | [http://www.chrissearle.org/node/326] 10 | 11 | There are two random number sources on linux - /dev/random and /dev/urandom. 12 | /dev/random will block if there is nothing left in the entropy bit bucket. 13 | /dev/urandom uses the same bucket - but will not block 14 | (it can reuse the pool of bits). 15 | 16 | Therefore if you are running SSL on the box you want to know this. 17 | 18 | Install 19 | =============== 20 | 21 | Copy entropy.py from python_modules to your python modules directory e.g. 22 | 23 | /usr/lib64/ganglia/python_modules 24 | 25 | and entropy.pyconf to 26 | 27 | /etc/ganglia/conf.d/ 28 | 29 | Restart Gmond and you should be set. 30 | 31 | ## AUTHOR 32 | 33 | Author: Vladimir Vuksan https://github.com/vvuksan 34 | -------------------------------------------------------------------------------- /zeromq_pub/conf.d/zpubmon.pyconf: -------------------------------------------------------------------------------- 1 | # Sample configuration for zpubmon Ganglia module 2 | 3 | modules { 4 | module { 5 | name = "zpubmon" 6 | language = "python" 7 | param groups { 8 | value = "ChangeMe" 9 | } 10 | param server-generated-raw { 11 | value = "tcp://127.0.0.1:8421" 12 | } 13 | param client-generated-raw { 14 | value = "tcp://127.0.0.1:8422" 15 | } 16 | param client-generated-valid { 17 | value = "tcp://127.0.0.1:8484" 18 | } 19 | } 20 | } 21 | 22 | collection_group { 23 | collect_every = 10 24 | time_threshold = 60 25 | metric { 26 | name = "server-generated-raw" 27 | title = "Raw server-generated events" 28 | } 29 | metric { 30 | name = "client-generated-raw" 31 | title = "Raw client-generated events" 32 | } 33 | metric { 34 | name = "client-generated-valid" 35 | title = "Valid client-generated events" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /memcached_maxage/README.md: -------------------------------------------------------------------------------- 1 | python-memcached-gmond 2 | ====================== 3 | 4 | 5 | This is a Python Gmond module for Memcached, compatible with both Python 2 and 6 | 3. In addition to the usual datapoints provided by "stats", this module 7 | aggregates max age metrics from "stats items". All metrics are available in a 8 | "memcached" collection group. 9 | 10 | If you've installed ganglia at the standard locations, you should be able to 11 | install this module by copying `memcached.pyconf` to `/etc/ganglia/conf.d` and 12 | `memcached.py`, `memcached_metrics.py`, and 'every.py' to 13 | `/usr/lib/ganglia/python_modules`. The memcached server's host and port can be 14 | specified in the configuration in memcached.pyconf. 15 | 16 | For more information, see the section [Gmond Python metric modules][1] in the 17 | Ganglia documentation. 18 | 19 | Author: Ori Livneh 20 | 21 | [1]: http://sourceforge.net/apps/trac/ganglia/wiki/ganglia_gmond_python_modules 22 | -------------------------------------------------------------------------------- /jenkins/README.mkdn: -------------------------------------------------------------------------------- 1 | jenkins 2 | ======= 3 | 4 | python module for ganglia 3.1. 5 | 6 | ## Metrics 7 | * Number of total executors 8 | * Number of busy executors 9 | * Length of the queue 10 | * Total number of jobs 11 | * Number of jobs with blue status 12 | * Number of jobs with red status 13 | * Number of jobs with yellow status 14 | * Number of jobs with grey status 15 | * Number of jobs with aborted status 16 | * Number of jobs with not-built status 17 | * Number of jobs with disabled status 18 | 19 | ## Parameters 20 | * base_url (The URL to query for Jenkins statistics. Default: 'http://127.0.0.1:8080' 21 | * username (Your Jenkins username. Default: '' 22 | * apitoken (Your personal Jenkins API token. Default: '' 23 | 24 | ## Notes 25 | * This has been tested with: 26 | - python 2.7.1 on Mac OS X 27 | - python 2.7.3 on Ubuntu 12.04 28 | 29 | ## AUTHORS 30 | 31 | Andreas Lappe 32 | 33 | ## CONTRIBUTORS 34 | 35 | Nils Juenemann 36 | -------------------------------------------------------------------------------- /squid/graph.d/squid_5min_service_report.json: -------------------------------------------------------------------------------- 1 | { 2 | "report_name" : "squid_5min_service_report", 3 | "report_type" : "standard", 4 | "title" : "Squid 5min Service Times", 5 | "vertical_label" : "seconds", 6 | "series" : [ 7 | { "metric" : "squid_cacheDnsSvcTime_5", "color": "3366ff", "label": "DNS", "line_width": "2", "type": "line" }, 8 | { "metric" : "squid_cacheHttpAllSvcTime_5", "color": "cc99ff", "label": "HTTP All", "line_width": "2", "type": "line" }, 9 | { "metric" : "squid_cacheHttpHitSvcTime_5", "color": "ff3366", "label": "HTTP Hit", "line_width": "2", "type": "line" }, 10 | { "metric" : "squid_cacheHttpMissSvcTime_5", "color": "00ff00", "label": "HTTP Miss", "line_width": "2", "type": "line" }, 11 | { "metric" : "squid_cacheHttpNhSvcTime_5", "color": "ff9999", "label": "HTTP Refresh", "line_width": "2", "type": "line" }, 12 | { "metric" : "squid_cacheHttpNmSvcTime_5", "color": "cc0000", "label": "HTTP not-mod", "line_width": "2", "type": "line" } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /mongodb/README.mkdn: -------------------------------------------------------------------------------- 1 | mongodb 2 | =============== 3 | 4 | Python module for ganglia 3.1. 5 | 6 | This module parses output from the db.serverStatus() and rs.status() commands 7 | and creates "mongodb_*" metrics: 8 | 9 | * Inserts per Second 10 | * Queries per Second 11 | * Updates per Second 12 | * Deletes per Second 13 | * Getmores per Second 14 | * Commands per Second 15 | * Flushes per Second 16 | * Memory-mapped Data 17 | * Process Virtual Size 18 | * Process Resident Size 19 | * Page Faults per Second 20 | * Global Write Lock Ratio 21 | * BTree Page Miss Ratio 22 | * Total Operations Waiting for Lock 23 | * Readers Waiting for Lock 24 | * Writers Waiting for Lock 25 | * Total Active Clients 26 | * Active Readers 27 | * Active Writers 28 | * Open Connections 29 | * Open Connections (as a percentage of total available) 30 | * Replica Set Slave Delay 31 | * Asserts per Second 32 | 33 | ## AUTHOR 34 | 35 | Author: Michael T. Conigliaro <mike [at] conigliaro [dot] org> 36 | -------------------------------------------------------------------------------- /squid/graph.d/squid_60min_service_report.json: -------------------------------------------------------------------------------- 1 | { 2 | "report_name" : "squid_60min_service_report", 3 | "report_type" : "standard", 4 | "title" : "Squid 60 min Service Times", 5 | "vertical_label" : "seconds", 6 | "series" : [ 7 | { "metric" : "squid_cacheDnsSvcTime_60", "color": "3366ff", "label": "DNS", "line_width": "2", "type": "line" }, 8 | { "metric" : "squid_cacheHttpAllSvcTime_60", "color": "cc99ff", "label": "HTTP All", "line_width": "2", "type": "line" }, 9 | { "metric" : "squid_cacheHttpHitSvcTime_60", "color": "ff3366", "label": "HTTP Hit", "line_width": "2", "type": "line" }, 10 | { "metric" : "squid_cacheHttpMissSvcTime_60", "color": "00ff00", "label": "HTTP Miss", "line_width": "2", "type": "line" }, 11 | { "metric" : "squid_cacheHttpNhSvcTime_60", "color": "ff9999", "label": "HTTP Refresh", "line_width": "2", "type": "line" }, 12 | { "metric" : "squid_cacheHttpNmSvcTime_60", "color": "cc0000", "label": "HTTP not-mod", "line_width": "2", "type": "line" } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /recoverpoint/README.mkdn: -------------------------------------------------------------------------------- 1 | EMC RecoverPoint 2 | =============== 3 | 4 | This is a GMOND Python Module that gets metrics from EMC RecoverPoint replication appliances. 5 | 6 | Currently gathers: 7 | * Per RPA WAN/SAN traffic and Latency 8 | * Per Consistency Group Write, Data, Time and Journal Lags, as well as WAN and SAN traffic. 9 | * Per Consistency Group Protection Window metrics. 10 | 11 | ## DEPENDS 12 | * python YAML 13 | * paramiko modules 14 | * ssh access to the recoverpoint appliance (paramiko can use ssh keys if required) 15 | 16 | ## USAGE 17 | * Save the recoverpoint.pyconf into /etc/ganglia/conf.d directory and update the management IP and sitenames (the sitenames have been lowercase'd) 18 | * Save the recoverpoint.py into your ganglia python module dir eg: /usr/lib/ganglia/python_modules. Update the username/passwords if necessary. 19 | * Restart gmond and a "recoverpoint" host should appear in ganglia. 20 | 21 | ## AUTHOR 22 | 23 | Author: Evan Fraser <evan.fraser@trademe.co.nz> 24 | -------------------------------------------------------------------------------- /openstack_monitor/conf.d/compute-metrics.pyconf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "compute-metrics" 4 | language = "python" 5 | } 6 | } 7 | 8 | collection_group { 9 | collect_every = 60 10 | time_threshold = 90 11 | 12 | metric { 13 | name = "nova_compute_instance_count" 14 | title = "Openstack Instance Count" 15 | value_threshold = 0 16 | } 17 | 18 | metric { 19 | name = "openstack_version" 20 | title = "Openstack Version" 21 | } 22 | 23 | metric { 24 | name = "nova_compute_is_running" 25 | title = "Openstack Nova compute is running" 26 | } 27 | 28 | metric { 29 | name = "nova_compute_driver" 30 | title = "Openstack Nova compute driver" 31 | } 32 | 33 | metric { 34 | name = "nova_running_services" 35 | title = "Openstack Nova running services" 36 | value_threshold = 0 37 | } 38 | 39 | metric { 40 | name = "nova_registered_services" 41 | title = "Openstacl Nova Registered services" 42 | value_threshold = 0 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /multi_nginx_status/README.mkdn: -------------------------------------------------------------------------------- 1 | multi_nginx_status 2 | =============== 3 | 4 | python module for ganglia 3.1. 5 | 6 | "multi_nginx_status" gathers metrics from remote nginx status pages, handles multiple nginx servers from a single gmond. [status stub module](http://wiki.nginx.org/HttpStubStatusModule). 7 | 8 | 9 | ## Metrics 10 | * nginx_active_connections 11 | * nginx_accepts 12 | * nginx_handled 13 | * nginx_requests 14 | * nginx_reading 15 | * nginx_writing 16 | * nginx_waiting 17 | 18 | ## Params 19 | * server_# (nginxhostname:statusportnumber) 20 | 21 | ## NOTES 22 | * Ensure that the status stub module is setup correctly when using this module. 23 | * Save the multi_nginx_status.pyconf file into /etc/ganglia/conf.d/ and update it with your nginx servers hostname and nginx_status port number 24 | * Save the multi_nginx_status.py file into your gmond python module dir (eg: /usr/lib/ganglia/python_modules) 25 | 26 | ## AUTHOR 27 | Evan Fraser 28 | Reused code from Patrick Ting's nginx_status module 29 | -------------------------------------------------------------------------------- /kumofs/conf.d/kumofs.conf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "kumofs" 4 | language = "python" 5 | 6 | param host { 7 | value = "localhost" 8 | } 9 | param port { 10 | value = 19800 11 | } 12 | 13 | param refresh_rate { 14 | value = 20 15 | } 16 | # param spoof_host { 17 | # value = "IPADDRESS:HOSTNAME" 18 | # } 19 | 20 | } 21 | } 22 | 23 | collection_group { 24 | collect_every = 30 25 | time_threshold = 90 26 | 27 | metric { 28 | name = "kumofs_curr_items" 29 | title = "Current number of items stored" 30 | value_threshold = 0 31 | } 32 | metric { 33 | name = "kumofs_cmd_get" 34 | title = "Cumulative number of retrieval reqs" 35 | value_threshold = 0 36 | } 37 | metric { 38 | name = "kumofs_cmd_set" 39 | title = "Cumulative number of storage reqs" 40 | value_threshold = 0 41 | } 42 | metric { 43 | name = "kumofs_cmd_delete" 44 | title = "Cumulative number of storage reqs" 45 | value_threshold = 0 46 | } 47 | 48 | } 49 | 50 | -------------------------------------------------------------------------------- /redis-gmond/conf.d/redis-gmond.pyconf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "redis-gmond" 4 | language = "python" 5 | param host { value = "127.0.0.1" } 6 | param port { value = 6379 } 7 | /* param auth { value = "passwordhere" } */ 8 | } 9 | } 10 | collection_group { 11 | collect_every = 10 12 | time_threshold = 60 13 | metric { name = "connected_clients" } 14 | metric { name = "connected_slaves" } 15 | metric { name = "blocked_clients" } 16 | metric { name = "used_memory" } 17 | metric { name = "rdb_changes_since_last_save" } 18 | metric { name = "rdb_bgsave_in_progress" } 19 | metric { name = "master_sync_in_progress" } 20 | metric { name = "master_link_status" } 21 | metric { name = "total_connections_received" } 22 | metric { name = "instantaneous_ops_per_sec" } 23 | metric { name = "total_commands_processed" } 24 | metric { name = "expired_keys" } 25 | metric { name = "pubsub_channels" } 26 | metric { name = "pubsub_patterns" } 27 | metric { name = "master_last_io_seconds_ago" } 28 | metric { name = "db0" } 29 | } 30 | 31 | 32 | -------------------------------------------------------------------------------- /system/mem_stats/README.mkdn: -------------------------------------------------------------------------------- 1 | mem_stats 2 | =============== 3 | 4 | Python module for ganglia 3.1. 5 | 6 | This module allows you to collect memory metrics that have been left out of stock 7 | Ganglia gmond. For example I have it memory dirty and memory writeback. These 8 | are values that are collected from 9 | 10 | /proc/meminfo 11 | 12 | 13 | Install 14 | =============== 15 | 16 | Copy mem_stats.py from python_modules to your python modules directory e.g. 17 | 18 | /usr/lib64/ganglia/python_modules 19 | 20 | and mem_stats.pyconf to 21 | 22 | /etc/ganglia/conf.d/ 23 | 24 | Restart Gmond and you should be set. If you would like additional memory stats collected 25 | look through mem_stats.py for the metric you want then add it to mem_stats.pyconf e.g. 26 | if you wanted to keep track of unevictable memory you would add 27 | 28 | metric { 29 | name = "mem_unevictable" 30 | title = "Unevictable memory" 31 | value_threshold = 1.0 32 | } 33 | 34 | Restart Gmond and you are done. 35 | 36 | ## AUTHOR 37 | 38 | Author: Vladimir Vuksan https://github.com/vvuksan 39 | -------------------------------------------------------------------------------- /mysqld/graph.d/mysql_traffic_report.php: -------------------------------------------------------------------------------- 1 | 24 | 25 | ## AUTHOR 26 | 27 | HIROSE Masaaki 28 | 29 | -------------------------------------------------------------------------------- /ssl/entropy/python_modules/entropy.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | 4 | entropy_file = "/proc/sys/kernel/random/entropy_avail" 5 | 6 | def metrics_handler(name): 7 | try: 8 | f = open(entropy_file, 'r') 9 | 10 | except IOError: 11 | return 0 12 | 13 | for l in f: 14 | line = l 15 | 16 | return int(line) 17 | 18 | def metric_init(params): 19 | global descriptors, node_id 20 | 21 | dict = {'name': 'entropy_avail', 22 | 'call_back': metrics_handler, 23 | 'time_max': 90, 24 | 'value_type': 'uint', 25 | 'units': 'bits', 26 | 'slope': 'both', 27 | 'format': '%u', 28 | 'description': 'Entropy Available', 29 | 'groups': 'ssl'} 30 | 31 | descriptors = [dict] 32 | 33 | return descriptors 34 | 35 | def metric_cleanup(): 36 | '''Clean up the metric module.''' 37 | pass 38 | 39 | #This code is for debugging and unit testing 40 | if __name__ == '__main__': 41 | metric_init({}) 42 | for d in descriptors: 43 | v = d['call_back'](d['name']) 44 | print 'value for %s is %u' % (d['name'], v) -------------------------------------------------------------------------------- /jmxsh/graph.d/jmx_sessions_report.php: -------------------------------------------------------------------------------- 1 | 41 | -------------------------------------------------------------------------------- /diskstat/README.mkdn: -------------------------------------------------------------------------------- 1 | diskstat 2 | =============== 3 | 4 | python module for ganglia 3.1. 5 | 6 | "diskstat" report disk stat metrics to ganglia. 7 | 8 | This module can monitor multiple disk block devices including specific partitions instead of the entire device. 9 | 10 | ## Metrics 11 | * diskstat_XXX_io_time 12 | * diskstat_XXX_read_kbytes_per_sec 13 | * diskstat_XXX_read_time 14 | * diskstat_XXX_reads 15 | * diskstat_XXX_reads_merged 16 | * diskstat_XXX_weighted_io_time 17 | * diskstat_XXX_write_kbytes_per_sec 18 | * diskstat_XXX_write_time 19 | * diskstat_XXX_writes 20 | * diskstat_XXX_writes_merged 21 | 22 | ## Params 23 | * devices (The disk block device(s) to monitor. Example: "sda1 sda2") 24 | 25 | ## NOTES 26 | This module has the option of explicitly setting which devices 27 | to check using the "devices" option in your configuration. You 28 | can monitor specific partitions instead of the entire device. 29 | Example value: "sda1 sda2". 30 | Example value: "sda sdb sdc". 31 | 32 | ## Example Graphs 33 | * Available in the examples directory. 34 | 35 | ## AUTHOR 36 | 37 | Jamie Isaacs 38 | -------------------------------------------------------------------------------- /fibrechannel/README.mkdn: -------------------------------------------------------------------------------- 1 | Brocade FibreChannel 2 | This is gmond python module that allows SNMP polling of Fibrechannel switches to get interface packet and throughput metrics. 3 | 4 | * It works for Brocade FC switches, and probably for any other SNMP enabled switch. 5 | * It requires pysnmp (available in debian repositorys) 6 | * Handles polling multiple switches from a single gmond. 7 | * Spoofs the switch hostname, so each switch shows up separately in ganglia 8 | 9 | ## DEPENDS 10 | * python pysnmp 11 | 12 | ## USAGE 13 | * Save the fibrechannel.pyconf into directory and update the switch(s) name & IP's 14 | * Save the fibrechannel.py into your ganglia python module dir eg: /usr/lib/ganglia/python_modules 15 | * Update SNMP community / ports if necessary 16 | * If FC metrics aren't appearing, increase your net.core.rmem_max and default settings as below: 17 | 18 | net.core.rmem_max=104857600 19 | 20 | net.core.rmem_default=104857600 21 | 22 | vm.dirty_ratio=100 23 | 24 | vm.dirty_background_ratio=100 25 | 26 | vm.dirty_expire_centisecs=720000 27 | 28 | ## AUTHOR 29 | 30 | Author: Evan Fraser <evan.fraser@trademe.co.nz> 31 | 32 | -------------------------------------------------------------------------------- /mysqld/graph.d/mysql_qcache_hitrate_report.php: -------------------------------------------------------------------------------- 1 | 42 | -------------------------------------------------------------------------------- /zeromq_pub/README.rst: -------------------------------------------------------------------------------- 1 | ZeroMQ PUB Monitor for Ganglia 2 | ============================== 3 | 4 | This is a gmond metric-gathering module which reports a cumulative count 5 | of messages published by ZeroMQ publishers. 6 | 7 | Endpoints are specified as configuration parameters in zpubmon.pyconf. 8 | Each configuration key name is used as an endpoint name and its 9 | corresponding value as the endpoint's URI. The configuration param 10 | `groups` is special-cased: if present, its value specifies the group 11 | name for the metrics generated by the module. Otherwise the default 12 | group name ('ZeroMQ') is used. 13 | 14 | To test, invoke with one or more pairs of (endpoint name, endpoint URI) 15 | pairs specifying ZMQ publishers to poll. For example:: 16 | 17 | $ python zpubmon.py system-events tcp://localhost:8006 18 | 19 | Message counts will be logged to the console every five seconds. 20 | 21 | For more information about configuring Python modules for gmond, see the 22 | `official documentation `_. 24 | 25 | Copyright (c) 2012 by Ori Livneh 26 | 27 | Licensed under the GNU General Public Licence, version 2.0 or later. 28 | -------------------------------------------------------------------------------- /diskstat/graph.d/diskstat_iotime_report.php: -------------------------------------------------------------------------------- 1 | 42 | -------------------------------------------------------------------------------- /redis-gmond/README.md: -------------------------------------------------------------------------------- 1 | ganglia-redis(7) -- Redis in Ganglia 2 | ==================================== 3 | 4 | ## SYNOPSIS 5 | 6 | Place `redis.py` and `redis.pyconf` in the appropriate directories and restart `gmond`(1). 7 | 8 | ## DESCRIPTION 9 | 10 | Redis plugin for Ganglia that exposes most of the counters in the Redis `INFO` command to Ganglia for all your graphing needs. The metrics it comes with are pretty rudimentary but they get the job done. 11 | 12 | ## FILES 13 | 14 | * `/etc/ganglia/conf.d/modpython.conf`: 15 | Configures Ganglia for Python plugins. 16 | * `/usr/lib/ganglia/python_modules/redis.py`: 17 | Redis plugin. 18 | * `/etc/ganglia/conf.d/redis.pyconf`: 19 | Redis plugin configuration. 20 | 21 | ## THEME SONG 22 | 23 | The Arcade Fire - "Wake Up" 24 | 25 | ## AUTHOR 26 | 27 | Richard Crowley 28 | 29 | ## SEE ALSO 30 | 31 | `gmond`(1), the Ganglia monitor. 32 | 33 | The Redis `INFO` command is described at . 34 | 35 | The original blog post on this plugin is at . Gil Raphaelli's MySQL plugin, on which this one is based can be found at . 36 | -------------------------------------------------------------------------------- /mysqld/graph.d/mysql_temporary_objects_report.php: -------------------------------------------------------------------------------- 1 | 44 | -------------------------------------------------------------------------------- /mysqld/graph.d/mysql_table_locks_report.php: -------------------------------------------------------------------------------- 1 | 27 | -------------------------------------------------------------------------------- /jmxsh/graph.d/jmx_heap_report.php: -------------------------------------------------------------------------------- 1 | 45 | -------------------------------------------------------------------------------- /mysqld/graph.d/mysql_qcache_report.php: -------------------------------------------------------------------------------- 1 | 44 | -------------------------------------------------------------------------------- /recoverpoint/recoverpoint.pyconf: -------------------------------------------------------------------------------- 1 | # Name: recoverpoint.pyconf 2 | # Author: Evan Fraser (evan.fraser@trademe.co.nz) 3 | # Desc: Config file for the ganglia gmond recoverpoint module. 4 | # Date: 03/08/2012 5 | # To use: Save this file in /etc/ganglia/conf.d/, update the mgmtip value to the IP address of one of your RecoverPoint management IP's and change the name_match lines below to match your site names. 6 | 7 | modules { 8 | module { 9 | name = "recoverpoint" 10 | language = "python" 11 | param mgmtip { 12 | value = '192.168.1.100' 13 | } 14 | } 15 | } 16 | #/* Collection groups for the 17 | # example python module */ 18 | collection_group { 19 | collect_every = 20 20 | time_threshold = 50 21 | metric { 22 | name_match = "(.+)_wan" 23 | } 24 | metric { 25 | name_match = "(.+)_lan" 26 | } 27 | metric { 28 | name_match = "(.+)_latency" 29 | } 30 | metric { 31 | name_match = "(.+)Time" 32 | } 33 | metric { 34 | name_match = "(.+)Data" 35 | } 36 | metric { 37 | name_match = "(.+)Writes" 38 | } 39 | metric { 40 | name_match = "(.+)Traffic" 41 | } 42 | metric { 43 | name_match = "(.+)Lag" 44 | } 45 | metric { 46 | name_match = "(.+)Window" 47 | } 48 | 49 | } 50 | 51 | -------------------------------------------------------------------------------- /openstack_monitor/README: -------------------------------------------------------------------------------- 1 | Ganglia Python Modules for Nova 2 | ------------------------------- 3 | 4 | These plugins are for use with the Ganglia monitoring system. For more details: 5 | 6 | http://ganglia.sourceforge.net/ 7 | 8 | They allow various components of Nova to be monitored using simple python 9 | modules. 10 | 11 | You will need to enable ganglia's modpython. On Ubuntu, this is easy: 12 | 13 | mkdir /etc/ganglia/conf.d 14 | cp conf.d/modpython.conf /etc/ganglia/conf.d 15 | service ganglia-monitoring restart 16 | 17 | On most systems, these can easily be configured by copying the desired 18 | components from conf.d and python_modules to the same location in /etc/ganglia. 19 | 20 | For instance, to install compute-metrics: 21 | 22 | mkdir /etc/ganglia/conf.d 23 | mkdir /etc/ganglia/python_modules 24 | cp conf.d/compute-metrics.pyconf /etc/ganglia/conf.d 25 | cp python_modules/compute-metrics.py /etc/ganglia/python_modules 26 | service ganglia-monitoring restart 27 | 28 | To use custom graphics, copy graph.d contents in your system-specific 29 | graph.d directory: 30 | 31 | on Ubuntu: 32 | 33 | cp graph.d/nova_services_report.php /usr/share/ganglia-webfrontend/graph.d/ 34 | 35 | on RHEL 6.1: 36 | 37 | cp graph.d/nova_services_report.php /usr/share/ganglia/graph.d/ 38 | 39 | and enable it in conf.php: 40 | 41 | $optional_graphs = array('nova_services'); 42 | -------------------------------------------------------------------------------- /mysqld/graph.d/mysql_simple_query_report.php: -------------------------------------------------------------------------------- 1 | 45 | -------------------------------------------------------------------------------- /mysqld/graph.d/mysql_select_types_report.php: -------------------------------------------------------------------------------- 1 | 48 | -------------------------------------------------------------------------------- /gpu/nvidia/graph.d/gpu_mem_report.php: -------------------------------------------------------------------------------- 1 | 52 | -------------------------------------------------------------------------------- /gpu/nvidia/graph.d/gpu0_mem_report.php: -------------------------------------------------------------------------------- 1 | 52 | -------------------------------------------------------------------------------- /gpu/nvidia/graph.d/gpu1_mem_report.php: -------------------------------------------------------------------------------- 1 | 52 | -------------------------------------------------------------------------------- /gpu/nvidia/graph.d/gpu2_mem_report.php: -------------------------------------------------------------------------------- 1 | 52 | -------------------------------------------------------------------------------- /gpu/nvidia/graph.d/gpu3_mem_report.php: -------------------------------------------------------------------------------- 1 | 52 | -------------------------------------------------------------------------------- /gpu/nvidia/graph.d/gpu_temp_report.php: -------------------------------------------------------------------------------- 1 | 53 | -------------------------------------------------------------------------------- /diskstat/graph.d/diskstat_operations_report.php: -------------------------------------------------------------------------------- 1 | 49 | -------------------------------------------------------------------------------- /php_fpm/conf.d/php_fpm.pyconf: -------------------------------------------------------------------------------- 1 | # 2 | 3 | modules { 4 | module { 5 | name = 'php_fpm' 6 | language = 'python' 7 | 8 | param host { 9 | value = 'localhost' 10 | } 11 | 12 | param ports { 13 | value = '9000' 14 | } 15 | 16 | param status_path { 17 | value = '/status' 18 | } 19 | 20 | param php_fpm_bin { 21 | value = '/usr/sbin/php5-fpm' 22 | } 23 | 24 | param refresh_rate { 25 | value = '15' 26 | } 27 | 28 | param prefix { 29 | value = 'php_fpm_' 30 | } 31 | } 32 | } 33 | 34 | collection_group { 35 | collect_once = yes 36 | time_threshold = 20 37 | 38 | metric { 39 | name = 'php_fpm_server_version' 40 | title = "PHP-FPM Version" 41 | } 42 | 43 | metric { 44 | name = 'php_fpm_pool_name' 45 | title = "PHP-FPM Pool Name" 46 | } 47 | 48 | metric { 49 | name = 'php_fpm_process_manager' 50 | title = "PHP-FPM Process Manager" 51 | } 52 | } 53 | 54 | collection_group { 55 | collect_every = 10 56 | time_threshold = 20 57 | 58 | metric { 59 | name = 'php_fpm_accepted_connections' 60 | title = "PHP-FPM Total Accepted Connections" 61 | value_threshold = 1.0 62 | } 63 | 64 | metric { 65 | name = 'php_fpm_active_processes' 66 | title = "PHP-FPM Active Processes" 67 | value_threshold = 1.0 68 | } 69 | 70 | metric { 71 | name = 'php_fpm_idle_processes' 72 | title = "PHP-FPM Idle Processes" 73 | value_threshold = 1.0 74 | } 75 | 76 | metric { 77 | name = 'php_fpm_total_processes' 78 | title = "PHP-FPM Total Processes" 79 | value_threshold = 1.0 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /mysqld/graph.d/mysql_query_report.php: -------------------------------------------------------------------------------- 1 | 50 | -------------------------------------------------------------------------------- /procstat/graph.d/procstat_cpu_report.php: -------------------------------------------------------------------------------- 1 | $proc) { 46 | $color = $rainbow[$k%count($rainbow)]; 47 | 48 | $series .= "DEF:'${proc}'='${rrd_dir}/procstat_${proc}_cpu.rrd':'sum':AVERAGE " 49 | ."LINE2:'${proc}'#${color}:'${proc}' "; 50 | //."LINE2:'${proc}'#555555:'${proc}' "; 51 | } 52 | 53 | $rrdtool_graph['series'] = $series; 54 | 55 | return $rrdtool_graph; 56 | 57 | } 58 | 59 | ?> 60 | -------------------------------------------------------------------------------- /httpd/graph.d/apache_workers_report.php: -------------------------------------------------------------------------------- 1 | 48 | -------------------------------------------------------------------------------- /openstack_monitor/setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import os 4 | import sys 5 | from setuptools import setup, find_packages 6 | 7 | 8 | def read(fname): 9 | return open(os.path.join(os.path.dirname(__file__), fname)).read() 10 | 11 | 12 | def allfiles(path): 13 | all_files = [] 14 | for dirname, _, files in os.walk(path): 15 | all_files.extend( os.path.join(dirname, filename) for filename in files ) 16 | return all_files 17 | 18 | 19 | setup( 20 | name = "ganglia-openstack-monitor", 21 | version = "0.0.1a1", 22 | description = "Ganglia python plugin for Openstack Nova monitoring", 23 | long_description = read('README'), 24 | url = 'https://github.com/chemikadze/gmond_python_modules/tree/master/openstack_nova_stats', 25 | license = 'Apache 2', 26 | author = 'Nikolay Sokolov', 27 | author_email = 'nsokolov@griddynamics.com', 28 | data_files = [('/usr/local/share/openstack_nova_stats/graph.d', allfiles(os.path.join(os.path.dirname(__file__), 'graph.d'))), 29 | ('/usr/local/share/doc/openstack_nova_stats', ['README']), 30 | ('/etc/ganglia/conf.d', ['conf.d/compute-metrics.pyconf']), 31 | ('/etc/ganglia/python_modules', allfiles(os.path.join(os.path.dirname(__file__), 'python_modules')))], 32 | classifiers = [ 33 | 'Development Status :: 3 - Alpha', 34 | 'Environment :: Console', 35 | 'Intended Audience :: Developers', 36 | 'Intended Audience :: Information Technology', 37 | 'License :: OSI Approved :: Apache Software License', 38 | 'Operating System :: OS Independent', 39 | 'Programming Language :: Python', 40 | ], 41 | ) 42 | -------------------------------------------------------------------------------- /procstat/graph.d/procstat_mem_report.php: -------------------------------------------------------------------------------- 1 | $proc) { 46 | $color = $rainbow[$k%count($rainbow)]; 47 | 48 | $series .= "DEF:'${proc}'='${rrd_dir}/procstat_${proc}_mem.rrd':'sum':AVERAGE " 49 | ."CDEF:'${proc}_bytes'=${proc},1024,* " 50 | ."LINE2:'${proc}_bytes'#${color}:'${proc}' "; 51 | } 52 | 53 | $rrdtool_graph['series'] = $series; 54 | 55 | return $rrdtool_graph; 56 | 57 | } 58 | 59 | ?> 60 | -------------------------------------------------------------------------------- /gpu/nvidia/README: -------------------------------------------------------------------------------- 1 | NVIDIA GPU monitoring plugin for gmond 2 | ====================================== 3 | 4 | Installation instructions: 5 | * First install the Python Bindings for the NVIDIA Management Library: 6 | $ cd nvidia-ml-py-* 7 | $ sudo python setup.py install 8 | For the latest bindings see: http://pypi.python.org/pypi/nvidia-ml-py/ 9 | You can do a site install or place it in {libdir}/ganglia/python_modules 10 | * Copy python_modules/nvidia.py to {libdir}/ganglia/python_modules 11 | * Copy conf.d/nvidia.pyconf to /etc/ganglia/conf.d 12 | * Copy graph.d/* to {ganglia_webroot}/graph.d/ 13 | * Patch Ganglia Web (3.1.x) to see custom graphs (ganglia_web.patch) 14 | * A demo of what the GPU graphs look like is available here: 15 | http://ac.ncsa.uiuc.edu/ganglia/?m=load_one&r=hour&s=descending&c=AC&h=ac22&sh=1&hc=4&z=small 16 | 17 | By default all metrics that the management library could detect for your GPU 18 | are collected. For more information on what metrics are supported on what 19 | models, please refer to NVML documentation. 20 | 21 | The following metrics have been implemented: 22 | * gpu_num 23 | * gpu_driver 24 | * gpu_type 25 | * gpu_uuid 26 | * gpu_pci_id 27 | * gpu_mem_total 28 | * gpu_graphics_speed 29 | * gpu_sm_speed 30 | * gpu_mem_speed 31 | * gpu_max_graphics_speed 32 | * gpu_max_sm_speed 33 | * gpu_max_mem_speed 34 | * gpu_temp 35 | * gpu_util 36 | * gpu_mem_util 37 | * gpu_mem_used 38 | * gpu_fan 39 | * gpu_power_usage 40 | * gpu_perf_state 41 | * gpu_ecc_mode 42 | 43 | Version 2: 44 | 45 | The following metrics have been implemented: 46 | * gpu_max_graphics_speed 47 | * gpu_max_sm_speed 48 | * gpu_max_mem_speed 49 | * gpu_serial 50 | * gpu_power_man_mode 51 | * gpu_power_man_limit 52 | 53 | -------------------------------------------------------------------------------- /gpu/nvidia/graph.d/gpu_sm_speed_report.php: -------------------------------------------------------------------------------- 1 | 56 | -------------------------------------------------------------------------------- /gpu/nvidia/graph.d/gpu_mem_speed_report.php: -------------------------------------------------------------------------------- 1 | 56 | -------------------------------------------------------------------------------- /gpu/nvidia/graph.d/gpu_core_speed_report.php: -------------------------------------------------------------------------------- 1 | 56 | -------------------------------------------------------------------------------- /httpd/conf.d/httpd.pyconf: -------------------------------------------------------------------------------- 1 | # 2 | 3 | modules { 4 | module { 5 | name = 'httpd' 6 | language = 'python' 7 | 8 | param status_url { 9 | value = 'http://localhost/server-status?auto' 10 | } 11 | param apache_conf { 12 | value = '/etc/httpd/conf/httpd.conf' 13 | } 14 | param apache_ctl { 15 | value = '/usr/sbin/apachectl' 16 | } 17 | param apache_bin { 18 | value = '/usr/sbin/httpd' 19 | } 20 | param apache_user { 21 | value = 'apache' 22 | } 23 | param get_extended { 24 | value = True 25 | } 26 | param get_prefork { 27 | value = True 28 | } 29 | } 30 | } 31 | 32 | collection_group { 33 | collect_every = 60 34 | time_threshold = 60 35 | 36 | metric { 37 | name = 'httpd_server_version' 38 | } 39 | 40 | metric { 41 | name = 'httpd_busy_workers' 42 | } 43 | 44 | metric { 45 | name = 'httpd_idle_workers' 46 | } 47 | 48 | metric { 49 | name = 'httpd_avg_worker_size' 50 | } 51 | 52 | metric { 53 | name = 'httpd_percent_cpu' 54 | } 55 | 56 | metric { 57 | name = 'httpd_hits' 58 | } 59 | 60 | metric { 61 | name = 'httpd_sent_kbytes' 62 | } 63 | 64 | metric { 65 | name = 'httpd_uptime' 66 | } 67 | } 68 | 69 | collection_group { 70 | collect_every = 60 71 | time_threshold = 60 72 | 73 | metric { 74 | name = 'httpd_start_servers' 75 | } 76 | 77 | metric { 78 | name = 'httpd_min_spare_servers' 79 | } 80 | 81 | metric { 82 | name = 'httpd_max_spare_servers' 83 | } 84 | 85 | metric { 86 | name = 'httpd_server_limit' 87 | } 88 | 89 | metric { 90 | name = 'httpd_max_clients' 91 | } 92 | 93 | metric { 94 | name = 'httpd_max_requests_per_child' 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /jmxsh/conf.d/jmx-basic.pyconf: -------------------------------------------------------------------------------- 1 | # This configuration file collects basic Java VM metrics through JMX 2 | 3 | modules { 4 | module { 5 | name = 'jmxsh' 6 | language = 'python' 7 | 8 | param host { 9 | value = 'localhost' 10 | } 11 | param port { 12 | value = '1099' 13 | } 14 | 15 | param name { 16 | value = 'tomcat' 17 | } 18 | 19 | # Classifies these metrics in this group in the web GUI 20 | param metric_group { 21 | value = 'tomcat' 22 | } 23 | 24 | # java.lang 25 | param daemon_threads { # composite data 26 | value = 'java.lang:type=Threading DaemonThreadCount' 27 | } 28 | param thread_count { 29 | value = 'java.lang:type=Threading ThreadCount' 30 | } 31 | param peak_thread_count { 32 | value = 'java.lang:type=Threading PeakThreadCount' 33 | } 34 | param total_started_thread_count { 35 | value = 'java.lang:type=Threading TotalStartedThreadCount' 36 | } 37 | param heap { 38 | value = 'java.lang:type=Memory HeapMemoryUsage' 39 | } 40 | } 41 | } 42 | 43 | collection_group { 44 | collect_every = 60 45 | time_threshold = 50 46 | 47 | # Make sure metrics starts with jmx_ 48 | metric { 49 | name = 'jmx_tomcat_daemon_threads' 50 | } 51 | metric { 52 | name = 'jmx_tomcat_thread_count' 53 | } 54 | metric { 55 | name = 'jmx_tomcat_peak_thread_count' 56 | } 57 | metric { 58 | name = 'jmx_tomcat_total_started_thread_count' 59 | } 60 | metric { 61 | name = 'jmx_tomcat_heap_max' 62 | } 63 | metric { 64 | name = 'jmx_tomcat_heap_committed' 65 | } 66 | metric { 67 | name = 'jmx_tomcat_heap_init' 68 | } 69 | metric { 70 | name = 'jmx_tomcat_heap_used' 71 | } 72 | } 73 | 74 | -------------------------------------------------------------------------------- /php_fpm/README.mkdn: -------------------------------------------------------------------------------- 1 | php_fpm 2 | =============== 3 | 4 | python module for ganglia 3.1. 5 | 6 | "php_fpm" send metrics on PHP's [FPM](http://www.php.net/manual/en/install.fpm.php) status. 7 | 8 | This module can monitor multiple php-fpm pools by passing in multiple ports separated by commas into the ports parameter. 9 | 10 | ## Metrics 11 | * php_fpm_server_version 12 | * php_fpm_pool_name 13 | * php_fpm_process_manager 14 | * php_fpm_accepted_connections 15 | * php_fpm_active_processes 16 | * php_fpm_idle_processes 17 | * php_fpm_total_processes 18 | 19 | ## Params 20 | * status_path (The path to query for php-fpm status. Default: '/status') 21 | * host (The hostname/ip of the server running php-fpm. Default: localhost) 22 | * ports (The list of ports of which the php-fpm pool are running on. Default: 9000) 23 | * php_fpm_bin (The full path to the php_fpm binary. Default '/usr/sbin/php5-fpm') 24 | * refresh_rate (The time in seconds between polling php-fpm. Default: 15) 25 | * prefix (The string to prefix the metric name. Default: 'php_fpm_') 26 | 27 | ## NOTES 28 | * This has only been tested on python 2.6.5 on Ubuntu 10.04. 29 | * If more than one port is specified in the ports param, the port number will be appended onto the mectric's prefix. IE, given prefix = 'php_fpm_' and ports = '9000,9001,9002', your metric name will include 'php_fpm_9000_active_processes', 'php_fpm_9001_active_processes' and 'php_fpm_9002_active_processes'. 30 | * Ensure your PHP-FPM configuration has a pm.status_path set to the same value as this module's status_path param. 31 | * This module uses the [flup python module](http://pypi.python.org/pypi/flup/1.0) as the fastcgi client library. Please ensure it's installed. 32 | 33 | ## AUTHOR 34 | 35 | Patrick Ting 36 | 37 | -------------------------------------------------------------------------------- /mysqld/graph.d/mysql_connections_report.php: -------------------------------------------------------------------------------- 1 | 51 | -------------------------------------------------------------------------------- /openstack_monitor/graph.d/nova_services_report.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /gpu/nvidia/graph.d/gpu_util_report.php: -------------------------------------------------------------------------------- 1 | 63 | -------------------------------------------------------------------------------- /network/netstats/conf.d/netstats.basic.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 | 23 | metric { 24 | name = "tcp_retrans_percentage" 25 | title = "TCP retransmit percentage" 26 | value_threshold = 1.0 27 | } 28 | 29 | metric { 30 | name = "tcp_outsegs" 31 | title = "TCP segments sent" 32 | value_threshold = 1.0 33 | } 34 | 35 | metric { 36 | name = "tcp_insegs" 37 | title = "TCP segments received" 38 | value_threshold = 1.0 39 | } 40 | 41 | metric { 42 | name = "udp_indatagrams" 43 | title = "UDP packets in" 44 | value_threshold = 1.0 45 | } 46 | metric { 47 | name = "udp_outdatagrams" 48 | title = "UDP packets out" 49 | value_threshold = 1.0 50 | } 51 | metric { 52 | name = "udp_inerrors" 53 | title = "UDP packet receive errors" 54 | value_threshold = 1.0 55 | } 56 | 57 | metric { 58 | name = "udp_rcvbuferrors" 59 | title = "UDP Receive buffer errors" 60 | value_threshold = 1.0 61 | } 62 | 63 | 64 | 65 | metric { 66 | name = "tcpext_listendrops" 67 | title = "SYNs sent to LISTENing sockets ignored" 68 | value_threshold = 1.0 69 | } 70 | 71 | metric { 72 | name = "tcp_attemptfails" 73 | title = "TCP Failed connection attempts" 74 | value_threshold = 1.0 75 | } 76 | 77 | } 78 | -------------------------------------------------------------------------------- /gpu/nvidia/graph.d/gpu_mem_util_report.php: -------------------------------------------------------------------------------- 1 | 63 | -------------------------------------------------------------------------------- /system/hwmon/python_modules/hwmon.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | root = '/sys/class/hwmon' 4 | descriptors = [] 5 | mapping = {} 6 | 7 | import os, glob, re 8 | 9 | def temp_finder(name): 10 | val = open(mapping[name]).read().strip() 11 | return int(val) / 1000.0 12 | 13 | def metric_init(params): 14 | global descriptors 15 | 16 | sensors = sorted(glob.glob(os.path.join(root, 'hwmon*'))) 17 | 18 | for s in sensors: 19 | temps = glob.glob(os.path.join(s, 'device/temp*_input')) 20 | # dict values are default labels if no label files exist 21 | probes = dict(zip(temps, [os.path.basename(x) for x in temps])) 22 | 23 | for i in probes.keys(): 24 | try: 25 | fname = i.replace('input', 'label') 26 | fhandle = open(fname, 'r') 27 | probes[i] = fhandle.read().strip().replace(' ', '_').lower() 28 | fhandle.close() 29 | except (IOError, OSError): 30 | pass 31 | 32 | for i, l in probes.iteritems(): 33 | num = re.search('\d+', i) 34 | device = i[num.start():num.end()] 35 | name = 'hwmon_dev%s_%s' % (device, l) 36 | item = {'name': name, 37 | 'call_back': temp_finder, 38 | 'time_max': 90, 39 | 'value_type': 'float', 40 | 'units': 'C', 41 | 'slope': 'both', 42 | 'format': '%0.2f', 43 | 'description': 'Temperature for hwmon probe %s' % l, 44 | 'groups': 'hwmon'} 45 | descriptors.append(item) 46 | mapping[name] = i 47 | 48 | return descriptors 49 | 50 | def metric_cleanup(): 51 | '''Clean up the metric module.''' 52 | pass 53 | 54 | if __name__ == '__main__': 55 | metric_init(None) 56 | for d in descriptors: 57 | v = d['call_back'](d['name']) 58 | print 'value for %s: %s' % (d['name'], str(v)) 59 | -------------------------------------------------------------------------------- /network/multi_interface/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 | } 32 | 33 | collection_group { 34 | collect_every = 15 35 | time_threshold = 45 36 | 37 | metric { 38 | name_match = "rx_(.+)" 39 | value_threshold = 1.0 40 | } 41 | metric { 42 | name_match = "tx_(.+)" 43 | value_threshold = 1.0 44 | } 45 | 46 | # Uncomment only if param send_aggregate_bytes_packets set to True 47 | # metric { 48 | # name = "bytes_out" 49 | # value_threshold = 4096 50 | # title = "Bytes Sent" 51 | # } 52 | # metric { 53 | # name = "bytes_in" 54 | # value_threshold = 4096 55 | # title = "Bytes Received" 56 | # } 57 | # metric { 58 | # name = "pkts_in" 59 | # value_threshold = 256 60 | # title = "Packets Received" 61 | # } 62 | # metric { 63 | # name = "pkts_out" 64 | # value_threshold = 256 65 | # title = "Packets Sent" 66 | # } 67 | 68 | } 69 | -------------------------------------------------------------------------------- /xenstats/graph.d/xen_vms_report.php: -------------------------------------------------------------------------------- 1 | 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 20 | * MA 02110-1301, USA. 21 | */ 22 | 23 | 24 | /* Pass in by reference! */ 25 | function graph_xen_vms_report ( &$rrdtool_graph ) { 26 | 27 | global $context, 28 | $hostname, 29 | $mem_cached_color, 30 | $mem_used_color, 31 | $cpu_num_color, 32 | $range, 33 | $rrd_dir, 34 | $size; 35 | 36 | $title = 'Virtual Machines'; 37 | $rrdtool_graph['height'] += $size == 'medium' ? 28 : 0 ; 38 | if ($context != 'host') { 39 | $rrdtool_graph['title'] = $title; 40 | } else { 41 | $rrdtool_graph['title'] = "$hostname $title last $range"; 42 | } 43 | $rrdtool_graph['lower-limit'] = '0'; 44 | $rrdtool_graph['vertical-label'] = 'Qtd'; 45 | $rrdtool_graph['extras'] = '--rigid --base 1024'; 46 | 47 | $series = "DEF:'xen_vms'='${rrd_dir}/xen_vms.rrd':'sum':AVERAGE " 48 | ."LINE2:'xen_vms'#$mem_used_color:'VMS' "; 49 | 50 | $rrdtool_graph['series'] = $series; 51 | 52 | return $rrdtool_graph; 53 | 54 | } 55 | 56 | ?> 57 | -------------------------------------------------------------------------------- /jenkins/conf.d/jenkins.pyconf: -------------------------------------------------------------------------------- 1 | # 2 | 3 | modules { 4 | module { 5 | name = 'jenkins' 6 | language = 'python' 7 | 8 | param base_url { 9 | value = 'http://127.0.0.1:8080' 10 | } 11 | param username { 12 | value = '' 13 | } 14 | param apitoken { 15 | value = '' 16 | } 17 | } 18 | } 19 | 20 | collection_group { 21 | collect_every = 10 22 | time_threshold = 20 23 | 24 | metric { 25 | name = 'jenkins_overallload_busy_executors' 26 | title = 'Number of busy executors on master and slaves' 27 | value_threshold = 1.0 28 | } 29 | 30 | metric { 31 | name = 'jenkins_overallload_queue_length' 32 | title = 'Length of the queue on master and slaves' 33 | value_threshold = 1.0 34 | } 35 | 36 | metric { 37 | name = 'jenkins_overallload_total_executors' 38 | title = 'Number of executors on master and slaves' 39 | value_threshold = 1.0 40 | } 41 | 42 | metric { 43 | name = 'jenkins_jobs_total' 44 | title = 'Total number of jobs' 45 | value_threshold = 1.0 46 | } 47 | 48 | metric { 49 | name = 'jenkins_jobs_blue' 50 | title = 'Number of jobs with status blue' 51 | value_threshold = 1.0 52 | } 53 | 54 | metric { 55 | name = 'jenkins_jobs_red' 56 | title = 'Number of jobs with status red' 57 | value_threshold = 1.0 58 | } 59 | 60 | metric { 61 | name = 'jenkins_jobs_yellow' 62 | title = 'Number of jobs with status yellow' 63 | value_threshold = 1.0 64 | } 65 | 66 | metric { 67 | name = 'jenkins_jobs_grey' 68 | title = 'Number of jobs with status grey' 69 | value_threshold = 1.0 70 | } 71 | 72 | metric { 73 | name = 'jenkins_jobs_aborted' 74 | title = 'Number of jobs with status aborted' 75 | value_threshold = 1.0 76 | } 77 | 78 | metric { 79 | name = 'jenkins_jobs_notbuilt' 80 | title = 'Number of jobs with status notbuilt' 81 | value_threshold = 1.0 82 | } 83 | 84 | metric { 85 | name = 'jenkins_jobs_disabled' 86 | title = 'Number of jobs with status disabled' 87 | value_threshold = 1.0 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /passenger/conf.d/passenger.pyconf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "passenger" 4 | language = "python" 5 | param status { 6 | value = "sudo /usr/bin/passenger-status" 7 | } 8 | param memory_stats { 9 | value = "sudo /usr/bin/passenger-memory-stats" 10 | } 11 | } 12 | } 13 | 14 | collection_group { 15 | collect_every = 20 16 | time_threshold = 90 17 | 18 | # metric { 19 | # name = "passenger_apache_private_total" 20 | # title = "Apache private total" 21 | # value_threshold = 0 22 | # } 23 | # metric { 24 | # name = "passenger_private_total" 25 | # title = "Passenger private total" 26 | # value_threshold = 0 27 | # } 28 | # metric { 29 | # name = "passenger_apache_processes" 30 | # title = "Apache processes" 31 | # value_threshold = 0 32 | # } 33 | # metric { 34 | # name = "passenger_apache_vmsize_total" 35 | # title = "Apache vmsize total" 36 | # value_threshold = 0 37 | # } 38 | # metric { 39 | # name = "passenger_vmsize_total" 40 | # title = "Passenger vmsize total" 41 | # value_threshold = 0 42 | # } 43 | # metric { 44 | # name = "passenger_nginx_processes" 45 | # title = "Nginx processes" 46 | # value_threshold = 0 47 | # } 48 | metric { 49 | name = "passenger_processes_active" 50 | title = "Passenger Active Processes" 51 | value_threshold = 0 52 | } 53 | metric { 54 | name = "passenger_open_processes" 55 | title = "Passenger Open Processes" 56 | value_threshold = 0 57 | } 58 | metric { 59 | name = "passenger_global_queue_depth" 60 | title = "Passenger Global Queue Depth" 61 | value_threshold = 0 62 | } 63 | metric { 64 | name = "passenger_max_pool_size" 65 | title = "Passenger Max Pool Size" 66 | value_threshold = 0 67 | } 68 | metric { 69 | name = "passenger_processes_inactive" 70 | title = "Passenger Inactive Processes" 71 | value_threshold = 0 72 | } 73 | metric { 74 | name = "passenger_memory_usage" 75 | title = "Passenger Memory Usage" 76 | value_threshold = 0 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /memcached/conf.d/tokyotyrant.conf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "tokyotyrant" 4 | language = "python" 5 | 6 | param host { 7 | value = "localhost" 8 | } 9 | param port { 10 | value = 1978 11 | } 12 | param type { 13 | value = "Tokyo Tyrant" 14 | } 15 | 16 | param refresh_rate { 17 | value = 15 18 | } 19 | } 20 | } 21 | 22 | collection_group { 23 | collect_every = 20 24 | time_threshold = 90 25 | 26 | metric { 27 | name = "tt_curr_items" 28 | title = "Current number of items stored" 29 | value_threshold = 0 30 | } 31 | metric { 32 | name = "tt_cmd_get" 33 | title = "Cumulative number of retrieval reqs" 34 | value_threshold = 0 35 | } 36 | metric { 37 | name = "tt_cmd_set" 38 | title = "Cumulative number of storage reqs" 39 | value_threshold = 0 40 | } 41 | metric { 42 | name = "tt_bytes" 43 | title = "Current number of bytes used to store items" 44 | value_threshold = 0 45 | } 46 | metric { 47 | name = "tt_cmd_get_hits" 48 | title = "Number of keys that have been requested and found present " 49 | value_threshold = 0 50 | } 51 | metric { 52 | name = "tt_cmd_get_misses" 53 | title = "Number of items that have been requested and not found" 54 | value_threshold = 0 55 | } 56 | metric { 57 | name = "tt_cmd_set_hits" 58 | title = "Number of keys that have been stored and found present " 59 | value_threshold = 0 60 | } 61 | metric { 62 | name = "tt_cmd_set_misses" 63 | title = "Number of items that have been stored and not found" 64 | value_threshold = 0 65 | } 66 | metric { 67 | name = "tt_cmd_delete" 68 | title = "Cumulative number of delete reqs" 69 | value_threshold = 0 70 | } 71 | metric { 72 | name = "tt_cmd_delete_hits" 73 | title = "Number of keys that have been deleted and found present " 74 | value_threshold = 0 75 | } 76 | metric { 77 | name = "tt_cmd_delete_misses" 78 | title = "Number of items that have been deleted and not found" 79 | value_threshold = 0 80 | } 81 | 82 | } 83 | 84 | -------------------------------------------------------------------------------- /memcached_maxage/python_modules/every.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | """ 4 | Every 5 | 6 | Python decorator; decorated function is called on a set interval. 7 | 8 | :author: Ori Livneh 9 | :copyright: (c) 2012 Wikimedia Foundation 10 | :license: GPL, version 2 or later 11 | """ 12 | from __future__ import division 13 | from datetime import timedelta 14 | import signal 15 | import sys 16 | import threading 17 | 18 | 19 | # pylint: disable=C0111, W0212, W0613, W0621 20 | 21 | 22 | __all__ = ('every', ) 23 | 24 | 25 | def total_seconds(delta): 26 | """ 27 | Get total seconds of timedelta object. Equivalent to 28 | timedelta.total_seconds(), which was introduced in Python 2.7. 29 | """ 30 | us = (delta.microseconds + (delta.seconds + delta.days * 24 * 3600) * 10**6) 31 | return us / 1000000.0 32 | 33 | 34 | def handle_sigint(signal, frame): 35 | """ 36 | Attempt to kill all child threads and exit. Installing this as a sigint 37 | handler allows the program to run indefinitely if unmolested, but still 38 | terminate gracefully on Ctrl-C. 39 | """ 40 | for thread in threading.enumerate(): 41 | if thread.isAlive(): 42 | thread._Thread__stop() 43 | sys.exit(0) 44 | 45 | 46 | def every(*args, **kwargs): 47 | """ 48 | Decorator; calls decorated function on a set interval. Arguments to every() 49 | are passed on to the constructor of datetime.timedelta(), which accepts the 50 | following arguments: days, seconds, microseconds, milliseconds, minutes, 51 | hours, weeks. This decorator is intended for functions with side effects; 52 | the return value is discarded. 53 | """ 54 | interval = total_seconds(timedelta(*args, **kwargs)) 55 | def decorator(func): 56 | def poll(): 57 | func() 58 | threading.Timer(interval, poll).start() 59 | poll() 60 | return func 61 | return decorator 62 | 63 | 64 | def join(): 65 | """Pause until sigint""" 66 | signal.signal(signal.SIGINT, handle_sigint) 67 | signal.pause() 68 | 69 | 70 | every.join = join 71 | -------------------------------------------------------------------------------- /jmxsh/README: -------------------------------------------------------------------------------- 1 | To use this package do following 2 | 3 | 1. Copy extra/jmxsh.jar to a location of your choice e.g. /usr/share/java/jmxsh.jar 4 | Module expects JMX without authentication. If you use auth you will need to modify 5 | jmxsh.py script in python_modules. To test you can connect via JMX type 6 | java -jar jmxsh.jar -h localhost -p 1099 7 | 2. Copy python_modules/jmxsh.py to where your Ganglia Python modules are e.g. /usr/lib64/ganglia/python_modules/ 8 | 3. Copy one of the config files from conf.d/ directory to /etc/ganglia/conf.d 9 | 10 | It is advisable to run gmond in debug mode to make sure everything is OK. You can do following 11 | 12 | gmond -m | grep jmx 13 | 14 | You should get output similar to this 15 | 16 | # gmond -m | grep jmx 17 | jmx_tomcat_heap_init heap_init (module python_module) 18 | jmx_tomcat_total_started_thread_count total_started_thread_count (module python_module) 19 | jmx_tomcat_thread_count thread_count (module python_module) 20 | jmx_tomcat_heap_max heap_max (module python_module) 21 | jmx_tomcat_heap_used heap_used (module python_module) 22 | jmx_tomcat_daemon_threads daemon_threads (module python_module) 23 | jmx_tomcat_peak_thread_count peak_thread_count (module python_module) 24 | jmx_tomcat_heap_committed heap_committed (module python_module) 25 | 26 | Also try running gmond with debug e.g. 27 | 28 | # gmond -d 5 29 | 30 | make sure output is clean 31 | 32 | Enabling JMX 33 | ============ 34 | 35 | To enable the JMX interface in your servlet container (tomcat, jetty-web, et al.) add the 36 | following options to the JAVA_OPTS environment variable defined in the rc startup script: 37 | 38 | -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8887 \ 39 | -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false 40 | 41 | For instance, here's what JAVA_OPTS looks like in our /etc/init.d/tomcat-55 file: 42 | 43 | export JAVA_OPTS='-server -Xmx256M -XX:MaxPermSize=256m -Dsun.net.inetaddr.ttl=300 \ 44 | -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8887 \ 45 | -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false' 46 | -------------------------------------------------------------------------------- /beanstalk/conf.d/beanstalk.conf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "beanstalk" 4 | language = "python" 5 | } 6 | } 7 | collection_group { 8 | collect_every = 20 9 | time_threshold = 90 10 | metric { 11 | name = "current-connections" 12 | title = "Number of Current Connections to Beanstalkd" 13 | value_threshold = 0 14 | } 15 | metric { 16 | name = "total-jobs" 17 | title = "Number of Beanstalkd Jobs" 18 | value_threshold = 0 19 | } 20 | metric { 21 | name = "current-jobs-ready" 22 | title = "Number of Beanstalkd Jobs 'ready'" 23 | value_threshold = 0 24 | } 25 | metric { 26 | name = "current-jobs-buried" 27 | title = "Number of Beanstalkd Jobs 'buried'" 28 | value_threshold = 0 29 | } 30 | metric { 31 | name = "current-jobs-delayed" 32 | title = "Number of Beanstalkd Jobs 'delayed'" 33 | value_threshold = 0 34 | } 35 | metric { 36 | name = "current-waiting" 37 | title = "Number of Beanstalkd Jobs 'waiting'" 38 | value_threshold = 0 39 | } 40 | metric { 41 | name = "job-timeouts" 42 | title = "Number of Beanstalkd Jobs Timeouts" 43 | value_threshold = 0 44 | } 45 | metric { 46 | name = "cmd-bury" 47 | title = "Number of Beanstalkd Burries" 48 | value_threshold = 0 49 | } 50 | metric { 51 | name = "default_total-jobs" 52 | title = "default Number of Beanstalkd Jobs" 53 | value_threshold = 0 54 | } 55 | metric { 56 | name = "default_current-watching" 57 | title = "default Current Watchers" 58 | value_threshold = 0 59 | } 60 | metric { 61 | name = "default_current-jobs-buried" 62 | title = "default Current Number of Jobs Burried" 63 | value_threshold = 0 64 | } 65 | 66 | metric { 67 | name = "default_current-jobs-ready" 68 | title = "default Current Jobs Ready" 69 | value_threshold = 0 70 | } 71 | metric { 72 | name = "default_current-waiting" 73 | title = "default Current Number of Jobs Waiting" 74 | value_threshold = 0 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /apc_status/conf.d/apc_status.pyconf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "apc_status" 4 | language = "python" 5 | 6 | # URL of the resident apc-json.php script, which will translate the APC figures to JSON 7 | param url { 8 | value = "http://localhost/apc-json.php" 9 | } 10 | 11 | # Which metric group should these metrics be put into 12 | param metric_group { 13 | value = "apc_cache" 14 | } 15 | } 16 | } 17 | 18 | collection_group { 19 | collect_every = 30 20 | time_threshold = 90 21 | 22 | metric { 23 | name = "apc_mem_size" 24 | title = "Total Memory" 25 | value_threshold = 0 26 | } 27 | metric { 28 | name = "apc_mem_avail" 29 | title = "Free Memory" 30 | value_threshold = 0 31 | } 32 | metric { 33 | name = "apc_mem_used" 34 | title = "Used Memory" 35 | value_threshold = 0 36 | } 37 | metric { 38 | name = "apc_num_slots" 39 | title = "Number of Slots" 40 | value_threshold = 0 41 | } 42 | metric { 43 | name = "apc_num_hits" 44 | title = "Number of Cache Hits" 45 | value_threshold = 0 46 | } 47 | metric { 48 | name = "apc_num_misses" 49 | title = "Number of Cache Misses" 50 | value_threshold = 0 51 | } 52 | metric { 53 | name = "apc_num_inserts" 54 | title = "Number of Cache Inserts" 55 | value_threshold = 0 56 | } 57 | metric { 58 | name = "apc_expunges" 59 | title = "Number of Cache Deletes" 60 | value_threshold = 0 61 | } 62 | metric { 63 | name = "apc_num_entries" 64 | title = "Cached Files" 65 | value_threshold = 0 66 | } 67 | metric { 68 | name = "apc_num_seg" 69 | title = "Segments" 70 | value_threshold = 0 71 | } 72 | metric { 73 | name = "apc_uptime" 74 | title = "Uptime" 75 | value_threshold = 0 76 | } 77 | metric { 78 | name = "apc_request_rate" 79 | title = "Request Rate (hits, misses)" 80 | value_threshold = 0.0 81 | } 82 | metric { 83 | name = "apc_hit_rate" 84 | title = "Hit Rate" 85 | value_threshold = 0.0 86 | } 87 | metric { 88 | name = "apc_miss_rate" 89 | title = "Miss Rate" 90 | value_threshold = 0.0 91 | } 92 | metric { 93 | name = "apc_insert_rate" 94 | title = "Insert Rate" 95 | value_threshold = 0.0 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /network/multi_interface/README.mkdn: -------------------------------------------------------------------------------- 1 | multi_interface 2 | =============== 3 | 4 | Python module for ganglia 3.1+ 5 | 6 | This module allows you to collect per network interface network stats. Out 7 | of the box Ganglia provides only aggregate network metrics. This module will 8 | give you rx (receive) and tx (transmit) stats for every interface it encounters 9 | e.g. 10 | 11 | value for rx_bytes_lo is 21847.3723 12 | value for rx_pkts_lo is 17.5771 13 | value for rx_errs_lo is 0.0000 14 | value for rx_drops_lo is 0.0000 15 | value for tx_bytes_lo is 21847.3723 16 | value for tx_pkts_lo is 17.5771 17 | value for tx_errs_lo is 0.0000 18 | value for tx_drops_lo is 0.0000 19 | value for rx_bytes_eth0 is 0.0000 20 | value for rx_pkts_eth0 is 0.0000 21 | value for rx_errs_eth0 is 0.0000 22 | value for rx_drops_eth0 is 0.0000 23 | value for tx_bytes_eth0 is 0.0000 24 | value for tx_pkts_eth0 is 0.0000 25 | value for tx_errs_eth0 is 0.0000 26 | value for tx_drops_eth0 is 0.0000 27 | value for rx_bytes_eth1 is 0.0000 28 | value for rx_pkts_eth1 is 0.0000 29 | value for rx_errs_eth1 is 0.0000 30 | value for rx_drops_eth1 is 0.0000 31 | value for tx_bytes_eth1 is 0.0000 32 | value for tx_pkts_eth1 is 0.0000 33 | value for tx_errs_eth1 is 0.0000 34 | value for tx_drops_eth1 is 0.0000 35 | 36 | You can run the multi_interface.py script by hand to see all of the metrics. 37 | 38 | In addition this script can be used to override "default" bytes_in, bytes_out, pkts_in and pkts_out 39 | metrics. To do that you will need to 40 | 41 | * set send_aggregate_bytes_packets to True in multi_interface.pyconf 42 | * Uncomment bytes_in, bytes_out metrics to be sent in in multi_interface.pyconf 43 | * Comment out those same metrics you uncommented in step above in gmond.conf so they don't override 44 | each other 45 | 46 | 47 | Install 48 | =============== 49 | 50 | Copy multi_interface.py from python_modules to your python modules directory e.g. 51 | 52 | /usr/lib64/ganglia/python_modules 53 | 54 | and multi_interface.pyconf to 55 | 56 | /etc/ganglia/conf.d/ 57 | 58 | Restart Gmond and you are done. If you want only specific interfaces add a space 59 | delimited list of interfaces in multi_interface.pyconf e.g. 60 | 61 | param interfaces { 62 | value = "eth0 eth2" 63 | } 64 | 65 | 66 | ## AUTHOR 67 | 68 | Author: Vladimir Vuksan https://github.com/vvuksan 69 | -------------------------------------------------------------------------------- /jmxsh/conf.d/jmx-jetty-web.pyconf: -------------------------------------------------------------------------------- 1 | # 2 | 3 | modules { 4 | module { 5 | name = 'jmxsh' 6 | language = 'python' 7 | 8 | param host { 9 | value = 'localhost' 10 | } 11 | param port { 12 | value = '8887' 13 | } 14 | param name { 15 | value = 'jetty-web' 16 | } 17 | # Classifies these metrics in this group in the web GUI 18 | param metric_group { 19 | value = 'jmx' 20 | } 21 | 22 | # org.mortbay 23 | param sessions { 24 | value = 'org.mortbay.jetty.servlet:type=hashsessionmanager,id=0 sessions' 25 | } 26 | param threads { 27 | value = 'org.mortbay.thread:type=queuedthreadpool,id=0 threads' 28 | } 29 | param idle_threads { 30 | value = 'org.mortbay.thread:type=queuedthreadpool,id=0 idleThreads' 31 | } 32 | param queue_size { 33 | value = 'org.mortbay.thread:type=queuedthreadpool,id=0 queueSize' 34 | } 35 | 36 | # java.lang 37 | param daemon_threads { # composite data 38 | value = 'java.lang:type=Threading DaemonThreadCount' 39 | } 40 | param thread_count { 41 | value = 'java.lang:type=Threading ThreadCount' 42 | } 43 | param peak_thread_count { 44 | value = 'java.lang:type=Threading PeakThreadCount' 45 | } 46 | param total_started_thread_count { 47 | value = 'java.lang:type=Threading TotalStartedThreadCount' 48 | } 49 | param heap { 50 | value = 'java.lang:type=Memory HeapMemoryUsage' 51 | } 52 | } 53 | } 54 | 55 | collection_group { 56 | collect_every = 60 57 | time_threshold = 60 58 | 59 | metric { 60 | name = 'jmx_jetty-web_sessions' 61 | } 62 | metric { 63 | name = 'jmx_jetty-web_threads' 64 | } 65 | metric { 66 | name = 'jmx_jetty-web_idle_threads' 67 | } 68 | metric { 69 | name = 'jmx_jetty-web_queue_size' 70 | } 71 | 72 | metric { 73 | name = 'jmx_jetty-web_daemon_threads' 74 | } 75 | metric { 76 | name = 'jmx_jetty-web_thread_count' 77 | } 78 | metric { 79 | name = 'jmx_jetty-web_peak_thread_count' 80 | } 81 | metric { 82 | name = 'jmx_jetty-web_total_started_thread_count' 83 | } 84 | metric { 85 | name = 'jmx_jetty-web_heap_max' 86 | } 87 | metric { 88 | name = 'jmx_jetty-web_heap_committed' 89 | } 90 | metric { 91 | name = 'jmx_jetty-web_heap_init' 92 | } 93 | metric { 94 | name = 'jmx_jetty-web_heap_used' 95 | } 96 | } 97 | 98 | -------------------------------------------------------------------------------- /memcached/conf.d/tokyotyrant.conf.tmpl: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "__HOSTNAME__" 4 | language = "python" 5 | 6 | param host { 7 | value = "__HOSTNAME__" 8 | } 9 | param port { 10 | value = 1978 11 | } 12 | param type { 13 | value = "Tokyo Tyrant" 14 | } 15 | 16 | param refresh_rate { 17 | value = 15 18 | } 19 | 20 | param metrix_prefix { 21 | value = "__HOSTNAME__" 22 | } 23 | param spoof_host { 24 | value = "IPADDRESS:HOSTNAME" 25 | } 26 | 27 | } 28 | } 29 | 30 | collection_group { 31 | collect_every = 20 32 | time_threshold = 90 33 | 34 | metric { 35 | name = "__HOSTNAME___curr_items" 36 | title = "Current number of items stored" 37 | value_threshold = 0 38 | } 39 | metric { 40 | name = "__HOSTNAME___cmd_get" 41 | title = "Cumulative number of retrieval reqs" 42 | value_threshold = 0 43 | } 44 | metric { 45 | name = "__HOSTNAME___cmd_set" 46 | title = "Cumulative number of storage reqs" 47 | value_threshold = 0 48 | } 49 | metric { 50 | name = "__HOSTNAME___bytes" 51 | title = "Current number of bytes used to store items" 52 | value_threshold = 0 53 | } 54 | metric { 55 | name = "__HOSTNAME___cmd_get_hits" 56 | title = "Number of keys that have been requested and found present " 57 | value_threshold = 0 58 | } 59 | metric { 60 | name = "__HOSTNAME___cmd_get_misses" 61 | title = "Number of items that have been requested and not found" 62 | value_threshold = 0 63 | } 64 | metric { 65 | name = "__HOSTNAME___cmd_set_hits" 66 | title = "Number of keys that have been stored and found present " 67 | value_threshold = 0 68 | } 69 | metric { 70 | name = "__HOSTNAME___cmd_set_misses" 71 | title = "Number of items that have been stored and not found" 72 | value_threshold = 0 73 | } 74 | metric { 75 | name = "__HOSTNAME___cmd_delete" 76 | title = "Cumulative number of delete reqs" 77 | value_threshold = 0 78 | } 79 | metric { 80 | name = "__HOSTNAME___cmd_delete_hits" 81 | title = "Number of keys that have been deleted and found present " 82 | value_threshold = 0 83 | } 84 | metric { 85 | name = "__HOSTNAME___cmd_delete_misses" 86 | title = "Number of items that have been deleted and not found" 87 | value_threshold = 0 88 | } 89 | 90 | } 91 | 92 | -------------------------------------------------------------------------------- /xenstats/graph.d/xen_mem_report.php: -------------------------------------------------------------------------------- 1 | 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 20 | * MA 02110-1301, USA. 21 | */ 22 | 23 | /* Pass in by reference! */ 24 | function graph_xen_mem_report ( &$rrdtool_graph ) { 25 | 26 | global $context, 27 | $hostname, 28 | $mem_shared_color, 29 | $mem_cached_color, 30 | $mem_buffered_color, 31 | $mem_swapped_color, 32 | $mem_used_color, 33 | $cpu_num_color, 34 | $range, 35 | $rrd_dir, 36 | $size; 37 | 38 | $title = 'Xen Memory'; 39 | if ($context != 'host') { 40 | $rrdtool_graph['title'] = $title; 41 | } else { 42 | $rrdtool_graph['title'] = "$hostname $title last $range"; 43 | } 44 | $rrdtool_graph['lower-limit'] = '0'; 45 | $rrdtool_graph['vertical-label'] = 'Bytes'; 46 | $rrdtool_graph['extras'] = '--rigid --base 1024'; 47 | 48 | $series = "DEF:'xen_mem'='${rrd_dir}/xen_mem.rrd':'sum':AVERAGE " 49 | ."CDEF:'bxen_mem'=xen_mem,1024,* " 50 | 51 | ."DEF:'xen_mem_use'='${rrd_dir}/xen_mem_use.rrd':'sum':AVERAGE " 52 | ."CDEF:'bxen_mem_use'=xen_mem_use,1024,* " 53 | 54 | ."CDEF:'bxen_mem_free'='bxen_mem','xen_mem_use',- " 55 | 56 | ."AREA:'bxen_mem_use'#$mem_used_color:'Memory Used' "; 57 | $series .= "LINE2:'bxen_mem'#$cpu_num_color:'Total In-Core Memory' "; 58 | 59 | 60 | $rrdtool_graph['series'] = $series; 61 | 62 | return $rrdtool_graph; 63 | 64 | } 65 | 66 | ?> 67 | -------------------------------------------------------------------------------- /scribe/python_modules/scribe_stats.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | import sys 5 | import subprocess 6 | import re 7 | import time 8 | 9 | from subprocess import Popen, PIPE, STDOUT 10 | 11 | descriptors = list() 12 | Debug = False 13 | 14 | last_mps_timestamp = float(0) 15 | last_mps_value = 0 16 | 17 | def dprint(f, *v): 18 | if Debug: 19 | print >>sys.stderr, "DEBUG: "+f % v 20 | 21 | def GetOverallMessagesPerSecond(name): 22 | dprint("%s", name) 23 | 24 | global last_mps_timestamp, last_mps_value 25 | 26 | # get the current value 27 | rc, output = run_cmd(["/usr/sbin/scribe_ctrl", "counters"]) 28 | 29 | # return 0 if command fails 30 | if rc: 31 | return float(0) 32 | 33 | match = re.compile(r"^scribe_overall:received good: (\d+)$", re.MULTILINE).search(output) 34 | value = int(match.group(1)) 35 | 36 | # save current value 37 | value_diff = value - last_mps_value 38 | last_mps_value = value 39 | 40 | # calculate seconds that have passed since last call 41 | current_time = time.time() 42 | elapsed = current_time - last_mps_timestamp 43 | 44 | # save current timestamp 45 | first_run = last_mps_timestamp is 0 46 | last_mps_timestamp = current_time 47 | 48 | if first_run: 49 | return float(0) 50 | 51 | return float(value_diff / elapsed) 52 | 53 | def run_cmd(arglist): 54 | '''Run a command and capture output.''' 55 | 56 | try: 57 | p = Popen(arglist, stdout=PIPE, stderr=PIPE) 58 | output, errors = p.communicate() 59 | except OSError, e: 60 | return (1, '') 61 | 62 | return (p.returncode, output) 63 | 64 | def metric_init(params): 65 | '''Create the metric definition dictionary object for each metric.''' 66 | 67 | global descriptors 68 | 69 | d1 = { 70 | 'name': 'scribe_overall_messages_per_second', 71 | 'call_back': GetOverallMessagesPerSecond, 72 | 'time_max': 90, 73 | 'value_type': 'float', 74 | 'units': 'msg/sec', 75 | 'slope': 'both', 76 | 'format': '%f', 77 | 'description': 'Average number of messages sent per second', 78 | 'groups': 'scribe' 79 | } 80 | 81 | descriptors = [d1] 82 | return descriptors 83 | 84 | def metric_cleanup(): 85 | '''Clean up the metric module.''' 86 | pass 87 | 88 | if __name__ == '__main__': 89 | metric_init({}) 90 | 91 | # setup last timestamp as 10 seconds ago 92 | last_mps_timestamp = time.time() - 10 93 | 94 | for d in descriptors: 95 | v = d['call_back'](d['name']) 96 | print '%s: %s' % (d['name'], v) 97 | -------------------------------------------------------------------------------- /apache_status/conf.d/apache_status.pyconf: -------------------------------------------------------------------------------- 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 | } 23 | 24 | collection_group { 25 | collect_every = 30 26 | time_threshold = 90 27 | 28 | metric { 29 | name = "ap_busy_workers" 30 | title = "Busy Threads" 31 | value_threshold = 0 32 | } 33 | metric { 34 | name = "ap_idle_workers" 35 | title = "Idle Threads" 36 | value_threshold = 0 37 | } 38 | metric { 39 | name = "ap_logging" 40 | title = "Logging" 41 | value_threshold = 0 42 | } 43 | metric { 44 | name = "ap_open_slot" 45 | title = "Open slot with no current process" 46 | value_threshold = 0 47 | } 48 | metric { 49 | name = "ap_reading_request" 50 | title = "Reading Request" 51 | value_threshold = 0 52 | } 53 | metric { 54 | name = "ap_waiting" 55 | title = "Waiting for Connection" 56 | value_threshold = 0 57 | } 58 | metric { 59 | name = "ap_sending_reply" 60 | title = "Sending Reply" 61 | value_threshold = 0 62 | } 63 | metric { 64 | name = "ap_idle" 65 | title = "Idle cleanup of worker" 66 | value_threshold = 0 67 | } 68 | metric { 69 | name = "ap_dns_lookup" 70 | title = "DNS Lookup" 71 | value_threshold = 0 72 | } 73 | metric { 74 | name = "ap_closing" 75 | title = "Closing connection" 76 | value_threshold = 0 77 | } 78 | metric { 79 | name = "ap_starting" 80 | title = "Starting up" 81 | value_threshold = 0 82 | } 83 | metric { 84 | name = "ap_gracefully_fin" 85 | title = "Gracefully finishing" 86 | value_threshold = 0 87 | } 88 | metric { 89 | name = "ap_keepalive" 90 | title = "Keepalive (read)" 91 | value_threshold = 0 92 | } 93 | 94 | metric { 95 | name = "ap_rps" 96 | title = "Requests per second" 97 | value_threshold = 0.0 98 | } 99 | 100 | metric { 101 | name = "ap_cpuload" 102 | title = "Pct of time CPU utilized" 103 | value_threshold = 0.0 104 | } 105 | 106 | # Uncomment if you are collecting SSL metrics 107 | # metric { 108 | # name_match = "apssl_(.+)" 109 | # value_threshold = 0.0 110 | # } 111 | 112 | 113 | } 114 | -------------------------------------------------------------------------------- /memcached_maxage/conf.d/memcached.pyconf: -------------------------------------------------------------------------------- 1 | # Gmond configuration for memcached metric module 2 | # Install to /etc/ganglia/conf.d 3 | 4 | modules { 5 | module { 6 | name = "memcached" 7 | language = "python" 8 | param host { 9 | value = "127.0.0.1" 10 | } 11 | param port { 12 | value = "11211" 13 | } 14 | } 15 | } 16 | 17 | collection_group { 18 | collect_every = 10 19 | time_threshold = 60 20 | 21 | metric { 22 | name = "curr_items" 23 | title = "curr_items" 24 | } 25 | metric { 26 | name = "total_items" 27 | title = "total_items" 28 | } 29 | metric { 30 | name = "bytes" 31 | title = "bytes" 32 | } 33 | metric { 34 | name = "curr_connections" 35 | title = "curr_connections" 36 | } 37 | metric { 38 | name = "total_connections" 39 | title = "total_connections" 40 | } 41 | metric { 42 | name = "connection_structures" 43 | title = "connection_structures" 44 | } 45 | metric { 46 | name = "cmd_get" 47 | title = "cmd_get" 48 | } 49 | metric { 50 | name = "cmd_set" 51 | title = "cmd_set" 52 | } 53 | metric { 54 | name = "get_hits" 55 | title = "get_hits" 56 | } 57 | metric { 58 | name = "get_misses" 59 | title = "get_misses" 60 | } 61 | metric { 62 | name = "delete_hits" 63 | title = "delete_hits" 64 | } 65 | metric { 66 | name = "delete_misses" 67 | title = "delete_misses" 68 | } 69 | metric { 70 | name = "incr_hits" 71 | title = "incr_hits" 72 | } 73 | metric { 74 | name = "incr_misses" 75 | title = "incr_misses" 76 | } 77 | metric { 78 | name = "decr_hits" 79 | title = "decr_hits" 80 | } 81 | metric { 82 | name = "decr_misses" 83 | title = "decr_misses" 84 | } 85 | metric { 86 | name = "cas_hits" 87 | title = "cas_hits" 88 | } 89 | metric { 90 | name = "cas_misses" 91 | title = "cas_misses" 92 | } 93 | metric { 94 | name = "evictions" 95 | title = "evictions" 96 | } 97 | metric { 98 | name = "bytes_read" 99 | title = "bytes_read" 100 | } 101 | metric { 102 | name = "bytes_written" 103 | title = "bytes_written" 104 | } 105 | metric { 106 | name = "limit_maxbytes" 107 | title = "limit_maxbytes" 108 | } 109 | metric { 110 | name = "threads" 111 | title = "threads" 112 | } 113 | metric { 114 | name = "conn_yields" 115 | title = "conn_yields" 116 | } 117 | metric { 118 | name = "age_mean" 119 | title = "age_mean" 120 | } 121 | metric { 122 | name = "age_median" 123 | title = "age_median" 124 | } 125 | metric { 126 | name = "age_min" 127 | title = "age_min" 128 | } 129 | metric { 130 | name = "age_max" 131 | title = "age_max" 132 | } 133 | } 134 | -------------------------------------------------------------------------------- /mysql/conf.d/mysql.conf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "mysql" 4 | language = "python" 5 | param dbuser { 6 | value = "health" 7 | } 8 | param dbpasswd { 9 | value = "" 10 | } 11 | param dbhost { 12 | value = "" 13 | } 14 | } 15 | } 16 | 17 | collection_group { 18 | collect_every = 20 19 | time_threshold = 90 20 | metric { 21 | name = "my_select" 22 | title = "SELECT query" 23 | value_threshold = 0 24 | } 25 | metric { 26 | name = "my_insert" 27 | title = "INSERT query" 28 | value_threshold = 0 29 | } 30 | metric { 31 | name = "my_update" 32 | title = "UPDATE query" 33 | value_threshold = 0 34 | } 35 | metric { 36 | name = "my_delete" 37 | title = "DELETE query" 38 | value_threshold = 0 39 | } 40 | 41 | metric { 42 | name = "my_qps" 43 | title = "queries per second" 44 | value_threshold = 0 45 | } 46 | metric { 47 | name = "my_slow_queries" 48 | title = "total number of slow queries" 49 | value_threshold = 0 50 | } 51 | 52 | metric { 53 | name = "my_threads_connected" 54 | title = "threads connected" 55 | value_threshold = 0 56 | } 57 | metric { 58 | name = "my_threads_running" 59 | title = "threads running" 60 | value_threshold = 0 61 | } 62 | 63 | metric { 64 | name = "my_innodb_free" 65 | title = "Innodb free area" 66 | value_threshold = 0 67 | } 68 | 69 | metric { 70 | name = "my_innodb_buffer_pool_hit" 71 | title = "Innodb buffer pool hit ratio" 72 | value_threshold = 0 73 | } 74 | metric { 75 | name = "my_innodb_buffer_pool_dirty_pages" 76 | title = "Innodb buffer pool dirty pages ratio" 77 | value_threshold = 0 78 | } 79 | metric { 80 | name = "my_innodb_buffer_pool_total" 81 | title = "Innodb total size of buffer pool" 82 | value_threshold = 0 83 | } 84 | metric { 85 | name = "my_innodb_buffer_pool_free" 86 | title = "Innodb free size of buffer pool" 87 | value_threshold = 0 88 | } 89 | 90 | metric { 91 | name = "my_qcache_free" 92 | title = "query cache free" 93 | value_threshold = 0 94 | } 95 | 96 | metric { 97 | name = "my_key_cache" 98 | title = "key cache hit ratio" 99 | value_threshold = 0 100 | } 101 | metric { 102 | name = "my_query_cache" 103 | title = "query cache hit ratio" 104 | value_threshold = 0 105 | } 106 | metric { 107 | name = "my_table_lock_immediate" 108 | title = "table lock immediate ratio" 109 | value_threshold = 0 110 | } 111 | metric { 112 | name = "my_thread_cache" 113 | title = "my_thread_cache" 114 | value_threshold = 0 115 | } 116 | metric { 117 | name = "my_tmp_table_on_memory" 118 | title = "tmp table on memory ratio" 119 | value_threshold = 0 120 | } 121 | } 122 | -------------------------------------------------------------------------------- /jmxsh/extra/jmxsh.r25.patch: -------------------------------------------------------------------------------- 1 | Index: src/jmxsh/JInterp.java 2 | =================================================================== 3 | --- src/jmxsh/JInterp.java (revision 25) 4 | +++ src/jmxsh/JInterp.java (working copy) 5 | @@ -24,6 +24,8 @@ 6 | 7 | import org.apache.log4j.*; 8 | import tcl.lang.*; 9 | +import java.io.InputStreamReader; 10 | +import java.io.BufferedReader; 11 | 12 | class JInterp extends Interp { 13 | 14 | @@ -111,6 +113,21 @@ 15 | } 16 | } 17 | 18 | + static void evaluateStdin() { 19 | + try { 20 | + BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); 21 | + String strLine; 22 | + while ((strLine = br.readLine()) != null) { 23 | + //System.out.println(strLine); 24 | + instance.eval(strLine); 25 | + } 26 | + } 27 | + catch (Exception e) { 28 | + logger.error("Tcl error while evaluating stdin.", e); 29 | + throw new IllegalArgumentException("Error processing stdin" + instance.getResult().toString()); 30 | + } 31 | + } 32 | + 33 | static void processTclEvents() { 34 | try { 35 | Notifier.processTclEvents(instance.getNotifier()); 36 | Index: src/jmxsh/Main.java 37 | =================================================================== 38 | --- src/jmxsh/Main.java (revision 25) 39 | +++ src/jmxsh/Main.java (working copy) 40 | @@ -153,6 +153,13 @@ 41 | .hasArg(false) 42 | .create("I") 43 | ); 44 | + 45 | + opts.addOption( 46 | + OptionBuilder.withLongOpt("quiet") 47 | + .withDescription("Quiet mode. Do not go into interactive mode.") 48 | + .hasArg(false) 49 | + .create("q") 50 | + ); 51 | 52 | opts.addOption( 53 | OptionBuilder.withLongOpt("browse") 54 | @@ -343,10 +350,24 @@ 55 | } 56 | } 57 | 58 | - // 5b. Otherwise, start interactive session. 59 | 60 | - interactive = true; 61 | - historyEnabled = true; 62 | + // Run stdinput commands 63 | + if (commandLine.hasOption("quiet")) { 64 | + 65 | + JInterp.setGlobal("argv", scriptArgs, 1); 66 | + JInterp.setGlobal("argc", scriptArgs.length-1); 67 | + 68 | + JInterp.evaluateStdin(); 69 | + 70 | + System.exit(0); 71 | + } else { 72 | + 73 | + // 5b. Otherwise, start interactive session 74 | + 75 | + interactive = true; 76 | + historyEnabled = true; 77 | + } 78 | + 79 | if (commandLine.hasOption("nohistory")) { 80 | historyEnabled = false; 81 | } 82 | @@ -438,7 +459,7 @@ 83 | System.err.println("Exception caught: " + e.getMessage()); 84 | } 85 | } 86 | - } 87 | + } 88 | 89 | } 90 | 91 | -------------------------------------------------------------------------------- /memcached/conf.d/memcached.conf.tmpl: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "__HOSTNAME__" 4 | language = "python" 5 | 6 | param host { 7 | value = "__HOSTNAME__" 8 | } 9 | param port { 10 | value = 11211 11 | } 12 | param type { 13 | value = "memcached" 14 | } 15 | 16 | param refresh_rate { 17 | value = 15 18 | } 19 | 20 | param metrix_prefix { 21 | value = "__HOSTNAME__" 22 | } 23 | param spoof_host { 24 | value = "__IPADDRESS__:__HOSTNAME__" 25 | } 26 | } 27 | } 28 | 29 | collection_group { 30 | collect_every = 20 31 | time_threshold = 90 32 | 33 | metric { 34 | name = "__HOSTNAME___curr_items" 35 | title = "Current number of items stored" 36 | value_threshold = 0 37 | } 38 | metric { 39 | name = "__HOSTNAME___cmd_get" 40 | title = "Cumulative number of retrieval reqs" 41 | value_threshold = 0 42 | } 43 | metric { 44 | name = "__HOSTNAME___cmd_set" 45 | title = "Cumulative number of storage reqs" 46 | value_threshold = 0 47 | } 48 | metric { 49 | name = "__HOSTNAME___cmd_get_rate" 50 | title = "Retrieval reqs/sec" 51 | value_threshold = 0 52 | } 53 | metric { 54 | name = "__HOSTNAME___cmd_set_rate" 55 | title = "Storage reqs/sec" 56 | value_threshold = 0 57 | } 58 | metric { 59 | name = "__HOSTNAME___bytes_read" 60 | title = "Total number of bytes read by this server from network" 61 | value_threshold = 0 62 | } 63 | metric { 64 | name = "__HOSTNAME___bytes_written" 65 | title = "Total number of bytes sent by this server to network" 66 | value_threshold = 0 67 | } 68 | metric { 69 | name = "__HOSTNAME___bytes" 70 | title = "Current number of bytes used to store items" 71 | value_threshold = 0 72 | } 73 | metric { 74 | name = "__HOSTNAME___limit_maxbytes" 75 | title = "Number of bytes this server is allowed to use for storage" 76 | value_threshold = 0 77 | } 78 | metric { 79 | name = "__HOSTNAME___curr_connections" 80 | title = "Number of open connections" 81 | value_threshold = 0 82 | } 83 | metric { 84 | name = "__HOSTNAME___evictions" 85 | title = "Number of valid items removed from cache to free memory for new items" 86 | value_threshold = 0 87 | } 88 | metric { 89 | name = "__HOSTNAME___get_hits" 90 | title = "Number of keys that have been requested and found present " 91 | value_threshold = 0 92 | } 93 | metric { 94 | name = "__HOSTNAME___get_misses" 95 | title = "Number of items that have been requested and not found" 96 | value_threshold = 0 97 | } 98 | metric { 99 | name = "__HOSTNAME___get_hits_rate" 100 | title = "Hits/sec" 101 | value_threshold = 0 102 | } 103 | metric { 104 | name = "__HOSTNAME___get_misses_rate" 105 | title = "Misses/sec" 106 | value_threshold = 0 107 | } 108 | 109 | } 110 | -------------------------------------------------------------------------------- /memcached/conf.d/memcached.conf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "memcached" 4 | language = "python" 5 | 6 | param host { 7 | value = "localhost" 8 | } 9 | param port { 10 | value = 11211 11 | } 12 | param type { 13 | value = "memcached" 14 | } 15 | 16 | param refresh_rate { 17 | value = 15 18 | } 19 | 20 | # param metrix_prefix { 21 | # value = "mc" 22 | # } 23 | # param spoof_host { 24 | # value = "__IPADDRESS__:__HOSTNAME__" 25 | # } 26 | } 27 | } 28 | 29 | collection_group { 30 | collect_every = 20 31 | time_threshold = 90 32 | 33 | metric { 34 | name = "mc_curr_items" 35 | title = "Current number of items stored" 36 | value_threshold = 0 37 | } 38 | metric { 39 | name = "mc_cmd_get" 40 | title = "Cumulative number of retrieval reqs" 41 | value_threshold = 0 42 | } 43 | metric { 44 | name = "mc_cmd_set" 45 | title = "Cumulative number of storage reqs" 46 | value_threshold = 0 47 | } 48 | metric { 49 | name = "mc_cmd_get_rate" 50 | title = "Retrieval reqs/sec" 51 | value_threshold = 0 52 | } 53 | metric { 54 | name = "mc_cmd_set_rate" 55 | title = "Storage reqs/sec" 56 | value_threshold = 0 57 | } 58 | metric { 59 | name = "mc_bytes_read" 60 | title = "Total number of bytes read by this server from network" 61 | value_threshold = 0 62 | } 63 | metric { 64 | name = "mc_bytes_written" 65 | title = "Total number of bytes sent by this server to network" 66 | value_threshold = 0 67 | } 68 | metric { 69 | name = "mc_bytes" 70 | title = "Current number of bytes used to store items" 71 | value_threshold = 0 72 | } 73 | metric { 74 | name = "mc_limit_maxbytes" 75 | title = "Number of bytes this server is allowed to use for storage" 76 | value_threshold = 0 77 | } 78 | metric { 79 | name = "mc_curr_connections" 80 | title = "Number of open connections" 81 | value_threshold = 0 82 | } 83 | metric { 84 | name = "mc_evictions" 85 | title = "Number of valid items removed from cache to free memory for new items" 86 | value_threshold = 0 87 | } 88 | metric { 89 | name = "mc_evictions_rate" 90 | title = "Rate of valid items removed from cache to free memory for new items" 91 | value_threshold = 0 92 | } 93 | metric { 94 | name = "mc_get_hits" 95 | title = "Number of keys that have been requested and found present " 96 | value_threshold = 0 97 | } 98 | metric { 99 | name = "mc_get_misses" 100 | title = "Number of items that have been requested and not found" 101 | value_threshold = 0 102 | } 103 | metric { 104 | name = "mc_get_hits_rate" 105 | title = "Hits/sec" 106 | value_threshold = 0 107 | } 108 | metric { 109 | name = "mc_get_misses_rate" 110 | title = "Misses/sec" 111 | value_threshold = 0 112 | } 113 | 114 | } 115 | -------------------------------------------------------------------------------- /mongodb/conf.d/mongodb.conf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "mongodb" 4 | language = "python" 5 | param server_status { 6 | value = "mongo --quiet --eval 'printjson(db.serverStatus())'" 7 | } 8 | param rs_status { 9 | value = "mongo --quiet --eval 'printjson(rs.status())'" 10 | } 11 | } 12 | } 13 | 14 | collection_group { 15 | collect_every = 30 16 | time_threshold = 90 17 | metric { 18 | name = "mongodb_opcounters_insert" 19 | title = "Inserts" 20 | } 21 | metric { 22 | name = "mongodb_opcounters_query" 23 | title = "Queries" 24 | } 25 | metric { 26 | name = "mongodb_opcounters_update" 27 | title = "Updates" 28 | } 29 | metric { 30 | name = "mongodb_opcounters_delete" 31 | title = "Deletes" 32 | } 33 | metric { 34 | name = "mongodb_opcounters_getmore" 35 | title = "Getmores" 36 | } 37 | metric { 38 | name = "mongodb_opcounters_command" 39 | title = "Commands" 40 | } 41 | metric { 42 | name = "mongodb_backgroundFlushing_flushes" 43 | title = "Flushes" 44 | } 45 | metric { 46 | name = "mongodb_mem_mapped" 47 | title = "Memory-mapped Data" 48 | } 49 | metric { 50 | name = "mongodb_mem_virtual" 51 | title = "Process Virtual Size" 52 | } 53 | metric { 54 | name = "mongodb_mem_resident" 55 | title = "Process Resident Size" 56 | } 57 | metric { 58 | name = "mongodb_extra_info_page_faults" 59 | title = "Page Faults" 60 | } 61 | metric { 62 | name = "mongodb_globalLock_ratio" 63 | title = "Global Write Lock Ratio" 64 | } 65 | metric { 66 | name = "mongodb_indexCounters_btree_miss_ratio" 67 | title = "BTree Page Miss Ratio" 68 | } 69 | metric { 70 | name = "mongodb_globalLock_currentQueue_total" 71 | title = "Total Operations Waiting for Lock" 72 | } 73 | metric { 74 | name = "mongodb_globalLock_currentQueue_readers" 75 | title = "Readers Waiting for Lock" 76 | } 77 | metric { 78 | name = "mongodb_globalLock_currentQueue_writers" 79 | title = "Writers Waiting for Lock" 80 | } 81 | metric { 82 | name = "mongodb_globalLock_activeClients_total" 83 | title = "Total Active Clients" 84 | } 85 | metric { 86 | name = "mongodb_globalLock_activeClients_readers" 87 | title = "Active Readers" 88 | } 89 | metric { 90 | name = "mongodb_globalLock_activeClients_writers" 91 | title = "Active Writers" 92 | } 93 | metric { 94 | name = "mongodb_connections_current" 95 | title = "Open Connections" 96 | } 97 | metric { 98 | name = "mongodb_connections_current_ratio" 99 | title = "Open Connections" 100 | } 101 | metric { 102 | name = "mongodb_slave_delay" 103 | title = "Replica Set Slave Delay" 104 | } 105 | metric { 106 | name = "mongodb_asserts_total" 107 | title = "Asserts per Second" 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /riak/riak.conf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "riak" 4 | language = "python" 5 | param url { 6 | value = "http://localhost:8098/stats" 7 | } 8 | } 9 | } 10 | 11 | collection_group { 12 | collect_every = 20 13 | time_threshold = 90 14 | 15 | metric { 16 | name = "riak_node_get_fsm_time_mean" 17 | title = "Mean for riak_kv_get_fsm calls" 18 | value_threshold = 0 19 | } 20 | metric { 21 | name = "riak_ring_creation_size" 22 | title = "riak_ring_creation_size" 23 | value_threshold = 0 24 | } 25 | metric { 26 | name = "riak_vnode_puts" 27 | title = "Puts handled by local vnodes in the last minute" 28 | value_threshold = 0 29 | } 30 | metric { 31 | name = "riak_node_get_fsm_time_95" 32 | title = "95th percentile for riak_kv_get_fsm calls" 33 | value_threshold = 0 34 | } 35 | metric { 36 | name = "riak_node_put_fsm_time_mean" 37 | title = "Mean for riak_kv_put_fsm calls" 38 | value_threshold = 0 39 | } 40 | metric { 41 | name = "riak_node_put_fsm_time_100" 42 | title = "100th percentile for riak_kv_put_fsm calls" 43 | value_threshold = 0 44 | } 45 | metric { 46 | name = "riak_pbc_active" 47 | title = "Active pb socket connections" 48 | value_threshold = 0 49 | } 50 | metric { 51 | name = "riak_node_get_fsm_time_median" 52 | title = "Median for riak_kv_get_fsm calls" 53 | value_threshold = 0 54 | } 55 | metric { 56 | name = "riak_node_puts" 57 | title = "Puts coordinated by this node in the last minute" 58 | value_threshold = 0 59 | } 60 | metric { 61 | name = "riak_sys_process_count" 62 | title = "riak_sys_process_count" 63 | value_threshold = 0 64 | } 65 | metric { 66 | name = "riak_node_put_fsm_time_median" 67 | title = "Median for riak_kv_put_fsm calls" 68 | value_threshold = 0 69 | } 70 | metric { 71 | name = "riak_vnode_gets" 72 | title = "Gets handled by local vnodes in the last minute" 73 | value_threshold = 0 74 | } 75 | metric { 76 | name = "riak_node_get_fsm_time_99" 77 | title = "99th percentile for riak_kv_get_fsm calls" 78 | value_threshold = 0 79 | } 80 | metric { 81 | name = "riak_node_get_fsm_time_100" 82 | title = "100th percentile for riak_kv_get_fsm calls" 83 | value_threshold = 0 84 | } 85 | metric { 86 | name = "riak_node_put_fsm_time_95" 87 | title = "95th percentile for riak_kv_put_fsm calls" 88 | value_threshold = 0 89 | } 90 | metric { 91 | name = "riak_read_repairs" 92 | title = "riak_read_repairs" 93 | value_threshold = 0 94 | } 95 | metric { 96 | name = "riak_node_gets" 97 | title = "Gets coordinated by this node in the last minute" 98 | value_threshold = 0 99 | } 100 | metric { 101 | name = "riak_mem_total" 102 | title = "riak_mem_total" 103 | value_threshold = 0 104 | } 105 | metric { 106 | name = "riak_ring_num_partitions" 107 | title = "riak_ring_num_partitions" 108 | value_threshold = 0 109 | } 110 | metric { 111 | name = "riak_mem_allocated" 112 | title = "riak_mem_allocated" 113 | value_threshold = 0 114 | } 115 | metric { 116 | name = "riak_node_put_fsm_time_99" 117 | title = "99th percentile for riak_kv_put_fsm calls" 118 | value_threshold = 0 119 | } 120 | } -------------------------------------------------------------------------------- /apache_status/graph.d/apache_status_report.php: -------------------------------------------------------------------------------- 1 | 83 | -------------------------------------------------------------------------------- /kestrel/conf.d/kestrel.conf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "kstats" 4 | language = "python" 5 | 6 | param host { 7 | value = "localhost" 8 | } 9 | param port { 10 | value = 22133 11 | } 12 | param type { 13 | value = "kstats" 14 | } 15 | 16 | param refresh_rate { 17 | value = 15 18 | } 19 | 20 | param metrix_prefix { 21 | value = "ks" 22 | } 23 | param queues { 24 | value = "my_queue01,my_queue02" 25 | } 26 | 27 | } 28 | } 29 | 30 | collection_group { 31 | collect_every = 20 32 | time_threshold = 90 33 | 34 | metric { 35 | name = "ks_curr_items" 36 | value_threshold = 0 37 | } 38 | metric { 39 | name = "ks_cmd_get" 40 | value_threshold = 0 41 | } 42 | metric { 43 | name = "ks_cmd_set" 44 | value_threshold = 0 45 | } 46 | metric { 47 | name = "ks_bytes_read" 48 | value_threshold = 0 49 | } 50 | metric { 51 | name = "ks_bytes_written" 52 | value_threshold = 0 53 | } 54 | metric { 55 | name = "ks_bytes" 56 | value_threshold = 0 57 | } 58 | metric { 59 | name = "ks_curr_connections" 60 | value_threshold = 0 61 | } 62 | metric { 63 | name = "ks_get_hits" 64 | value_threshold = 0 65 | } 66 | metric { 67 | name = "ks_get_misses" 68 | value_threshold = 0 69 | } 70 | metric { 71 | name = "ks_queue_my_queue01_items" 72 | value_threshold = 0 73 | } 74 | metric { 75 | name = "ks_queue_my_queue01_bytes" 76 | value_threshold = 0 77 | } 78 | metric { 79 | name = "ks_queue_my_queue01_total_items" 80 | value_threshold = 0 81 | } 82 | metric { 83 | name = "ks_queue_my_queue01_logsize" 84 | value_threshold = 0 85 | } 86 | metric { 87 | name = "ks_queue_my_queue01_expired_items" 88 | value_threshold = 0 89 | } 90 | metric { 91 | name = "ks_queue_my_queue01_mem_items" 92 | value_threshold = 0 93 | } 94 | metric { 95 | name = "ks_queue_my_queue01_mem_bytes" 96 | value_threshold = 0 97 | } 98 | metric { 99 | name = "ks_queue_my_queue01_age" 100 | value_threshold = 0 101 | } 102 | metric { 103 | name = "ks_queue_my_queue01_discarded" 104 | value_threshold = 0 105 | } 106 | metric { 107 | name = "ks_queue_my_queue01_waiters" 108 | value_threshold = 0 109 | } 110 | metric { 111 | name = "ks_queue_my_queue02_items" 112 | value_threshold = 0 113 | } 114 | metric { 115 | name = "ks_queue_my_queue02_bytes" 116 | value_threshold = 0 117 | } 118 | metric { 119 | name = "ks_queue_my_queue02_total_items" 120 | value_threshold = 0 121 | } 122 | metric { 123 | name = "ks_queue_my_queue02_logsize" 124 | value_threshold = 0 125 | } 126 | metric { 127 | name = "ks_queue_my_queue02_expired_items" 128 | value_threshold = 0 129 | } 130 | metric { 131 | name = "ks_queue_my_queue02_mem_items" 132 | value_threshold = 0 133 | } 134 | metric { 135 | name = "ks_queue_my_queue02_mem_bytes" 136 | value_threshold = 0 137 | } 138 | metric { 139 | name = "ks_queue_my_queue02_age" 140 | value_threshold = 0 141 | } 142 | metric { 143 | name = "ks_queue_my_queue02_discarded" 144 | value_threshold = 0 145 | } 146 | metric { 147 | name = "ks_queue_my_queue02_waiters" 148 | value_threshold = 0 149 | } 150 | } -------------------------------------------------------------------------------- /ipmi/python_modules/ipmi.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import re 3 | import time 4 | import copy 5 | import string 6 | import subprocess 7 | 8 | METRICS = { 9 | 'time' : 0, 10 | 'data' : {} 11 | } 12 | 13 | METRICS_CACHE_MAX = 5 14 | 15 | stats_pos = {} 16 | 17 | def get_metrics(): 18 | """Return all metrics""" 19 | 20 | global METRICS 21 | 22 | if (time.time() - METRICS['time']) > METRICS_CACHE_MAX: 23 | 24 | new_metrics = {} 25 | units = {} 26 | 27 | command = [ params['timeout_bin'] , "3", params['ipmitool_bin'] , "-H", params['ipmi_ip'] , "-U" , params['username'] , '-P', params['password'] , 'sensor'] 28 | 29 | p = subprocess.Popen(command, 30 | stdout=subprocess.PIPE).communicate()[0][:-1] 31 | 32 | for i, v in enumerate(p.split("\n")): 33 | data = v.split("|") 34 | try: 35 | metric_name = data[0].strip().lower().replace("+", "").replace(" ", "_") 36 | value = data[1].strip() 37 | 38 | # Skip missing sensors 39 | if re.search("(0x)", value ) or value == 'na': 40 | continue 41 | 42 | # Extract out a float value 43 | vmatch = re.search("([0-9.]+)", value) 44 | if not vmatch: 45 | continue 46 | metric_value = float(vmatch.group(1)) 47 | 48 | new_metrics[metric_name] = metric_value 49 | units[metric_name] = data[2].strip().replace("degrees C", "C") 50 | 51 | except ValueError: 52 | continue 53 | except IndexError: 54 | continue 55 | 56 | METRICS = { 57 | 'time': time.time(), 58 | 'data': new_metrics, 59 | 'units': units 60 | } 61 | 62 | return [METRICS] 63 | 64 | 65 | def get_value(name): 66 | """Return a value for the requested metric""" 67 | 68 | try: 69 | 70 | metrics = get_metrics()[0] 71 | 72 | prefix_length = len(params['metric_prefix']) + 1 73 | name = name[prefix_length:] # remove prefix from name 74 | 75 | result = metrics['data'][name] 76 | 77 | except Exception: 78 | result = 0 79 | 80 | return result 81 | 82 | def create_desc(skel, prop): 83 | d = skel.copy() 84 | for k,v in prop.iteritems(): 85 | d[k] = v 86 | return d 87 | 88 | def metric_init(params): 89 | global descriptors, metric_map, Desc_Skel 90 | 91 | descriptors = [] 92 | 93 | Desc_Skel = { 94 | 'name' : 'XXX', 95 | 'call_back' : get_value, 96 | 'time_max' : 60, 97 | 'value_type' : 'float', 98 | 'format' : '%.5f', 99 | 'units' : 'count/s', 100 | 'slope' : 'both', # zero|positive|negative|both 101 | 'description' : 'XXX', 102 | 'groups' : 'XXX', 103 | } 104 | 105 | metrics = get_metrics()[0] 106 | 107 | for item in metrics['data']: 108 | descriptors.append(create_desc(Desc_Skel, { 109 | "name" : params['metric_prefix'] + "_" + item, 110 | 'groups' : params['metric_prefix'], 111 | 'units' : metrics['units'][item] 112 | })) 113 | 114 | 115 | return descriptors 116 | 117 | def metric_cleanup(): 118 | '''Clean up the metric module.''' 119 | pass 120 | 121 | #This code is for debugging and unit testing 122 | if __name__ == '__main__': 123 | 124 | params = { 125 | "metric_prefix" : "ipmi", 126 | "ipmi_ip" : "10.1.2.3", 127 | "username" : "ADMIN", 128 | "password" : "secret" 129 | } 130 | descriptors = metric_init(params) 131 | 132 | while True: 133 | for d in descriptors: 134 | v = d['call_back'](d['name']) 135 | print '%s = %s' % (d['name'], v) 136 | print 'Sleeping 15 seconds' 137 | time.sleep(15) 138 | -------------------------------------------------------------------------------- /xenstats/python_modules/xenstats.py: -------------------------------------------------------------------------------- 1 | # xenstats.py 2 | # 3 | # Copyright 2011 Marcos Amorim 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 18 | # MA 02110-1301, USA. 19 | 20 | import libvirt 21 | import os 22 | import time 23 | 24 | descriptors = list() 25 | conn = libvirt.openReadOnly("xen:///") 26 | conn_info = conn.getInfo() 27 | 28 | def xen_vms(name): 29 | '''Return number of virtual is running''' 30 | global conn 31 | 32 | vm_count = conn.numOfDomains() 33 | 34 | return vm_count 35 | 36 | def xen_mem(name): 37 | '''Return node memory ''' 38 | global conn 39 | global conn_info 40 | 41 | # O xen retorna o valor da memoria em MB, vamos passar por KB 42 | return conn_info[1] * 1024 43 | 44 | def xen_cpu(name): 45 | '''Return numbers of CPU's''' 46 | global conn 47 | global conn_info 48 | 49 | return conn_info[2] 50 | 51 | 52 | def xen_mem_use(name): 53 | '''Return total memory usage''' 54 | global conn 55 | 56 | vm_mem = 0 57 | 58 | for id in conn.listDomainsID(): 59 | dom = conn.lookupByID(id) 60 | info = dom.info() 61 | vm_mem = vm_mem + info[2] 62 | 63 | return vm_mem 64 | 65 | def metric_init(params): 66 | global descriptors 67 | 68 | d1 = {'name': 'xen_vms', 69 | 'call_back': xen_vms, 70 | 'time_max': 20, 71 | 'value_type': 'uint', 72 | 'units': 'Qtd', 73 | 'slope': 'both', 74 | 'format': '%d', 75 | 'description': 'Total number of running vms', 76 | 'groups': 'xen', 77 | } 78 | d2 = {'name': 'xen_cpu', 79 | 'call_back': xen_cpu, 80 | 'time_max': 20, 81 | 'value_type': 'uint', 82 | 'units': 'CPUs', 83 | 'slope': 'both', 84 | 'format': '%d', 85 | 'description': 'CPUs', 86 | 'groups': 'xen' 87 | } 88 | 89 | d3 = {'name': 'xen_mem', 90 | 'call_back': xen_mem, 91 | 'time_max': 20, 92 | 'value_type': 'uint', 93 | 'units': 'KB', 94 | 'slope': 'both', 95 | 'format': '%d', 96 | 'description': 'Total memory Xen', 97 | 'groups': 'xen' 98 | } 99 | 100 | d4 = {'name': 'xen_mem_use', 101 | 'call_back': xen_mem_use, 102 | 'time_max': 20, 103 | 'value_type': 'uint', 104 | 'units': 'KB', 105 | 'slope': 'both', 106 | 'format': '%d', 107 | 'description': 'Memory Usage', 108 | 'groups': 'xen' 109 | } 110 | 111 | descriptors = [d1,d2,d3,d4] 112 | 113 | return descriptors 114 | 115 | def metric_cleanup(): 116 | '''Clean up the metric module.''' 117 | global conn 118 | conn.close() 119 | pass 120 | 121 | #This code is for debugging and unit testing 122 | if __name__ == '__main__': 123 | metric_init('init') 124 | for d in descriptors: 125 | v = d['call_back'](d['name']) 126 | print 'value for %s is %u' % (d['name'], v) 127 | 128 | --------------------------------------------------------------------------------