├── scribe ├── README.md ├── conf.d │ └── scribe_stats.pyconf └── python_modules │ └── scribe_stats.py ├── .gitignore ├── 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 ├── .travis.yml ├── diskstat ├── examples │ ├── IOTime.png │ ├── Operations.png │ ├── TimeOnDisk.png │ └── data_transferred.png └── 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 ├── postgresql └── README.md ├── mysql ├── README.mkdn └── conf.d │ └── mysql.conf ├── kestrel └── README.mkdn ├── system ├── hwmon │ ├── conf.d │ │ └── hwmon.pyconf │ ├── README.mkdn │ └── python_modules │ │ └── hwmon.py ├── vm_stats │ └── conf.d │ │ └── vm_stats.pyconf └── mem_fragmentation │ ├── conf.d │ └── mem_fragmentation.pyconf │ └── README.mkdn ├── influxdb ├── README.md └── conf.d │ └── influx.pyconf ├── cpu_temp ├── README.md ├── conf.d │ └── cpu_temp.pyconf └── python_modules │ └── cpu_temp.py ├── file_checks ├── file_checks.pyconf ├── README.mkdn └── file_checks.py ├── diskpart ├── README.mkdn └── conf.d │ └── diskpart.conf ├── network ├── conntrack │ ├── conf.d │ │ └── conntrack.pyconf │ └── README.mkdn ├── iface │ ├── README.md │ └── conf.d │ │ └── iface.pyconf ├── netstats │ ├── README.md │ └── conf.d │ │ └── netstats.basic.pyconf ├── netiron │ ├── netiron.pyconf │ └── README └── infiniband │ └── README.mkdn ├── vmax ├── vmax.pyconf └── README.mkdn ├── apc_status ├── README.mkdn ├── document_root │ └── apc-json.php └── conf.d │ └── apc_status.pyconf ├── lustre ├── graph.d │ ├── lusclt_rpc_report.json │ └── lusclt_rw_report.json ├── conf.d │ ├── lusclt_osc.pyconf │ └── lusclt_llite.pyconf └── README.md ├── usbrh ├── README.mkdn ├── conf.d │ └── usbrh.pyconf └── python_modules │ └── usbrh.py ├── docker └── docker.pyconf ├── blueeyes_service ├── README.mkdn └── conf.d │ └── blueeyes_service.conf ├── unbound ├── conf.d │ └── unbound.pyconf └── README.md ├── celery ├── conf.d │ └── celery.pyconf └── README.md ├── gpfs ├── conf.d │ └── gpfs.pyconf └── README.mkdn ├── netapp_api ├── conf.d │ ├── netapp_api.pyconf │ └── netapp_api_cmode.pyconf └── README.mkdn ├── elasticsearch ├── README.mkdn ├── graph.d │ └── es_report.json └── conf.d │ └── elasticsearch.pyconf ├── xenstats ├── README.mkdn ├── conf.d │ └── xenstats.pyconf └── graph.d │ ├── xen_vms_report.php │ └── xen_mem_report.php ├── tokyo_tyrant ├── README.mkdn └── conf.d │ └── tokyo_tyrant.conf ├── bind_xml ├── README.md └── conf.d │ └── bind_xml.pyconf ├── xrootd_stats ├── README.md └── conf.d │ └── xrootd_stats.pyconf ├── dns_latency ├── dnslatency.pyconf └── Readme.md ├── hhvm ├── graph.d │ ├── hhvm_mem_tcjit_data_report.json │ ├── hhvm_mem_tcjit_total_report.json │ ├── hhvm_mem_tcjit_code_hot_report.json │ ├── hhvm_mem_tcjit_code_cold_report.json │ ├── hhvm_mem_tcjit_code_main_report.json │ ├── hhvm_mem_tcjit_code_prof_report.json │ ├── hhvm_mem_tcjit_code_frozen_report.json │ ├── hhvm_vm_rds_aggregated_report.json │ ├── hhvm_mem_proc_report.json │ ├── hhvm_vm_tcspace_aggregated_report.json │ ├── hhvm_jemalloc_aggregated_report.json │ └── hhvm_mem_tcjit_aggregated_report.json └── conf.d │ └── hhvm.pyconf ├── twemproxy ├── README.md └── conf.d │ └── twemproxy.pyconf ├── win_perfcounter ├── conf.d │ └── win_perfcounter.pyconf └── README.mkdn ├── fibrechannel ├── fibrechannel.pyconf └── README.mkdn ├── gpu └── nvidia │ ├── graph.d │ ├── gpu_common.php │ ├── gpu_power_usage_report.php │ ├── gpu_power_violation_report.php │ ├── gpu_graphics_clock_report.php │ ├── gpu_mem_clock_report.php │ └── gpu_sm_clock_report.php │ ├── nvidia-ml-py-3.295.00 │ ├── PKG-INFO │ └── setup.py │ └── README ├── README.md ├── 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 ├── es_metrics └── conf.d │ └── es_metrics.pyconf ├── 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 ├── storm_topology └── conf.d │ └── storm_topology.pyconf ├── zeromq_pub ├── conf.d │ └── zpubmon.pyconf └── README.rst ├── recoverpoint4 ├── recoverpoint4.pyconf └── README.mkdn ├── memcached_maxage ├── README.md ├── python_modules │ └── every.py └── conf.d │ └── memcached.pyconf ├── jenkins ├── README.mkdn └── conf.d │ └── jenkins.pyconf ├── mongodb └── README.mkdn ├── kumofs ├── conf.d │ └── kumofs.conf └── README.mkdn ├── hp_3par ├── conf.d │ └── hp3par.pyconf └── README.mkdn ├── 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 ├── gmetad_meta_status └── conf.d │ └── gmetad_meta_status.pyconf ├── rabbit ├── README.mkdn └── conf.d │ └── rabbitmq.pyconf ├── ipmi ├── conf.d │ └── ipmi.pyconf └── README.mkdn ├── ehcache └── graph.d │ └── jmx_ehcache_hitrate_report.php ├── recoverpoint ├── recoverpoint.pyconf └── README.mkdn ├── php_fpm ├── conf.d │ └── php_fpm.pyconf └── README.mkdn ├── procstat └── graph.d │ ├── procstat_cpu_report.php │ └── procstat_mem_report.php ├── httpd ├── graph.d │ └── apache_workers_report.php └── conf.d │ └── httpd.pyconf ├── moab └── conf.d │ └── moab.pyconf ├── couchdb └── README.mkdn └── memcached └── conf.d └── memcached.conf.tmpl /scribe/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | *.pyc 3 | *.sublime-project 4 | *.sublime-workspace 5 | -------------------------------------------------------------------------------- /jmxsh/extra/jmxsh.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/gmond_python_modules/master/jmxsh/extra/jmxsh.jar -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: python 2 | python: 3 | - '2.6' 4 | - '2.7' 5 | script: 6 | - python -m compileall -f . 7 | -------------------------------------------------------------------------------- /diskstat/examples/IOTime.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/gmond_python_modules/master/diskstat/examples/IOTime.png -------------------------------------------------------------------------------- /diskstat/examples/Operations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/gmond_python_modules/master/diskstat/examples/Operations.png -------------------------------------------------------------------------------- /diskstat/examples/TimeOnDisk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/gmond_python_modules/master/diskstat/examples/TimeOnDisk.png -------------------------------------------------------------------------------- /diskstat/examples/data_transferred.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganglia/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 | -------------------------------------------------------------------------------- /postgresql/README.md: -------------------------------------------------------------------------------- 1 | Python module for Ganglia 3.4 2 | Postgresql metrics. Compatible with version 9.2 and above. 3 | 4 | Author: MBroers 5 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /influxdb/README.md: -------------------------------------------------------------------------------- 1 | Python module for Ganglia 3.4 2 | 3 | This module is compatible with influxDB version 0.9.4 and above. 4 | 5 | Additional python package: influxdb 6 | 7 | $ pip install influxdb 8 | $ pip install --upgrade influxdb 9 | 10 | Author: [aerokite](https://github.com/aerokite) 11 | -------------------------------------------------------------------------------- /cpu_temp/README.md: -------------------------------------------------------------------------------- 1 | # cpu_temp 2 | 3 | Python module for ganglia 4 | 5 | It reads temperature from /sys/devices/platform/coretemp.\*/ 6 | 7 | So, you need to insert the `coretemp` kernel module. 8 | 9 | Usually, the command is `modprobe coretemp`. 10 | -------------------------------------------------------------------------------- /file_checks/file_checks.pyconf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "filechecks" 4 | language = "python" 5 | } 6 | } 7 | 8 | collection_group { 9 | collect_every = 10 10 | time_threshold = 45 11 | 12 | metric { 13 | name_match = "filechecks_(.+)" 14 | value_threshold = 1.0 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /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 partition. 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 | -------------------------------------------------------------------------------- /cpu_temp/conf.d/cpu_temp.pyconf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "cpu_temp" 4 | language = "python" 5 | } 6 | } 7 | 8 | collection_group { 9 | collect_every = 10 10 | time_threshold = 50 11 | 12 | metric { 13 | name_match = "cpu_temp_(.+)" 14 | value_threshold = 1.0 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /vmax/vmax.pyconf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "vmax" 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 = "vmax(.+)" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lustre/graph.d/lusclt_rpc_report.json: -------------------------------------------------------------------------------- 1 | { 2 | "report_name" : "lusclt_rpc_report", 3 | "report_type" : "standard", 4 | "title" : "Lustre Client RPC", 5 | "vertical_label" : "calls/s", 6 | "series" : [ 7 | { "metric": "lusclt_osc_total_ost_ops", "color": "FF0000", "label": "Home", "line_width": "2","type": "stack" } 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /usbrh/README.mkdn: -------------------------------------------------------------------------------- 1 | USBRH 2 | =============== 3 | python module for ganglia 3.1. 4 | 5 | This module parse output /proc/usbrh/X/temperature. 6 | This module required installation USBRH driver fo Linux(*1). 7 | 8 | 9 | (*1) USBRH driver for Linux 10 | 11 | 12 | ## AUTHOR 13 | 14 | NAOYA Nakazawa 15 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /docker/docker.pyconf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "ganglia_docker" 4 | language = "python" 5 | param docker_url { 6 | value = "unix://var/run/docker.sock" 7 | } 8 | 9 | } 10 | } 11 | 12 | collection_group { 13 | collect_every = 30 14 | time_threshold = 60 15 | metric { 16 | name_match = "docker_(.+)" 17 | value_threshold = 0.0 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /lustre/conf.d/lusclt_osc.pyconf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "lusclt_osc" 4 | language = "python" 5 | } 6 | } 7 | 8 | collection_group { 9 | collect_every = 60 10 | time_threshold = 600 11 | 12 | metric { 13 | name_match = "lusclt_osc_total_([a-zA-Z0-9]+)" 14 | } 15 | 16 | metric { 17 | name_match = "lusclt_([a-zA-Z0-9]+)_total_([a-zA-Z0-9]+)" 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 | -------------------------------------------------------------------------------- /unbound/conf.d/unbound.pyconf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "unbound" 4 | language = "python" 5 | param stats_command { 6 | value = "sudo /usr/sbin/unbound-control stats" 7 | } 8 | } 9 | } 10 | 11 | collection_group { 12 | collect_every = 30 13 | time_threshold = 60 14 | 15 | metric { 16 | name_match = "unbound_(.+)" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /celery/conf.d/celery.pyconf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "ganglia_celery" 4 | language = "python" 5 | param url { 6 | value = "http://localhost:10000/api/workers" 7 | } 8 | 9 | } 10 | } 11 | 12 | collection_group { 13 | collect_every = 30 14 | time_threshold = 60 15 | 16 | metric { 17 | name_match = "celery_(.+)" 18 | value_threshold = 0.0 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /gpfs/conf.d/gpfs.pyconf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "gpfs" 4 | language = "python" 5 | 6 | # Specify file systems you want to monitor or if empty it will 7 | # pick all devices 8 | param fs { 9 | value = '' 10 | } 11 | 12 | } 13 | } 14 | 15 | collection_group { 16 | collect_every = 15 17 | time_threshold = 60 18 | metric { 19 | name_match = "gpfs_(.+)" 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /usbrh/conf.d/usbrh.pyconf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "usbrh" 4 | language = "python" 5 | } 6 | } 7 | 8 | collection_group { 9 | collect_every = 60 10 | time_threshold = 90 11 | 12 | metric { 13 | name = "usbrh_temperature_0" 14 | title = "Temperature 0" 15 | value_threshold = 0 16 | } 17 | metric { 18 | name = "usbrh_temperature_1" 19 | title = "Temperature 1" 20 | value_threshold = 0 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 | -------------------------------------------------------------------------------- /lustre/graph.d/lusclt_rw_report.json: -------------------------------------------------------------------------------- 1 | { 2 | "report_name" : "lusclt_rm_report", 3 | "report_type" : "standard", 4 | "title" : "Lustre Client Bandwidth", 5 | "vertical_label" : "bytes/s", 6 | "series" : [ 7 | { "metric": "lusclt_osc_total_read_bytes_per_sec", "color": "FF8A60", "label": "Read", "line_width": "2","type": "stack" }, 8 | { "metric": "lusclt_osc_total_write_bytes_per_sec", "color": "FF0000", "label": "Write", "line_width": "2","type": "stack" } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /network/iface/README.md: -------------------------------------------------------------------------------- 1 | iface 2 | ===== 3 | 4 | 5 | Install 6 | ------- 7 | 8 | Copy iface.py from python_modules to your python modules directory, e.g. : 9 | 10 | - /usr/lib/ganglia/python_modules 11 | - /usr/lib64/ganglia/python_modules 12 | 13 | Copy iface.pyconf to the gmond conf.d directory, e.g. : 14 | 15 | - /etc/ganglia/conf.d/ 16 | 17 | Tune the iface.pyconf file to match your server interfaces and then restart gmond. 18 | 19 | ## AUTHOR 20 | 21 | Author: Sylvain Rabot https://github.com/sylr 22 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /bind_xml/README.md: -------------------------------------------------------------------------------- 1 | ## Overview 2 | 3 | Provides statistics (memory use, query counts) using the xml 4 | statistics from BIND versions >= 9.5. Parsing of the xml is done 5 | using [pybindxml](https://github.com/jforman/pybindxml). 6 | 7 | BIND configuration to enable looks something like: 8 | 9 | statistics-channels { 10 | inet 127.0.0.1 port 8053 allow {127.0.0.1;}; 11 | }; 12 | 13 | ## System Dependencies 14 | 15 | yum-rhel6: libxml2-devel libxslt-devel 16 | 17 | pip: pybindxml beautifulsoup4 lxml 18 | -------------------------------------------------------------------------------- /xrootd_stats/README.md: -------------------------------------------------------------------------------- 1 | XROOTD Stats 2 | ================ 3 | 4 | 5 | Install 6 | ---------------- 7 | 8 | Copy xrootd_stats.py from python_modules to your python modules directory, e.g. : 9 | 10 | - /usr/lib/ganglia/python_modules 11 | - /usr/lib64/ganglia/python_modules 12 | 13 | Copy xrootd_stats.pyconf to the gmond conf.d directory, e.g. : 14 | 15 | - /etc/ganglia/conf.d/ 16 | 17 | ### AUTHORS 18 | 19 | Authors: 20 | - Liviu Irimia https://github.com/liviuirimia/ 21 | - Sevcenco Adrian https://github.com/adriansev 22 | -------------------------------------------------------------------------------- /dns_latency/dnslatency.pyconf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = 'dnslatency' 4 | language = 'python' 5 | 6 | # Sample entry to show query string format 7 | # param googledns_dns_resolution { 8 | # # Format: SERVER_NAMENAME_TO_QUERYRECORD_TYPE 9 | # value = "google-public-dns-a.google.com google.com A" 10 | # } 11 | } 12 | } 13 | 14 | collection_group { 15 | collect_every = 60 16 | time_threshold = 60 17 | 18 | metric { 19 | name_match = "dnslatency_(.+)" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /hhvm/graph.d/hhvm_mem_tcjit_data_report.json: -------------------------------------------------------------------------------- 1 | { 2 | "report_name" : "hhvm mem tcjit data report", 3 | "report_type" : "standard", 4 | "title" : "hhvm mem tc/jit data", 5 | "vertical_label" : "Bytes", 6 | "series" : [ 7 | { "metric": "hhvm_mem_breakdown_tcjit_data_capacity", "color": "E51400", "label": "tc/jit data capacity", "line_width": "3", "type": "line" }, 8 | { "metric": "hhvm_mem_breakdown_tcjit_data_used", "color": "0050EF", "label": "tc/jit data used", "line_width": "2", "type": "stack" } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /twemproxy/README.md: -------------------------------------------------------------------------------- 1 | # Twemproxy Ganglia Metrics 2 | 3 | ## Gathers pool and servers statistics 4 | See [https://github.com/twitter/twemproxy#observability](https://github.com/twitter/twemproxy#observability) 5 | 6 | By default, the module gathers stats of all active pools and its list of servers. 7 | Use the "exclude" param to skip gathering stats of a pool and its list of servers. 8 | 9 | 10 | ## License 11 | [MIT License](http://opensource.org/licenses/mit-license.html) 12 | 13 | ## Contact 14 | Email: 15 | -------------------------------------------------------------------------------- /hhvm/graph.d/hhvm_mem_tcjit_total_report.json: -------------------------------------------------------------------------------- 1 | { 2 | "report_name" : "hhvm mem tcjit total report", 3 | "report_type" : "standard", 4 | "title" : "hhvm mem tc/jit total", 5 | "vertical_label" : "Bytes", 6 | "series" : [ 7 | { "metric": "hhvm_mem_breakdown_tcjit_total_capacity", "color": "E51400", "label": "tc/jit total capacity", "line_width": "3", "type": "line" }, 8 | { "metric": "hhvm_mem_breakdown_tcjit_total_used", "color": "0050EF", "label": "tc/jit total used", "line_width": "2", "type": "stack" } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /win_perfcounter/conf.d/win_perfcounter.pyconf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "win_perfcounter" 4 | language = "python" 5 | 6 | # Which metric group should these metrics be put into 7 | param metric_group { 8 | value = "win_perfcounter" 9 | } 10 | } 11 | } 12 | 13 | collection_group { 14 | collect_every = 30 15 | time_threshold = 90 16 | 17 | metric { 18 | name = "win_perf_couner_metric" 19 | title = "Windows Perfomance Counter Metric" 20 | value_threshold = 0 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /hhvm/graph.d/hhvm_mem_tcjit_code_hot_report.json: -------------------------------------------------------------------------------- 1 | { 2 | "report_name" : "hhvm mem tcjit code hot report", 3 | "report_type" : "standard", 4 | "title" : "hhvm mem tc/jit code hot", 5 | "vertical_label" : "Bytes", 6 | "series" : [ 7 | { "metric": "hhvm_mem_breakdown_tcjit_code_hot_capacity", "color": "E51400", "label": "tc/jit code hot capacity", "line_width": "3", "type": "line" }, 8 | { "metric": "hhvm_mem_breakdown_tcjit_code_hot_used", "color": "0050EF", "label": "tc/jit code hot used", "line_width": "2", "type": "stack" } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /hhvm/graph.d/hhvm_mem_tcjit_code_cold_report.json: -------------------------------------------------------------------------------- 1 | { 2 | "report_name" : "hhvm mem tcjit code cold report", 3 | "report_type" : "standard", 4 | "title" : "hhvm mem tc/jit code cold", 5 | "vertical_label" : "Bytes", 6 | "series" : [ 7 | { "metric": "hhvm_mem_breakdown_tcjit_code_cold_capacity", "color": "E51400", "label": "tc/jit code cold capacity", "line_width": "3", "type": "line" }, 8 | { "metric": "hhvm_mem_breakdown_tcjit_code_cold_used", "color": "0050EF", "label": "tc/jit code cold used", "line_width": "2", "type": "stack" } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /hhvm/graph.d/hhvm_mem_tcjit_code_main_report.json: -------------------------------------------------------------------------------- 1 | { 2 | "report_name" : "hhvm mem tcjit code main report", 3 | "report_type" : "standard", 4 | "title" : "hhvm mem tc/jit code main", 5 | "vertical_label" : "Bytes", 6 | "series" : [ 7 | { "metric": "hhvm_mem_breakdown_tcjit_code_main_capacity", "color": "E51400", "label": "tc/jit code main capacity", "line_width": "3", "type": "line" }, 8 | { "metric": "hhvm_mem_breakdown_tcjit_code_main_used", "color": "0050EF", "label": "tc/jit code main used", "line_width": "2", "type": "stack" } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /hhvm/graph.d/hhvm_mem_tcjit_code_prof_report.json: -------------------------------------------------------------------------------- 1 | { 2 | "report_name" : "hhvm mem tcjit code prof report", 3 | "report_type" : "standard", 4 | "title" : "hhvm mem tc/jit code prof", 5 | "vertical_label" : "Bytes", 6 | "series" : [ 7 | { "metric": "hhvm_mem_breakdown_tcjit_code_prof_capacity", "color": "E51400", "label": "tc/jit code prof capacity", "line_width": "3", "type": "line" }, 8 | { "metric": "hhvm_mem_breakdown_tcjit_code_prof_used", "color": "0050EF", "label": "tc/jit code prof used", "line_width": "2", "type": "stack" } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /influxdb/conf.d/influx.pyconf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "influx" 4 | language = "python" 5 | param host { 6 | value = "hostname_goes_here" 7 | } 8 | param port { 9 | value = "port_goes_here" 10 | } 11 | param username { 12 | value = "username_goes_here" 13 | } 14 | param password { 15 | value = "password_goes_here" 16 | } 17 | } 18 | } 19 | 20 | collection_group { 21 | collect_every = 60 22 | time_threshold = 60 23 | 24 | metric { 25 | name_match = "influx/(.+)" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /lustre/conf.d/lusclt_llite.pyconf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "lusclt_llite" 4 | language = "python" 5 | } 6 | } 7 | 8 | collection_group { 9 | collect_every = 60 10 | time_threshold = 600 11 | 12 | metric { 13 | name_match = "lusclt_([a-zA-Z0-9]+)_write_bytes_per_sec" 14 | } 15 | 16 | metric { 17 | name_match = "lusclt_([a-zA-Z0-9]+)_brw_read_bytes_per_sec" 18 | } 19 | 20 | metric { 21 | name_match = "lusclt_([a-zA-Z0-9]+)_file_ops" 22 | } 23 | 24 | metric { 25 | name_match = "lusclt_([a-zA-Z0-9]+)_inode_ops" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /hhvm/graph.d/hhvm_mem_tcjit_code_frozen_report.json: -------------------------------------------------------------------------------- 1 | { 2 | "report_name" : "hhvm mem tcjit code frozen report", 3 | "report_type" : "standard", 4 | "title" : "hhvm mem tc/jit code frozen", 5 | "vertical_label" : "Bytes", 6 | "series" : [ 7 | { "metric": "hhvm_mem_breakdown_tcjit_code_frozen_capacity", "color": "E51400", "label": "tc/jit code frozen capacity", "line_width": "3", "type": "line" }, 8 | { "metric": "hhvm_mem_breakdown_tcjit_code_frozen_used", "color": "0050EF", "label": "tc/jit code frozen used", "line_width": "2", "type": "stack" } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /network/netstats/README.md: -------------------------------------------------------------------------------- 1 | netstats 2 | ===== 3 | 4 | Exports raw stats found in `/proc/net/netstat` and /proc/net/snmp`. 5 | 6 | Install 7 | ------- 8 | 9 | Copy netstats.py from python_modules to your python modules directory, e.g. : 10 | 11 | - /usr/lib/ganglia/python_modules 12 | - /usr/lib64/ganglia/python_modules 13 | 14 | Copy netstats.pyconf to the gmond conf.d directory, e.g. : 15 | 16 | - /etc/ganglia/conf.d/ 17 | 18 | Tune the netstats.pyconf file to match your needs and then restart gmond. 19 | 20 | ## AUTHOR 21 | 22 | Author: Doychin Atanasov https://github.com/ironsmile -------------------------------------------------------------------------------- /twemproxy/conf.d/twemproxy.pyconf: -------------------------------------------------------------------------------- 1 | 2 | modules { 3 | module { 4 | name = 'twemproxy' 5 | language = 'python' 6 | 7 | param stats_addr { 8 | value = 'localhost' 9 | } 10 | param stats_port { 11 | value = '22222' 12 | } 13 | # Exclude pool stats (and their servers) 14 | # param exclude { 15 | # Use a comma to specify more than one pool name in the value 16 | # value = 'alpha' 17 | # } 18 | } 19 | } 20 | 21 | collection_group { 22 | collect_every = 30 23 | time_threshold = 90 24 | 25 | metric { 26 | name_match = "twemproxy_(.+)" 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /gpfs/README.mkdn: -------------------------------------------------------------------------------- 1 | gpfs 2 | ======== 3 | 4 | Python module for ganglia 3.1. 5 | 6 | This module reads GPFS client statistics using mmpmon and 7 | creates a gpfs_* metric for each. 8 | 9 | Uses mmpmon which requires root privileges. Since gmond usually runs as user 10 | nobody the module will call it with sudo. This requires that the gmond user 11 | be allowed to run mmpmon with sudo and without a password. You will need to 12 | add to your sudo config file a line similar to the below: 13 | 14 | nobody ALL = NOPASSWD : /usr/lpp/mmfs/bin/mmpmon 15 | Defaults:nobody !requiretty 16 | 17 | ## AUTHOR 18 | 19 | Author: Michael Robbert <mrobbert [at] gmail [dot] com> 20 | -------------------------------------------------------------------------------- /netapp_api/conf.d/netapp_api_cmode.pyconf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "netapp_api_cmode" 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 | metric { 19 | name_match = "(.+)files_(.+)" 20 | } 21 | metric { 22 | name_match = "(.+)size_(.+)" 23 | } 24 | metric { 25 | name_match = "(.+)quota_used" 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /hhvm/graph.d/hhvm_vm_rds_aggregated_report.json: -------------------------------------------------------------------------------- 1 | { 2 | "report_name" : "hhvm vm tc space rds aggregated report", 3 | "report_type" : "standard", 4 | "title" : "hhvm vm tc space rds aggregated report", 5 | "vertical_label" : "Bytes", 6 | "series" : [ 7 | { "metric": "hhvm_vm_tcspace_rds", "color": "00DD00", "label": "vm tc space rds", "line_width": "2", "type": "line" }, 8 | { "metric": "hhvm_vm_tcspace_rds_local", "color": "0000DD", "label": "vm tc space rds local", "line_width": "2", "type": "line" }, 9 | { "metric": "hhvm_vm_tcspace_persistent_rds", "color": "A20025", "label": "vm tc space persistent rds", "line_width": "2", "type": "line" } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /gpu/nvidia/graph.d/gpu_common.php: -------------------------------------------------------------------------------- 1 | 29 | 30 | -------------------------------------------------------------------------------- /network/netstats/conf.d/netstats.basic.pyconf: -------------------------------------------------------------------------------- 1 | 2 | modules { 3 | module { 4 | name = "netstats" 5 | language = "python" 6 | } 7 | } 8 | 9 | 10 | collection_group { 11 | collect_every = 15 12 | time_threshold = 45 13 | 14 | # You can enumerate all metrics you want to see from the /proc/net/netstat and 15 | # /proc/net/snmp files. The name of the metric will be "netstat_CATEGORY_NAME". 16 | # Where CATEGORY is a row like Tcp from snmp or TcpExt from netstat and 17 | # NAME is a column like RcvbufErrors from the snmp or InMcastPkts in netstat. 18 | # 19 | # Few examples below: 20 | 21 | metric { 22 | name = "netstat_TcpExt_SyncookiesRecv" 23 | title = "TCP syncookies received" 24 | } 25 | 26 | metric { 27 | name = "netstat_Tcp_ActiveOpens" 28 | title = "TCP active opened connections" 29 | } 30 | 31 | } -------------------------------------------------------------------------------- /hhvm/graph.d/hhvm_mem_proc_report.json: -------------------------------------------------------------------------------- 1 | { 2 | "report_name" : "hhvm process memory report", 3 | "report_type" : "standard", 4 | "title" : "hhvm process memory", 5 | "vertical_label" : "Bytes", 6 | "series" : [ 7 | { "metric": "hhvm_mem_procstats_vmsize", "color": "A20025", "label": "vm size", "line_width": "2", "type": "line" }, 8 | { "metric": "hhvm_mem_procstats_data", "color": "76608A", "label": "data", "line_width": "2", "type": "line" }, 9 | { "metric": "hhvm_mem_procstats_vmrss", "color": "6A00FF", "label": "vm rss", "line_width": "2", "type": "line" }, 10 | { "metric": "hhvm_mem_procstats_shared", "color": "FA6800", "label": "shared", "line_width": "2", "type": "line" }, 11 | { "metric": "hhvm_mem_procstats_code", "color": "008A00", "label": "code/text", "line_width": "2", "type": "line" } 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /es_metrics/conf.d/es_metrics.pyconf: -------------------------------------------------------------------------------- 1 | # 2 | 3 | modules { 4 | module { 5 | name = "es_metrics" 6 | language = "python" 7 | 8 | param metric_group { 9 | value = "elasticsearch" 10 | } 11 | 12 | param host { 13 | value = "http://localhost:9200/" 14 | } 15 | 16 | param version { 17 | value = "1.3" 18 | } 19 | 20 | # In order to get index specific stats specify each index seperated by 21 | # whitespace. 22 | # 23 | # indices can be grouped by using comma, 24 | # e.g. index3,index4 will give statistics (docs_count, etc.) for both 25 | # index1 and index2 26 | param indices { 27 | value = "*" 28 | # value = "index1 index2 index3,index4" 29 | } 30 | } 31 | } 32 | 33 | collection_group { 34 | collect_every = 30 35 | time_threshold = 60 36 | 37 | metric { 38 | name_match = "es_(.+)" 39 | } 40 | } 41 | 42 | -------------------------------------------------------------------------------- /dns_latency/Readme.md: -------------------------------------------------------------------------------- 1 | # Ganglia DNS latency 2 | 3 | Ganglia python plug-in to collect and graph DNS query response times 4 | 5 | # Sample CLI ouput 6 |
 7 | $ python dnslatency.py
 8 | It took 0.014626 to resolve google.com on google-public-dns-b.google.com
 9 | It took 0.017215 to resolve google.com on google-public-dns-a.google.com
10 | 
11 | # Installation 12 | 13 | Create a dnslatency.pyconf in /etc/ganglia/conf.d with one or more params similar to the following: 14 |
15 | param googledns_dns_resolution {
16 |     # Format: SERVER_NAMENAME_TO_QUERYRECORD_TYPE
17 |     #   value = "google-public-dns-a.google.com google.com A"
18 | }
19 | 
20 | Each param needs a unique name and the value should contain the name of the DNS server to query, a domain name and the type of record to check. Ganglia will then query the server and graph the time it took to resolve the name. 21 | 22 | -------------------------------------------------------------------------------- /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 | param version { 17 | value = "1.2" 18 | } 19 | 20 | # In order to get index specific stats specify each index seperated by 21 | # whitespace. 22 | # 23 | # indices can be grouped by using comma, 24 | # e.g. index3,index4 will give statistics (docs_count, etc.) for both 25 | # index1 and index2 26 | param indices { 27 | value = "*" 28 | # value = "index1 index2 index3,index4" 29 | } 30 | } 31 | } 32 | 33 | collection_group { 34 | collect_every = 30 35 | time_threshold = 60 36 | 37 | metric { 38 | name_match = "es_(.+)" 39 | } 40 | } 41 | 42 | -------------------------------------------------------------------------------- /lustre/README.md: -------------------------------------------------------------------------------- 1 | Lustre Client Ganglia Metrics 2 | 3 | These python scripts collect lustre filesystem metric for ganglia-gmond module. 4 | 5 | The scripts attempt to collect separate metrics for each lustre 6 | filesystem mounted on the client. In addition to typical read/write bandwidth 7 | metrics, the scripts also attempt to collect inode-related metrics (network RPC calls from the client to the object storage servers). 8 | 9 | Lustre client exposes metrics through linux sysfs 10 | (ie. /proc/fs/lustre/...). 11 | 12 | The "llite" metrics are high-level aggergate metrics of the underlying 13 | storage targets. On older versions of lustre, there are known bugs in 14 | the llite values. The "osc" metrics are lower level, offering values 15 | for each storage target (ie. LUN) that is accessed by the client. Note 16 | that lustre client uses local (client-side) file caching which can 17 | affect these values. 18 | -------------------------------------------------------------------------------- /bind_xml/conf.d/bind_xml.pyconf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "bind_xml" 4 | language = "python" 5 | param host { 6 | value = "localhost" 7 | } 8 | param port { 9 | value = 8053 10 | } 11 | 12 | # This module calculates all metrics (including derived) rates at 13 | # onces and then serves them out of a cache. This determines the 14 | # minimum TTL. 15 | param min_poll_seconds { 16 | value = 20 17 | } 18 | # Where to log information from this module (syslog facility) 19 | param syslog_facility { 20 | value = "user" 21 | } 22 | # log level, WARNING is not expected to produce any output 23 | param log_level { 24 | value = "WARNING" 25 | } 26 | } 27 | } 28 | 29 | collection_group { 30 | collect_every = 30 31 | time_threshold = 60 32 | 33 | metric { 34 | name_match = "bind_(.+)" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /storm_topology/conf.d/storm_topology.pyconf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "storm_topology" 4 | language = "python" 5 | param topologies { 6 | value = "SampleTopology,AnotherTopology" 7 | } 8 | param SampleTopology_spouts { 9 | value = "SampleSpoutTwo" 10 | } 11 | param SampleTopology_bolts { 12 | value = "boltc" 13 | } 14 | param AnotherTopology_spouts { 15 | value = "Spout" 16 | } 17 | param AnotherTopology_bolts { 18 | value = "bolta,boltb,boltd" 19 | } 20 | param storm_thrift_gen { 21 | value = "/usr/lib/ganglia" 22 | } 23 | param loglevel { 24 | value = "INFO" 25 | } 26 | } 27 | } 28 | 29 | collection_group { 30 | collect_every = 20 31 | time_threshold = 90 32 | metric { 33 | name_match = ".*" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /recoverpoint4/recoverpoint4.pyconf: -------------------------------------------------------------------------------- 1 | # Name: recoverpoint.pyconf 2 | # Author: Evan Fraser (evan.fraser@trademe.co.nz) 3 | # Desc: Config file for the ganglia gmond recoverpoint4 module. 4 | # Date: 04/02/2015 5 | # To use: Save this file in /etc/ganglia/conf.d/ 6 | 7 | modules { 8 | module { 9 | name = "recoverpoint4" 10 | language = "python" 11 | } 12 | } 13 | #/* Collection groups for the 14 | # example python module */ 15 | collection_group { 16 | collect_every = 20 17 | time_threshold = 50 18 | metric { 19 | name_match = "(.+)Throughput" 20 | } 21 | metric { 22 | name_match = "(.+)Writes" 23 | } 24 | metric { 25 | name_match = "(.+)Bytes" 26 | } 27 | metric { 28 | name_match = "(.+)Lag" 29 | } 30 | metric { 31 | name_match = "(.+)Ratio" 32 | } 33 | metric { 34 | name_match = "(.+)Portion" 35 | } 36 | } 37 | 38 | -------------------------------------------------------------------------------- /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 | This version of the module works with Flower (https://github.com/mher/flower), 13 | a web-based tool to monitor Celery workers and tasks. 14 | 15 | Previous versions of this module worked with Celerymon, which has now been 16 | obsoleted in favor of Flower (http://celery.readthedocs.org/en/latest/userguide/monitoring.html?highlight=flower#flower-real-time-celery-web-monitor). 17 | 18 | Install 19 | =============== 20 | 21 | Copy ganglia_celery.py from python_modules to your python modules directory e.g. 22 | 23 | /usr/lib64/ganglia/python_modules 24 | 25 | and celery.pyconf to 26 | 27 | /etc/ganglia/conf.d/ 28 | 29 | Restart Gmond and you are done. 30 | 31 | ## AUTHOR 32 | 33 | Author: Vladimir Vuksan https://github.com/vvuksan 34 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /recoverpoint4/README.mkdn: -------------------------------------------------------------------------------- 1 | EMC RecoverPoint 4.x 2 | =============== 3 | 4 | This is a new GMOND Python Module that gets metrics from EMC RecoverPoint v 4.x replication appliances via their REST API. 5 | 6 | Currently gathers per Consistency Group: 7 | * Data, Time and Journal Lags 8 | * Incoming (SAN) and Outgoing (WAN) traffic, compression and dedupe ratios. 9 | * Initialisation Traffic and completion metrics 10 | * Journal size and capacity usage metrics 11 | 12 | 13 | ## Compatibility 14 | * Compatible with Recoverpoint 4.x 15 | 16 | ## DEPENDS 17 | * Python modules: requests and urllib3 18 | 19 | ## USAGE 20 | * Save the recoverpoint4.pyconf into /etc/ganglia/conf.d directory. 21 | * Save the recoverpoint4.py into your ganglia python module dir eg: /usr/lib/ganglia/python_modules. Update the cluster ip and username and passwords. 22 | * Restart gmond and a "recoverpoint" host should appear in ganglia. 23 | 24 | 25 | ## AUTHOR 26 | 27 | Author: Evan Fraser <evan.fraser@trademe.co.nz> 28 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /hp_3par/conf.d/hp3par.pyconf: -------------------------------------------------------------------------------- 1 | # Name: hp3par.pyconf 2 | # Author: Evan Fraser (evan.fraser@trademe.co.nz) 3 | # Desc: Config file for the ganglia gmond HP 3PAR module. 4 | # Date: 14/05/2015 5 | # To use: Save this file in /etc/ganglia/conf.d/ 6 | 7 | modules { 8 | module { 9 | name = "hp3par" 10 | language = "python" 11 | } 12 | } 13 | #/* Collection groups for the 14 | # example python module */ 15 | collection_group { 16 | collect_every = 20 17 | time_threshold = 50 18 | metric { 19 | name_match = "(.+)iops" 20 | } 21 | metric { 22 | name_match = "(.+)qlen" 23 | } 24 | metric { 25 | name_match = "(.+)throughput" 26 | } 27 | metric { 28 | name_match = "(.+)latency" 29 | } 30 | metric { 31 | name_match = "(.+)iosize" 32 | } 33 | metric { 34 | name_match = "(.+)used" 35 | } 36 | metric { 37 | name_match = "(.+)vvols" 38 | } 39 | metric { 40 | name_match = "(.+)cpu" 41 | } 42 | } 43 | 44 | -------------------------------------------------------------------------------- /hhvm/graph.d/hhvm_vm_tcspace_aggregated_report.json: -------------------------------------------------------------------------------- 1 | { 2 | "report_name" : "hhvm vm tc space aggregated report", 3 | "report_type" : "standard", 4 | "title" : "hhvm vm tc space aggregated report", 5 | "vertical_label" : "Bytes", 6 | "series" : [ 7 | { "metric": "hhvm_vm_tcspace_code_hot", "color": "00DD00", "label": "vm tc space code hot", "line_width": "2", "type": "stack" }, 8 | { "metric": "hhvm_vm_tcspace_code_main", "color": "0000DD", "label": "vm tc space code main", "line_width": "2", "type": "stack" }, 9 | { "metric": "hhvm_vm_tcspace_code_prof", "color": "A20025", "label": "vm tc space code prof", "line_width": "2", "type": "stack" }, 10 | { "metric": "hhvm_vm_tcspace_code_cold", "color": "FFFF00", "label": "vm tc space code cold", "line_width": "2", "type": "stack" }, 11 | { "metric": "hhvm_vm_tcspace_code_frozen", "color": "825A2C", "label": "vm tc space code frozen", "line_width": "2", "type": "stack" }, 12 | { "metric": "hhvm_vm_tcspace_data", "color": "FF00FF", "label": "vm tc space data", "line_width": "2", "type": "stack" } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /mysqld/graph.d/mysql_traffic_report.php: -------------------------------------------------------------------------------- 1 | 24 | 25 | ## AUTHOR 26 | 27 | HIROSE Masaaki 28 | 29 | -------------------------------------------------------------------------------- /hp_3par/README.mkdn: -------------------------------------------------------------------------------- 1 | HP 3PAR Gmond Module 2 | =============== 3 | 4 | This is a new GMOND Python Module that gets metrics from HP 3PAR arrays via SSH. 5 | 6 | Currently gathers per Volume: 7 | * Read/Write IOs 8 | * Read/Write Latency 9 | * Read/Write IO Size 10 | * Read/Write Throughput 11 | 12 | Currently gathers per Node: 13 | * Total CPU: 14 | - idle, user, sys, intr/s, conts/s 15 | 16 | Currently gathers per CPG: 17 | * User space used 18 | * Snap space used 19 | 20 | ## Compatibility 21 | * Compatible with 3PAR 7450C and OS 3.2.1 (tested) 22 | * Other versions of 3PAR / OS may work fine. 23 | 24 | ## DEPENDS 25 | * Python modules: paramiko ssh module 26 | - install with 'pip3 install paramiko' 27 | 28 | ## USAGE 29 | * Save the hp3par.pyconf into /etc/ganglia/conf.d directory. 30 | * Save the hp3par.py into your ganglia python module dir eg: /usr/lib/ganglia/python_modules. Update the Array Names, IP's, Usernames and passwords. 31 | * Restart gmond and the Arrays should appear in ganglia. 32 | 33 | 34 | ## AUTHOR 35 | 36 | Author: Evan Fraser <evan.fraser@trademe.co.nz> 37 | -------------------------------------------------------------------------------- /jmxsh/graph.d/jmx_sessions_report.php: -------------------------------------------------------------------------------- 1 | 41 | -------------------------------------------------------------------------------- /mysqld/graph.d/mysql_qcache_hitrate_report.php: -------------------------------------------------------------------------------- 1 | 42 | -------------------------------------------------------------------------------- /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 | * Now executes SNMP queries as a separate thread 7 | * Handles polling multiple switches from a single gmond. 8 | * Spoofs the switch hostname, so each switch shows up separately in ganglia 9 | 10 | ## DEPENDS 11 | * python pysnmp 12 | 13 | ## USAGE 14 | * Save the fibrechannel.pyconf into directory and update the switch(s) name & IP's 15 | * Save the fibrechannel.py into your ganglia python module dir eg: /usr/lib/ganglia/python_modules 16 | * Update SNMP community / ports if necessary 17 | * If FC metrics aren't appearing, increase your net.core.rmem_max and default settings as below: 18 | 19 | net.core.rmem_max=104857600 20 | 21 | net.core.rmem_default=104857600 22 | 23 | vm.dirty_ratio=100 24 | 25 | vm.dirty_background_ratio=100 26 | 27 | vm.dirty_expire_centisecs=720000 28 | 29 | ## AUTHOR 30 | 31 | Author: Evan Fraser <evan.fraser@trademe.co.nz> 32 | 33 | -------------------------------------------------------------------------------- /vmax/README.mkdn: -------------------------------------------------------------------------------- 1 | ##EMC Symmetrix VMAX Unisphere 2 | This is a gmond python module that pulls EMC Symmetrix VMAX metrics via the Unisphere REST api 3 | 4 | * It pulls 5 minute interval metrics from EMC Symmetrix VMAX SAN's via the Unisphere REST api 5 | * Currently retrieves the following Array metrics: IO_RATE, HIT_PER_SEC, MB_READ_PER_SEC, MB_WRITE_PER_SEC, READS, RESPONSE_TIME_READ, RESPONSE_TIME_WRITE, WRITES 6 | * And the following per Thin Pool metrics: BE_READS, BE_WRITES, BE_RESPONSE_TIME_READ, BE_RESPONSE_TIME_WRITE, BE_MB_READ_RATE, BE_MB_WRITE_RATE 7 | * It's pretty easily extendable if you follow the Unisphere REST API documentation. 8 | 9 | ## DEPENDS 10 | * Requires: json and requests python modules, installable via pip. 11 | * Unisphere installation 12 | 13 | ## USAGE 14 | * Setup a performance monitor user and password unisphere account 15 | * Ensure 'Real Time' is enabled in Performance -> Settings -> System Registrations -> View Details 16 | * Update the vmax_dict section in vmax.py 17 | * copy vmax.py into your python_modules dir (probably /usr/lib/ganglia/python_modules) 18 | * copy vmax.pyconf into /etc/ganglia/conf.d/ 19 | 20 | ## Author 21 | * evan.fraser@trademe.co.nz 22 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /gmetad_meta_status/conf.d/gmetad_meta_status.pyconf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "gmetad_meta_status" 4 | language = "python" 5 | 6 | # Which gmetad instance to monitor 7 | param gmetad_host { 8 | value = "localhost" 9 | } 10 | 11 | # The gmetad interactive port 12 | param gmetad_port { 13 | value = 8652 14 | } 15 | 16 | # Which metrics to report. choices=['basic-only', 'raw', 'rate', 17 | # 'all'] 'basic' metrics are included in all 'raw' and 'rate'. 18 | param metrics { 19 | value = "all" 20 | } 21 | 22 | # This module calculates all metrics (including derived) rates at 23 | # once and then serves them out of a cache. This determines the 24 | # minimum TTL. 25 | param check_every { 26 | value = 30 27 | } 28 | # Where to log information from this module (syslog facility) 29 | param syslog_facility { 30 | value = "user" 31 | } 32 | # log level, WARNING is not expected to produce any output 33 | param log_level { 34 | value = "WARNING" 35 | } 36 | } 37 | } 38 | 39 | collection_group { 40 | collect_every = 30 41 | time_threshold = 60 42 | 43 | metric { 44 | name_match = "gmetad_meta_status_(.+)" 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | ## Compatibility 12 | * Compatible with Recoverpoint 3.5 13 | 14 | ## DEPENDS 15 | * python YAML 16 | * paramiko modules 17 | * ssh access to the recoverpoint appliance (paramiko can use ssh keys if required) 18 | 19 | ## USAGE 20 | * Save the recoverpoint.pyconf into /etc/ganglia/conf.d directory and update the management IP and sitenames (the sitenames have been lowercase'd) 21 | * Save the recoverpoint.py into your ganglia python module dir eg: /usr/lib/ganglia/python_modules. Update the username/passwords if necessary. 22 | * Restart gmond and a "recoverpoint" host should appear in ganglia. 23 | 24 | ## UPDATE 25 | * 21/03/2014 - Now performs SSH queries asynchronously as a separate thread. (This should stop it slowing and breaking gmond) 26 | * 24/03/2014 - Corrected a bug in reporting SAN traffic when SAN traffic is sometimes reported by recoverpoint in units less than Mbit/s 27 | 28 | ## AUTHOR 29 | 30 | Author: Evan Fraser <evan.fraser@trademe.co.nz> 31 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /file_checks/README.mkdn: -------------------------------------------------------------------------------- 1 | Purpose 2 | =============== 3 | 4 | This module allows you to 5 | 6 | * Keep track of a presence of a particular file (0 for file not present and 1 for file present) 7 | * Size of a particular file 8 | 9 | 10 | Install 11 | =============== 12 | 13 | Copy file_checks.py from python_modules to your python modules directory e.g. 14 | 15 | /usr/lib64/ganglia/python_modules 16 | 17 | and file_checks.pyconf to 18 | 19 | /etc/ganglia/conf.d/ 20 | 21 | Restart Gmond and you are done. 22 | 23 | 24 | Configure 25 | =============== 26 | 27 | Please see file_checks.py. Under metric_init you will need to add any metrics you want added e.g. 28 | 29 | descriptors.append(create_desc(Desc_Skel, { 30 | "name" : NAME_PREFIX + "etc_chef_disabled_present", 31 | "call_back" : get_is_file_present, 32 | "description" : "/etc/chef/disabled present" 33 | })) 34 | 35 | Replace slashes (/) with underscores and drop initial slash and append _present. For file sizes add 36 | following segment 37 | 38 | descriptors.append(create_desc(Desc_Skel, { 39 | "name" : NAME_PREFIX + "var_log_syslog_size", 40 | "call_back" : get_file_size, 41 | "units" : "bytes", 42 | "value_type" : "float", 43 | "description" : "Size of /var/log/syslog" 44 | })) 45 | 46 | Append _size to the metric name 47 | 48 | ## AUTHOR 49 | 50 | Author: Vladimir Vuksan https://github.com/vvuksan 51 | -------------------------------------------------------------------------------- /mysqld/graph.d/mysql_simple_query_report.php: -------------------------------------------------------------------------------- 1 | 45 | -------------------------------------------------------------------------------- /mysqld/graph.d/mysql_select_types_report.php: -------------------------------------------------------------------------------- 1 | 48 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /win_perfcounter/README.mkdn: -------------------------------------------------------------------------------- 1 | win_perfcounter 2 | =============== 3 | 4 | python module for ganglia 3.1. 5 | 6 | WARNING: This module is just proof-of-concept, it does not work. 7 | 8 | "win_perfcounter" uses ctypes and Windows API's Performance Data Helper functions in order to get perfomance counter data. 9 | 10 | http://msdn.microsoft.com/en-us/library/windows/desktop/aa373214%28v=vs.85%29.aspx 11 | 12 | Module is self-contained and does not require any third-party Python packages such as PyWin32 or WMI. 13 | 14 | What was done: 15 | - Implementation were tested on Windows Server 2008 R2 Standard 64 bit 16 | - Gmond/Cygwin 3.1.7 build for Windows was downloaded from http://tapir.sajinet.com.pe/ganglia/ganglia-3.1.7-bin.zip 17 | - Since Gmond build were linked with Python 2.5 module were developed for v2.5 18 | - Cygwin Python 2.5 was downloaded from http://mirror.mcs.anl.gov/cygwin/release/python/python-2.5.5-1.tar.bz2 19 | - Windows Stats were used as baseline (https://bitbucket.org/mixmastamyk/winstats) 20 | - Windows Stats did not work in Cygwin environment, so ctypes was monkey patched in order to do that 21 | - ctypes monkey patch approach was taken from pyglet library (https://github.com/adamlwgriffiths/Pyglet/blob/master/pyglet/__init__.py#L221) 22 | - gmond are able to load this module on Windows server 23 | - Python module are able to read perfomance data from two different counters 24 | 25 | TODO: 26 | - metric_init method should return descriptors structure 27 | - basically we have to implement all the glue code between win_perfcounter.pyconf and gmond API 28 | - write a set of tests 29 | 30 | ## AUTHOR 31 | 32 | Alexey Diyan -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /moab/conf.d/moab.pyconf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "moab" 4 | language = "python" 5 | 6 | # If you change this entry make sure you put it under name_match section 7 | param metric_prefix { 8 | value = "moab" 9 | } 10 | 11 | # Logging 12 | param loglevel { 13 | value = "INFO" 14 | } 15 | # The logfile parameter can be either a file name or "SYSLOG" 16 | #param logfile { 17 | # value = "SYSLOG" 18 | #} 19 | param logfacility { 20 | value = "user" 21 | } 22 | param logdevice { 23 | value = "/dev/log" 24 | } 25 | 26 | # Location of mdiag binary 27 | param mdiag_bin { 28 | value = "/opt/moab/bin/mdiag" 29 | } 30 | 31 | # location of Moab config files 32 | param moab_home_dir { 33 | value = "/var/spool/moab" 34 | } 35 | 36 | # Moab server host 37 | #param moab_server { 38 | # value = "moabsrv.mydomain.org" 39 | #} 40 | 41 | # Moab server port 42 | #param moab_port { 43 | # value = 42559 44 | #} 45 | 46 | # Whether to query GRESes 47 | # if this is true, make sure mdiag_bin is set 48 | # and the gmond user is authorized to run 49 | # mdiag -n GLOBAL 50 | param query_gres { 51 | value = False 52 | } 53 | 54 | # Location of showq binary 55 | param showq_bin { 56 | value = "/opt/moab/bin/showq" 57 | } 58 | 59 | # timeout on Moab client commands 60 | param timeout { 61 | value = 15 62 | } 63 | } 64 | } 65 | 66 | collection_group { 67 | collect_every = 60 68 | time_threshold = 90 69 | 70 | metric { 71 | name_match = "moab_(.+)" 72 | value_threshold = 1.0 73 | } 74 | 75 | } 76 | -------------------------------------------------------------------------------- /gpu/nvidia/graph.d/gpu_power_usage_report.php: -------------------------------------------------------------------------------- 1 | 36 | 37 | -------------------------------------------------------------------------------- /mysqld/graph.d/mysql_connections_report.php: -------------------------------------------------------------------------------- 1 | 51 | -------------------------------------------------------------------------------- /openstack_monitor/graph.d/nova_services_report.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /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 | * A demo of what the GPU graphs look like is available here: 14 | http://ganglia.ddbj.nig.ac.jp/?c=research+month+gpu+queue&h=t135i&m=load_one&r=hour&s=by+name&hc=4&mc=2 15 | 16 | By default all metrics that the management library could detect for your GPU 17 | are collected. For more information on what metrics are supported on what 18 | models, please refer to NVML documentation. 19 | 20 | The following metrics have been implemented: 21 | * gpu_num 22 | * gpu_driver 23 | * gpu_type 24 | * gpu_uuid 25 | * gpu_pci_id 26 | * gpu_mem_total 27 | * gpu_graphics_speed 28 | * gpu_sm_speed 29 | * gpu_mem_speed 30 | * gpu_max_graphics_speed 31 | * gpu_max_sm_speed 32 | * gpu_max_mem_speed 33 | * gpu_temp 34 | * gpu_util 35 | * gpu_mem_util 36 | * gpu_mem_used 37 | * gpu_fan 38 | * gpu_power_usage 39 | * gpu_perf_state 40 | * gpu_ecc_mode 41 | 42 | Version 2: 43 | 44 | The following metrics have been implemented: 45 | * gpu_max_graphics_speed 46 | * gpu_max_sm_speed 47 | * gpu_max_mem_speed 48 | * gpu_serial 49 | * gpu_power_man_mode 50 | * gpu_power_man_limit 51 | 52 | Version 3: 53 | 54 | The following metrics have been implemented: 55 | * gpu_ecc_db_error 56 | * gpu_ecc_sb_error’ 57 | * gpu_power_violation_report 58 | * gpu_encoder_util 59 | * gpu_decoder_util 60 | * gpu_bar1_memory 61 | * gpu_shutdown_temp 62 | * gpu_slowdown_temp 63 | * gpu_use_num 64 | 65 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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_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 | -------------------------------------------------------------------------------- /xrootd_stats/conf.d/xrootd_stats.pyconf: -------------------------------------------------------------------------------- 1 | modules { 2 | module { 3 | name = "xrootd_stats" 4 | language = "python" 5 | 6 | param host { 7 | value = "localhost" 8 | } 9 | 10 | param port { 11 | value = 1094 12 | } 13 | } 14 | } 15 | 16 | collection_group { 17 | collect_every = 30 18 | time_threshold = 120 19 | 20 | metric { 21 | name_match = "xrd_sys_(.+)" 22 | } 23 | } 24 | 25 | collection_group { 26 | collect_every = 30 27 | time_threshold = 120 28 | 29 | metric { 30 | name_match = "xrd_info_(.+)" 31 | } 32 | } 33 | 34 | collection_group { 35 | collect_every = 30 36 | time_threshold = 120 37 | 38 | metric { 39 | name_match = "xrd_link_(.+)" 40 | } 41 | } 42 | 43 | collection_group { 44 | collect_every = 30 45 | time_threshold = 120 46 | 47 | metric { 48 | name_match = "xrd_poll_(.+)" 49 | } 50 | } 51 | 52 | collection_group { 53 | collect_every = 30 54 | time_threshold = 120 55 | 56 | metric { 57 | name_match = "xrd_buff_(.+)" 58 | } 59 | } 60 | 61 | collection_group { 62 | collect_every = 30 63 | time_threshold = 120 64 | 65 | metric { 66 | name_match = "xrd_proc_(.+)" 67 | } 68 | } 69 | 70 | collection_group { 71 | collect_every = 30 72 | time_threshold = 120 73 | 74 | metric { 75 | name_match = "xrd_xrootd_(.+)" 76 | } 77 | } 78 | 79 | collection_group { 80 | collect_every = 30 81 | time_threshold = 120 82 | 83 | metric { 84 | name_match = "xrd_ofs_(.+)" 85 | } 86 | } 87 | 88 | collection_group { 89 | collect_every = 30 90 | time_threshold = 120 91 | 92 | metric { 93 | name_match = "xrd_oss_(.+)" 94 | } 95 | } 96 | 97 | collection_group { 98 | collect_every = 30 99 | time_threshold = 120 100 | 101 | metric { 102 | name_match = "xrd_sgen_(.+)" 103 | } 104 | } 105 | 106 | collection_group { 107 | collect_every = 30 108 | time_threshold = 120 109 | 110 | metric { 111 | name_match = "xrd_sched_(.+)" 112 | } 113 | } -------------------------------------------------------------------------------- /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/document_root/apc-json.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 | -------------------------------------------------------------------------------- /gpu/nvidia/graph.d/gpu_sm_clock_report.php: -------------------------------------------------------------------------------- 1 | __" 19 | # iface ::= lo|ethX|bondX|tunX|... 20 | # way ::= rx|tx 21 | # counter ::= bytes|packets|errs|drop|fifo|frame|compressed|multicast 22 | # 23 | # e.g. : 24 | # 25 | # - iface_bond0_rx_frame 26 | # - iface_tun2_tx_fifo 27 | 28 | # loopback 29 | metric { 30 | name = "iface_lo_rx_bytes" 31 | title = "loopback RX bytes" 32 | value_threshold = 1.0 33 | } 34 | 35 | metric { 36 | name = "iface_lo_rx_packets" 37 | title = "loopback RX packets" 38 | value_threshold = 1.0 39 | } 40 | 41 | metric { 42 | name = "iface_lo_tx_bytes" 43 | title = "loopback TX bytes" 44 | value_threshold = 1.0 45 | } 46 | 47 | metric { 48 | name = "iface_lo_tx_packets" 49 | title = "loopback TX packets" 50 | value_threshold = 1.0 51 | } 52 | 53 | # eth0 54 | metric { 55 | name = "iface_eth0_rx_bytes" 56 | title = "eth0 RX bytes" 57 | value_threshold = 1.0 58 | } 59 | 60 | metric { 61 | name = "iface_eth0_rx_packets" 62 | title = "eth0 RX packets" 63 | value_threshold = 1.0 64 | } 65 | 66 | metric { 67 | name = "iface_eth0_rx_errs" 68 | title = "eth0 RX errors" 69 | value_threshold = 1.0 70 | } 71 | 72 | metric { 73 | name = "iface_eth0_rx_drop" 74 | title = "eth0 RX drop" 75 | value_threshold = 1.0 76 | } 77 | 78 | metric { 79 | name = "iface_eth0_tx_bytes" 80 | title = "eth0 TX bytes" 81 | value_threshold = 1.0 82 | } 83 | 84 | metric { 85 | name = "iface_eth0_tx_packets" 86 | title = "eth0 TX packets" 87 | value_threshold = 1.0 88 | } 89 | 90 | metric { 91 | name = "iface_eth0_tx_errs" 92 | title = "eth0 TX errors" 93 | value_threshold = 1.0 94 | } 95 | 96 | metric { 97 | name = "iface_eth0_tx_drop" 98 | title = "eth0 TX drop" 99 | value_threshold = 1.0 100 | } 101 | } -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /network/infiniband/README.mkdn: -------------------------------------------------------------------------------- 1 | InfiniBand monitoring plugin for gmond 2 | ====================================== 3 | 4 | Installation instructions: 5 | 6 | 1. Copy ``python_modules/infiniband.py`` to ``{libdir}/ganglia/python_modules/`` 7 | 2. Copy ``conf.d/infiniband.pyconf`` to ``/etc/ganglia/conf.d`` 8 | 3. The ``gmond`` Ganglia daemon will need read/write access to the InfiniBand 9 | devices in order to perform these queries. To make this happen, you will 10 | need ``gmond`` to be running as some user other than ``nobody`` (e.g., 11 | ``ganglia``). For example, create an InfiniBand group and add ganglia: 12 | 13 | * ``groupadd --system infiniband`` 14 | * ``usermod --append --groups infiniband ganglia`` 15 | * ``chgrp -R infiniband /dev/infiniband/`` 16 | * ``chmod 660 /dev/infiniband/umad* /dev/infiniband/issm*`` 17 | * To make these changes permanent, you may need custom udev rules. Create a 18 | file named ``/etc/udev/rules.d/90-ib.rules`` with the contents: 19 | 20 | KERNEL=="umad*", NAME="infiniband/%k", MODE="0660", GROUP="infiniband" 21 | KERNEL=="issm*", NAME="infiniband/%k", MODE="0660", GROUP="infiniband" 22 | KERNEL=="ucm*", NAME="infiniband/%k", MODE="0666", GROUP="infiniband" 23 | KERNEL=="uverbs*", NAME="infiniband/%k", MODE="0666", GROUP="infiniband" 24 | KERNEL=="ucma", NAME="infiniband/%k", MODE="0666", GROUP="infiniband" 25 | KERNEL=="rdma_cm", NAME="infiniband/%k", MODE="0666", GROUP="infiniband" 26 | 27 | * Ensure your gmond daemon is set to run as the ``ganglia`` username. Set 28 | ``user = ganglia`` in the file ``/etc/ganglia/gmond.conf`` 29 | * ``service gmond restart`` or ``systemctl restart gmond`` 30 | 31 | 32 | By default, all metrics that we could detect for each InfiniBand port are 33 | collected. The device type (e.g., ``mlx4``), device number and port number will 34 | be appended to the end of each metric. For example: 35 | 36 | * ``ib_port_multicast_xmit_packets_mlx4_0_port1`` 37 | * ``ib_port_multicast_xmit_packets_mlx4_0_port2`` 38 | 39 | 40 | The following metrics have been implemented: 41 | 42 | * ib_excessive_buffer_overrun_errors 43 | * ib_link_downed 44 | * ib_link_error_recovery 45 | * ib_local_link_integrity_errors 46 | * ib_port_rcv_constraint_errors 47 | * ib_port_rcv_data 48 | * ib_port_rcv_errors 49 | * ib_port_rcv_packets 50 | * ib_port_rcv_remote_physical_errors 51 | * ib_port_rcv_switch_relay_errors 52 | * ib_port_unicast_xmit_packets 53 | * ib_port_unicast_rcv_packets 54 | * ib_port_multicast_xmit_packets 55 | * ib_port_multicast_rcv_packets 56 | * ib_port_xmit_constraint_errors 57 | * ib_port_xmit_data 58 | * ib_port_xmit_discards 59 | * ib_port_xmit_packets 60 | * ib_symbol_error 61 | * ib_vl15_dropped 62 | * ib_rate 63 | 64 | -------------------------------------------------------------------------------- /cpu_temp/python_modules/cpu_temp.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python2 2 | import os 3 | 4 | descriptors = list() 5 | sysdir = '/sys/devices/platform/' 6 | handler_dict = dict() 7 | 8 | def metric_init(params): 9 | global descriptors 10 | try: 11 | coretemp_list = [i for i in os.listdir(sysdir) if i.startswith('coretemp')] 12 | except OSError: 13 | print 'No dir named' + sysdir 14 | os._exit(1) 15 | if not coretemp_list: 16 | print 'No dir name starts with coretemp' 17 | os._exit(1) 18 | for coretemp in coretemp_list: 19 | coreinput_list = [i for i in os.listdir(sysdir + coretemp) if i.endswith('_input')] 20 | try: 21 | with open(sysdir + coretemp + '/temp1_label','r') as f: 22 | phy_id_prefix = f.read().split()[-1] 23 | except IOError: 24 | print 'No temp1_label file' 25 | os._exit(1) 26 | for coreinput in coreinput_list: 27 | build_descriptor(coretemp,coreinput,phy_id_prefix) 28 | return descriptors 29 | 30 | def build_descriptor(coretemp,coreinput,phy_id_prefix): 31 | global handler_dict 32 | if coreinput == 'temp1_input': 33 | name = 'cpu_temp_physical_' + phy_id_prefix 34 | description = 'Physical CPU id ' + phy_id_prefix + ' Temperature' 35 | groups = 'cpu_temp_physical' 36 | handler_dict[name] = sysdir + coretemp + '/temp1_input' 37 | else: 38 | with open(sysdir + coretemp + '/' + coreinput[:-6] + '_label','r') as f: 39 | coreid = f.read().split()[-1] 40 | name = 'cpu_temp_core_' + phy_id_prefix + '_' + coreid 41 | description = 'Physical CPU id ' + phy_id_prefix + ' Core ' + coreid + ' Temperature' 42 | groups = 'cpu_temp_core' 43 | handler_dict[name] = sysdir + coretemp + '/' + coreinput 44 | call_back = metric_handler 45 | d = {'name': name, 46 | 'call_back': call_back, 47 | 'time_max': 60, 48 | 'value_type': 'float', 49 | 'units': 'C', 50 | 'slope': 'both', 51 | 'format': '%.1f', 52 | 'description': description, 53 | 'groups': groups 54 | } 55 | try: 56 | call_back(name) 57 | descriptors.append(d) 58 | except: 59 | print 'Build descriptor Failed' 60 | 61 | def metric_handler(name): 62 | try: 63 | with open(handler_dict.get(name),'r') as f: 64 | temp = f.read() 65 | except: 66 | temp = 0 67 | temp_float = int(temp) / 1000.0 68 | return temp_float 69 | 70 | def metric_cleanup(): 71 | pass 72 | 73 | if __name__ == '__main__': 74 | metric_init({}) 75 | for d in descriptors: 76 | v = d['call_back'](d['name']) 77 | print 'value for %s is %.1f %s' % (d['name'],v,d['units']) 78 | for k,v in d.iteritems(): 79 | print k,v 80 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /usbrh/python_modules/usbrh.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | import sys 5 | 6 | descriptors = list() 7 | Desc_Skel = {} 8 | Debug = False 9 | 10 | def dprint(f, *v): 11 | if Debug: 12 | print >>sys.stderr, "DEBUG: "+f % v 13 | 14 | def metric_of(name): 15 | dprint("%s", name) 16 | try: 17 | type, device_num = name.split("usbrh_")[1].split("_") 18 | f = open("/proc/usbrh/%(device_num)s/%(type)s" % locals(), 'r') 19 | 20 | except IOError: 21 | return 0 22 | 23 | for l in f: 24 | line = l.rstrip() 25 | if type == "temperature": 26 | line = float(line) 27 | 28 | return line 29 | 30 | def metric_init(params): 31 | global descriptors, Desc_Skel, Debug 32 | 33 | print '[usbrh] initialize' 34 | print params 35 | 36 | # initialize skeleton of descriptors 37 | Desc_Skel = { 38 | 'name' : 'usbrh', 39 | 'call_back' : metric_of, 40 | 'time_max' : 60, 41 | 'value_type' : 'float', 42 | 'format' : '%f', 43 | 'units' : 'Celsius', 44 | 'slope' : 'both', 45 | 'description' : 'usbrh temperature', 46 | 'groups' : 'usbrh', 47 | } 48 | 49 | if "debug" in params: 50 | Debug = params["debug"] 51 | dprint("%s", "Debug mode on") 52 | 53 | # IP:HOSTNAME 54 | if "spoof_host" in params: 55 | Desc_Skel["spoof_host"] = params["spoof_host"] 56 | 57 | descriptors.append(create_desc(Desc_Skel, { 58 | "name" : "usbrh_temperature_0", 59 | "value_type" : "float", 60 | "format" : "%f", 61 | "units" : "Celsius", 62 | "description": "usbrh temperature 0", 63 | })) 64 | 65 | descriptors.append(create_desc(Desc_Skel, { 66 | "name" : "usbrh_temperature_1", 67 | "value_type" : "float", 68 | "format" : "%f", 69 | "units" : "Celsius", 70 | "description": "usbrh temperature 1", 71 | })) 72 | 73 | return descriptors 74 | 75 | def create_desc(skel, prop): 76 | d = skel.copy() 77 | for k,v in prop.iteritems(): 78 | d[k] = v 79 | return d 80 | 81 | def metric_cleanup(): 82 | pass 83 | 84 | if __name__ == '__main__': 85 | params = { 86 | "debug" : True, 87 | } 88 | metric_init(params) 89 | 90 | # for d in descriptors: 91 | # print ''' metric { 92 | # name = "%s" 93 | # title = "%s" 94 | # value_threshold = 0 95 | # }''' % (d["name"], d["description"]) 96 | 97 | for d in descriptors: 98 | v = d['call_back'](d['name']) 99 | print ('value for %s is '+d['format']) % (d['name'], v) 100 | -------------------------------------------------------------------------------- /file_checks/file_checks.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import traceback 3 | import os 4 | import re 5 | import time 6 | import copy 7 | import urllib2 8 | 9 | METRICS = { 10 | 'time' : 0, 11 | 'data' : {} 12 | } 13 | 14 | LAST_METRICS = copy.deepcopy(METRICS) 15 | METRICS_CACHE_MAX = 5 16 | 17 | NAME_PREFIX="filechecks_" 18 | 19 | ############################################################################### 20 | # Misc file checks 21 | ############################################################################### 22 | def get_is_file_present(name): 23 | """Find whether file exists""" 24 | 25 | global NAME_PREFIX 26 | 27 | name = name.replace(NAME_PREFIX,"") # remove prefix from name 28 | 29 | filename = "/" + name.replace("_present","").replace("_","/") 30 | 31 | if os.path.isfile(filename): 32 | return 1 33 | else: 34 | return 0 35 | 36 | 37 | def get_file_size(name): 38 | 39 | global NAME_PREFIX 40 | 41 | name = name.replace(NAME_PREFIX,"") # remove prefix from name 42 | 43 | filename = "/" + name.replace("_size","").replace("_","/") 44 | 45 | try: 46 | return os.stat(filename).st_size 47 | except OSError: 48 | return 0 49 | 50 | def create_desc(skel, prop): 51 | d = skel.copy() 52 | for k,v in prop.iteritems(): 53 | d[k] = v 54 | return d 55 | 56 | def metric_init(params): 57 | global descriptors, metric_map, Desc_Skel, NAME_PREFIX 58 | 59 | descriptors = [] 60 | 61 | Desc_Skel = { 62 | 'name' : 'XXX', 63 | 'orig_name' : 'XXX', 64 | 'call_back' : get_is_file_present, 65 | 'time_max' : 60, 66 | 'value_type' : 'uint', 67 | 'format' : '%d', 68 | 'slope' : 'both', # zero|positive|negative|both 69 | 'description' : '', 70 | 'units' : 'boolean', 71 | 'groups' : 'file_checks', 72 | } 73 | 74 | 75 | descriptors.append(create_desc(Desc_Skel, { 76 | "name" : NAME_PREFIX + "etc_chef_disabled_present", 77 | "call_back" : get_is_file_present, 78 | "description" : "/etc/chef/disabled present" 79 | })) 80 | 81 | descriptors.append(create_desc(Desc_Skel, { 82 | "name" : NAME_PREFIX + "var_log_syslog_size", 83 | "call_back" : get_file_size, 84 | "units" : "bytes", 85 | "value_type" : "float", 86 | "description" : "Size of /var/log/syslog" 87 | })) 88 | 89 | 90 | return descriptors 91 | 92 | def metric_cleanup(): 93 | '''Clean up the metric module.''' 94 | pass 95 | 96 | #This code is for debugging and unit testing 97 | if __name__ == '__main__': 98 | metric_init({}) 99 | while True: 100 | for d in descriptors: 101 | v = d['call_back'](d['name']) 102 | print '%s = %s' % (d['name'], v) 103 | print 'Sleeping 5 seconds' 104 | time.sleep(5) 105 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | /* apcu can't get some variables. 23 | try regexp format(require pcre) 24 | metric { 25 | name_match = "apc_(.+)" 26 | } 27 | */ 28 | metric { 29 | name = "apc_mem_size" 30 | title = "Total Memory" 31 | value_threshold = 0 32 | } 33 | metric { 34 | name = "apc_mem_avail" 35 | title = "Free Memory" 36 | value_threshold = 0 37 | } 38 | metric { 39 | name = "apc_mem_used" 40 | title = "Used Memory" 41 | value_threshold = 0 42 | } 43 | metric { 44 | name = "apc_num_slots" 45 | title = "Number of Slots" 46 | value_threshold = 0 47 | } 48 | metric { 49 | name = "apc_num_hits" 50 | title = "Number of Cache Hits" 51 | value_threshold = 0 52 | } 53 | metric { 54 | name = "apc_num_misses" 55 | title = "Number of Cache Misses" 56 | value_threshold = 0 57 | } 58 | metric { 59 | name = "apc_num_inserts" 60 | title = "Number of Cache Inserts" 61 | value_threshold = 0 62 | } 63 | metric { 64 | name = "apc_expunges" 65 | title = "Number of Cache Deletes" 66 | value_threshold = 0 67 | } 68 | /* if apcu using. try num_expunges nexpunges. https://github.com/krakjoe/apcu/issues/41 (fixed but not merge release branch) 69 | metric { 70 | name = "apc_num_expunges" 71 | title = "Number of Cache Deletes" 72 | value_threshold = 0 73 | } 74 | */ 75 | metric { 76 | name = "apc_expunges" 77 | title = "Number of Cache Deletes" 78 | value_threshold = 0 79 | } 80 | metric { 81 | name = "apc_num_entries" 82 | title = "Cached Files" 83 | value_threshold = 0 84 | } 85 | metric { 86 | name = "apc_num_seg" 87 | title = "Segments" 88 | value_threshold = 0 89 | } 90 | metric { 91 | name = "apc_uptime" 92 | title = "Uptime" 93 | value_threshold = 0 94 | } 95 | metric { 96 | name = "apc_request_rate" 97 | title = "Request Rate (hits, misses)" 98 | value_threshold = 0.0 99 | } 100 | metric { 101 | name = "apc_hit_rate" 102 | title = "Hit Rate" 103 | value_threshold = 0.0 104 | } 105 | metric { 106 | name = "apc_miss_rate" 107 | title = "Miss Rate" 108 | value_threshold = 0.0 109 | } 110 | metric { 111 | name = "apc_insert_rate" 112 | title = "Insert Rate" 113 | value_threshold = 0.0 114 | } 115 | } 116 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /unbound/README.md: -------------------------------------------------------------------------------- 1 | # unbound 2 | 3 | Pythond module for ganglia. Reads stats from `unbound-control stats`. 4 | 5 | http://unbound.net/documentation/unbound-control.html 6 | 7 | ## privileges 8 | 9 | The ganglia user needs to execute the unbound-control stats command, so it's 10 | probably necessary to add this to your sudoers file: 11 | 12 | ganglia ALL=(root) NOPASSWD: /usr/sbin/unbound-control stats 13 | 14 | ## stats 15 | 16 | * unbound_queries 17 | 18 | number of queries received 19 | 20 | * unbound_cachehits 21 | 22 | number of queries that were successfully answered using a cache lookup 23 | 24 | * unbound_cachemiss 25 | 26 | number of queries that needed recursive processing 27 | 28 | * unbound_prefetch 29 | 30 | number of cache prefetches performed. This number is included 31 | in cachehits, as the original query had the unprefetched answer 32 | from cache, and resulted in recursive processing, taking a slot 33 | in the requestlist. Not part of the recursivereplies (or the 34 | histogram thereof) or cachemiss, as a cache response was sent. 35 | 36 | * unbound_recursivereplies 37 | 38 | The number of replies sent to queries that needed recursive pro- 39 | cessing. Could be smaller than threadX.num.cachemiss if due to 40 | timeouts no replies were sent for some queries. 41 | 42 | * unbound_requestlist_avg 43 | 44 | The average number of requests in the internal recursive pro- 45 | cessing request list on insert of a new incoming recursive pro- 46 | cessing query. 47 | 48 | * unbound_requestlist_max 49 | 50 | Maximum size attained by the internal recursive processing 51 | request list. 52 | 53 | * unbound_requestlist_overwritten 54 | 55 | Number of requests in the request list that were overwritten by 56 | newer entries. This happens if there is a flood of queries that 57 | recursive processing and the server has a hard time. 58 | 59 | * unbound_requestlist_exceeded 60 | 61 | Queries that were dropped because the request list was full. 62 | This happens if a flood of queries need recursive processing, 63 | and the server can not keep up. 64 | 65 | * unbound_requestlist_current_all 66 | 67 | Current size of the request list, includes internally generated 68 | queries (such as priming queries and glue lookups). 69 | 70 | * unbound_requestlist_current_user 71 | 72 | Current size of the request list, only the requests from client 73 | queries. 74 | 75 | * unbound_recursion_time_avg 76 | 77 | Average time it took to answer queries that needed recursive 78 | processing. Note that queries that were answered from the cache 79 | are not in this average. 80 | 81 | * unbound_recursion_time_median 82 | 83 | The median of the time it took to answer queries that needed 84 | recursive processing. The median means that 50% of the user 85 | queries were answered in less than this time. Because of big 86 | outliers (usually queries to non responsive servers), the aver- 87 | age can be bigger than the median. This median has been calcu- 88 | lated by interpolation from a histogram. 89 | --------------------------------------------------------------------------------