├── VERSION ├── .gitignore ├── t ├── nagios │ ├── pmp-check-mysql-replication-running │ │ ├── samples │ │ │ ├── empty │ │ │ ├── show-slave-status-005.txt │ │ │ ├── show-slave-status-001.txt │ │ │ ├── show-slave-status-003.txt │ │ │ ├── show-slave-status-002.txt │ │ │ └── show-slave-status-004.txt │ │ └── check-functions.sh │ ├── pmp-check-mysql-deadlocks │ │ └── check-functions.sh │ ├── pmp-check-mysql-pidfile │ │ └── check-functions.sh │ ├── pmp-check-mysql-processlist │ │ ├── samples │ │ │ ├── copy-processlist-1.txt │ │ │ ├── locked-processlist-5.1-1.txt │ │ │ └── locked-processlist-5.5-1.txt │ │ └── check-functions.sh │ ├── pmp-check-lvm-snapshots │ │ ├── samples │ │ │ ├── lvs-001.txt │ │ │ ├── lvs-002.txt │ │ │ ├── lvs-003.txt │ │ │ └── lvs-004.txt │ │ └── check-functions.sh │ ├── pmp-check-mysql-deleted-files │ │ ├── check-functions.sh │ │ └── samples │ │ │ └── lsof-001.txt │ ├── pmp-check-unix-memory │ │ ├── check-functions.sh │ │ └── samples │ │ │ ├── meminfo-001.txt │ │ │ ├── meminfo-002.txt │ │ │ └── ps-001.txt │ ├── pmp-check-mysql-innodb │ │ ├── check-functions.sh │ │ └── samples │ │ │ └── innodb-status-002.txt │ ├── pmp-check-mysql-replication-delay │ │ ├── check-functions.sh │ │ └── samples │ │ │ ├── show-slave-status-001.txt │ │ │ └── show-slave-status-002.txt │ ├── check_all.sh │ └── pmp-check-mysql-status │ │ └── check-functions.sh └── cacti │ ├── samples │ ├── uptime-001.txt │ ├── w-001.txt │ ├── w-003.txt │ ├── w-004.txt │ ├── w-002.txt │ ├── nginx-001.txt │ ├── df-001.txt │ ├── jmx-001.txt │ ├── redis-001.txt │ ├── innodb-010.txt │ ├── apache-002.txt │ ├── apache-001.txt │ ├── memcached-001.txt │ ├── proc_stat-001.txt │ ├── df-002.txt │ ├── netdev-001.txt │ ├── diskstats-001.txt │ ├── meminfo-001.txt │ ├── meminfo-002.txt │ ├── diskstats-003.txt │ ├── diskstats-002.txt │ ├── redis-002.txt │ ├── mongodb-001.txt │ ├── vmstat-001.txt │ ├── innodb-004.txt │ ├── innodb-005.txt │ ├── innodb-003.txt │ ├── openvz-001.txt │ ├── innodb-008.txt │ ├── innodb-007.txt │ ├── innodb-012.txt │ ├── innodb-016.txt │ ├── innodb-013.txt │ ├── innodb-002.txt │ └── proc_stat-002.txt │ └── misc_functions_1.php ├── docs ├── config │ ├── percona-logo.jpg │ ├── percona_favicon.ico │ └── conf.py ├── cacti │ ├── images │ │ ├── Redis_Memory.png │ │ ├── apache_bytes.png │ │ ├── linux_forks.png │ │ ├── linux_memory.png │ │ ├── rds_memory.png │ │ ├── Redis_Commands.png │ │ ├── apache_workers.png │ │ ├── mongodb_memory.png │ │ ├── nginx_requests.png │ │ ├── rds_disk_iops.png │ │ ├── rds_swap_usage.png │ │ ├── Redis_Connections.png │ │ ├── apache_cpu_load.png │ │ ├── apache_requests.png │ │ ├── apache_scoreboard.png │ │ ├── cacti-graph-set.png │ │ ├── linux_cpu_usage.png │ │ ├── linux_disk_iops.png │ │ ├── linux_disk_space.png │ │ ├── linux_interrupts.png │ │ ├── linux_swap_usage.png │ │ ├── memcached_memory.png │ │ ├── memcached_rusage.png │ │ ├── memcached_traffic.png │ │ ├── mongodb_commands.png │ │ ├── mongodb_index_ops.png │ │ ├── mysql_innodb_io.png │ │ ├── mysql_innodb_log.png │ │ ├── mysql_mysql_sorts.png │ │ ├── nginx_scoreboard.png │ │ ├── rds_disk_latency.png │ │ ├── rds_replica_lag.png │ │ ├── rds_storage_space.png │ │ ├── add_unix_disk_graph.png │ │ ├── galera_cluster_size.png │ │ ├── galera_flow_control.png │ │ ├── jmx-file-descriptor.png │ │ ├── linux_load_average.png │ │ ├── linux_number_users.png │ │ ├── memcached_requests.png │ │ ├── mongodb_connections.png │ │ ├── mysql_mysql_threads.png │ │ ├── rds_cpu_utilization.png │ │ ├── rds_disk_throughput.png │ │ ├── Redis_Unsaved_Changes.png │ │ ├── galera_writeset_count.png │ │ ├── galera_writeset_size.png │ │ ├── jmx-heap-memory-usage.png │ │ ├── linux_context_switches.png │ │ ├── linux_disk_operations.png │ │ ├── linux_network_errors.png │ │ ├── linux_network_traffic.png │ │ ├── memcached_connections.png │ │ ├── mysql_myisam_indexes.png │ │ ├── mysql_myisam_key_cache.png │ │ ├── mysql_mysql_handlers.png │ │ ├── nginx_accepts_handled.png │ │ ├── rds_binlog_disk_usage.png │ │ ├── rds_disk_queue_depth.png │ │ ├── create-graphs-input-port.png │ │ ├── galera_writeset_traffic.png │ │ ├── galera_writing_conflicts.png │ │ ├── jmx-nonheap-memory-usage.png │ │ ├── memcached_current_items.png │ │ ├── mysql_innodb_buffer_pool.png │ │ ├── mysql_innodb_io_pending.png │ │ ├── mysql_innodb_semaphores.png │ │ ├── mysql_mysql_connections.png │ │ ├── mysql_mysql_processlist.png │ │ ├── mysql_mysql_query_cache.png │ │ ├── mysql_mysql_replication.png │ │ ├── mysql_mysql_select_types.png │ │ ├── mysql_mysql_table_locks.png │ │ ├── rds_database_connections.png │ │ ├── fill-in-data-source-values.png │ │ ├── galera_replication_queues.png │ │ ├── linux_disk_elapsed_io_time.png │ │ ├── linux_disk_read_write_time.png │ │ ├── mongodb_background_flushes.png │ │ ├── mysql_innodb_checkpoint_age.png │ │ ├── mysql_innodb_insert_buffer.png │ │ ├── mysql_innodb_row_lock_time.png │ │ ├── mysql_innodb_row_lock_waits.png │ │ ├── mysql_innodb_row_operations.png │ │ ├── mysql_innodb_tables_in_use.png │ │ ├── mysql_innodb_transactions.png │ │ ├── mysql_mysql_network_traffic.png │ │ ├── use-per-data-source-value.png │ │ ├── mysql_innodb_lock_structures.png │ │ ├── mysql_innodb_semaphore_waits.png │ │ ├── mysql_mysql_binaryrelay_logs.png │ │ ├── mysql_mysql_command_counters.png │ │ ├── mysql_mysql_files_and_tables.png │ │ ├── mysql_mysql_temporary_objects.png │ │ ├── linux_disk_sectors_read_written.png │ │ ├── linux_network_connection_states.png │ │ ├── mysql_innodb_adaptive_hash_index.png │ │ ├── mysql_innodb_current_lock_waits.png │ │ ├── mysql_innodb_insert_buffer_usage.png │ │ ├── mysql_innodb_memory_allocation.png │ │ ├── mysql_innodb_semaphore_wait_time.png │ │ ├── mysql_mysql_query_cache_memory.png │ │ ├── mysql_mysql_query_response_time.png │ │ ├── mysql_mysql_query_time_histogram.png │ │ ├── mysql_mysql_transaction_handler.png │ │ ├── galera_parallelization_efficiency.png │ │ ├── memcached_additions_and_evictions.png │ │ ├── mysql_innodb_buffer_pool_activity.png │ │ ├── mysql_innodb_buffer_pool_efficiency.png │ │ ├── mysql-cacti-templates-installed-version.png │ │ ├── mysql_innodb_internal_hash_memory_usage.png │ │ ├── mysql_innodb_transactions_activelocked.png │ │ └── linux_disk_read_write_time_per_io_request.png │ ├── developer-documentation.rst │ ├── adding-graphs.rst │ ├── openvz-templates.rst │ ├── cacti-hashes.rst │ ├── upgrading-templates.rst │ ├── mongodb-templates.rst │ ├── redis-templates.rst │ ├── nginx-templates.rst │ ├── apache-templates.rst │ ├── index.rst │ ├── faq.rst │ ├── jmx-templates.rst │ ├── memcached-templates.rst │ ├── helper-tools.rst │ ├── hardening-cacti-setup.rst │ ├── galera-templates.rst │ ├── rds-templates.rst │ └── customizing-templates.rst ├── zabbix │ ├── images │ │ └── nagios-zabbix-cacti.png │ └── index.rst ├── nagios │ └── index.rst └── index.rst ├── dev-docs └── making-releases.rst ├── README.md ├── zabbix ├── scripts │ └── get_mysql_stats_wrapper.sh └── triggers │ └── mysql.yml ├── cacti ├── bin │ ├── pmp-cacti-make-hashes │ └── pmp-cacti-graph-defs └── misc │ └── jmx-monitor.xml └── util ├── pod2rst └── generate-nagios-config /VERSION: -------------------------------------------------------------------------------- 1 | 1.1.8 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | .idea/ 3 | release/ 4 | -------------------------------------------------------------------------------- /t/nagios/pmp-check-mysql-replication-running/samples/empty: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /t/cacti/samples/uptime-001.txt: -------------------------------------------------------------------------------- 1 | 13:50:25 up 4:50, load average: 0.00, 0.03, 0.06 2 | -------------------------------------------------------------------------------- /t/cacti/samples/w-001.txt: -------------------------------------------------------------------------------- 1 | 15:38:40 up 8:19, 2 users, load average: 0.00, 0.03, 1.43 2 | -------------------------------------------------------------------------------- /t/cacti/samples/w-003.txt: -------------------------------------------------------------------------------- 1 | 17:31:39 up 50 min, 1 user, load average: 0.02, 0.01, 0.00 2 | -------------------------------------------------------------------------------- /t/cacti/samples/w-004.txt: -------------------------------------------------------------------------------- 1 | 17:31:39 up 50 min, 1 user, load average: 11.02, 11.01, 11.00 2 | -------------------------------------------------------------------------------- /t/cacti/samples/w-002.txt: -------------------------------------------------------------------------------- 1 | 20:38:18 up 2 days, 12:05, 6 users, load average: 0.29, 0.39, 0.35 2 | -------------------------------------------------------------------------------- /docs/config/percona-logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/config/percona-logo.jpg -------------------------------------------------------------------------------- /docs/config/percona_favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/config/percona_favicon.ico -------------------------------------------------------------------------------- /docs/cacti/images/Redis_Memory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/Redis_Memory.png -------------------------------------------------------------------------------- /docs/cacti/images/apache_bytes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/apache_bytes.png -------------------------------------------------------------------------------- /docs/cacti/images/linux_forks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/linux_forks.png -------------------------------------------------------------------------------- /docs/cacti/images/linux_memory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/linux_memory.png -------------------------------------------------------------------------------- /docs/cacti/images/rds_memory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/rds_memory.png -------------------------------------------------------------------------------- /docs/cacti/images/Redis_Commands.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/Redis_Commands.png -------------------------------------------------------------------------------- /docs/cacti/images/apache_workers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/apache_workers.png -------------------------------------------------------------------------------- /docs/cacti/images/mongodb_memory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mongodb_memory.png -------------------------------------------------------------------------------- /docs/cacti/images/nginx_requests.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/nginx_requests.png -------------------------------------------------------------------------------- /docs/cacti/images/rds_disk_iops.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/rds_disk_iops.png -------------------------------------------------------------------------------- /docs/cacti/images/rds_swap_usage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/rds_swap_usage.png -------------------------------------------------------------------------------- /docs/cacti/images/Redis_Connections.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/Redis_Connections.png -------------------------------------------------------------------------------- /docs/cacti/images/apache_cpu_load.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/apache_cpu_load.png -------------------------------------------------------------------------------- /docs/cacti/images/apache_requests.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/apache_requests.png -------------------------------------------------------------------------------- /docs/cacti/images/apache_scoreboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/apache_scoreboard.png -------------------------------------------------------------------------------- /docs/cacti/images/cacti-graph-set.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/cacti-graph-set.png -------------------------------------------------------------------------------- /docs/cacti/images/linux_cpu_usage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/linux_cpu_usage.png -------------------------------------------------------------------------------- /docs/cacti/images/linux_disk_iops.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/linux_disk_iops.png -------------------------------------------------------------------------------- /docs/cacti/images/linux_disk_space.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/linux_disk_space.png -------------------------------------------------------------------------------- /docs/cacti/images/linux_interrupts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/linux_interrupts.png -------------------------------------------------------------------------------- /docs/cacti/images/linux_swap_usage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/linux_swap_usage.png -------------------------------------------------------------------------------- /docs/cacti/images/memcached_memory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/memcached_memory.png -------------------------------------------------------------------------------- /docs/cacti/images/memcached_rusage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/memcached_rusage.png -------------------------------------------------------------------------------- /docs/cacti/images/memcached_traffic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/memcached_traffic.png -------------------------------------------------------------------------------- /docs/cacti/images/mongodb_commands.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mongodb_commands.png -------------------------------------------------------------------------------- /docs/cacti/images/mongodb_index_ops.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mongodb_index_ops.png -------------------------------------------------------------------------------- /docs/cacti/images/mysql_innodb_io.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mysql_innodb_io.png -------------------------------------------------------------------------------- /docs/cacti/images/mysql_innodb_log.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mysql_innodb_log.png -------------------------------------------------------------------------------- /docs/cacti/images/mysql_mysql_sorts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mysql_mysql_sorts.png -------------------------------------------------------------------------------- /docs/cacti/images/nginx_scoreboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/nginx_scoreboard.png -------------------------------------------------------------------------------- /docs/cacti/images/rds_disk_latency.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/rds_disk_latency.png -------------------------------------------------------------------------------- /docs/cacti/images/rds_replica_lag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/rds_replica_lag.png -------------------------------------------------------------------------------- /docs/cacti/images/rds_storage_space.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/rds_storage_space.png -------------------------------------------------------------------------------- /docs/cacti/images/add_unix_disk_graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/add_unix_disk_graph.png -------------------------------------------------------------------------------- /docs/cacti/images/galera_cluster_size.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/galera_cluster_size.png -------------------------------------------------------------------------------- /docs/cacti/images/galera_flow_control.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/galera_flow_control.png -------------------------------------------------------------------------------- /docs/cacti/images/jmx-file-descriptor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/jmx-file-descriptor.png -------------------------------------------------------------------------------- /docs/cacti/images/linux_load_average.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/linux_load_average.png -------------------------------------------------------------------------------- /docs/cacti/images/linux_number_users.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/linux_number_users.png -------------------------------------------------------------------------------- /docs/cacti/images/memcached_requests.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/memcached_requests.png -------------------------------------------------------------------------------- /docs/cacti/images/mongodb_connections.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mongodb_connections.png -------------------------------------------------------------------------------- /docs/cacti/images/mysql_mysql_threads.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mysql_mysql_threads.png -------------------------------------------------------------------------------- /docs/cacti/images/rds_cpu_utilization.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/rds_cpu_utilization.png -------------------------------------------------------------------------------- /docs/cacti/images/rds_disk_throughput.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/rds_disk_throughput.png -------------------------------------------------------------------------------- /docs/cacti/images/Redis_Unsaved_Changes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/Redis_Unsaved_Changes.png -------------------------------------------------------------------------------- /docs/cacti/images/galera_writeset_count.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/galera_writeset_count.png -------------------------------------------------------------------------------- /docs/cacti/images/galera_writeset_size.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/galera_writeset_size.png -------------------------------------------------------------------------------- /docs/cacti/images/jmx-heap-memory-usage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/jmx-heap-memory-usage.png -------------------------------------------------------------------------------- /docs/cacti/images/linux_context_switches.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/linux_context_switches.png -------------------------------------------------------------------------------- /docs/cacti/images/linux_disk_operations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/linux_disk_operations.png -------------------------------------------------------------------------------- /docs/cacti/images/linux_network_errors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/linux_network_errors.png -------------------------------------------------------------------------------- /docs/cacti/images/linux_network_traffic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/linux_network_traffic.png -------------------------------------------------------------------------------- /docs/cacti/images/memcached_connections.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/memcached_connections.png -------------------------------------------------------------------------------- /docs/cacti/images/mysql_myisam_indexes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mysql_myisam_indexes.png -------------------------------------------------------------------------------- /docs/cacti/images/mysql_myisam_key_cache.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mysql_myisam_key_cache.png -------------------------------------------------------------------------------- /docs/cacti/images/mysql_mysql_handlers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mysql_mysql_handlers.png -------------------------------------------------------------------------------- /docs/cacti/images/nginx_accepts_handled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/nginx_accepts_handled.png -------------------------------------------------------------------------------- /docs/cacti/images/rds_binlog_disk_usage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/rds_binlog_disk_usage.png -------------------------------------------------------------------------------- /docs/cacti/images/rds_disk_queue_depth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/rds_disk_queue_depth.png -------------------------------------------------------------------------------- /docs/zabbix/images/nagios-zabbix-cacti.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/zabbix/images/nagios-zabbix-cacti.png -------------------------------------------------------------------------------- /docs/cacti/images/create-graphs-input-port.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/create-graphs-input-port.png -------------------------------------------------------------------------------- /docs/cacti/images/galera_writeset_traffic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/galera_writeset_traffic.png -------------------------------------------------------------------------------- /docs/cacti/images/galera_writing_conflicts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/galera_writing_conflicts.png -------------------------------------------------------------------------------- /docs/cacti/images/jmx-nonheap-memory-usage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/jmx-nonheap-memory-usage.png -------------------------------------------------------------------------------- /docs/cacti/images/memcached_current_items.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/memcached_current_items.png -------------------------------------------------------------------------------- /docs/cacti/images/mysql_innodb_buffer_pool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mysql_innodb_buffer_pool.png -------------------------------------------------------------------------------- /docs/cacti/images/mysql_innodb_io_pending.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mysql_innodb_io_pending.png -------------------------------------------------------------------------------- /docs/cacti/images/mysql_innodb_semaphores.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mysql_innodb_semaphores.png -------------------------------------------------------------------------------- /docs/cacti/images/mysql_mysql_connections.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mysql_mysql_connections.png -------------------------------------------------------------------------------- /docs/cacti/images/mysql_mysql_processlist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mysql_mysql_processlist.png -------------------------------------------------------------------------------- /docs/cacti/images/mysql_mysql_query_cache.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mysql_mysql_query_cache.png -------------------------------------------------------------------------------- /docs/cacti/images/mysql_mysql_replication.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mysql_mysql_replication.png -------------------------------------------------------------------------------- /docs/cacti/images/mysql_mysql_select_types.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mysql_mysql_select_types.png -------------------------------------------------------------------------------- /docs/cacti/images/mysql_mysql_table_locks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mysql_mysql_table_locks.png -------------------------------------------------------------------------------- /docs/cacti/images/rds_database_connections.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/rds_database_connections.png -------------------------------------------------------------------------------- /docs/cacti/images/fill-in-data-source-values.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/fill-in-data-source-values.png -------------------------------------------------------------------------------- /docs/cacti/images/galera_replication_queues.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/galera_replication_queues.png -------------------------------------------------------------------------------- /docs/cacti/images/linux_disk_elapsed_io_time.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/linux_disk_elapsed_io_time.png -------------------------------------------------------------------------------- /docs/cacti/images/linux_disk_read_write_time.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/linux_disk_read_write_time.png -------------------------------------------------------------------------------- /docs/cacti/images/mongodb_background_flushes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mongodb_background_flushes.png -------------------------------------------------------------------------------- /docs/cacti/images/mysql_innodb_checkpoint_age.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mysql_innodb_checkpoint_age.png -------------------------------------------------------------------------------- /docs/cacti/images/mysql_innodb_insert_buffer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mysql_innodb_insert_buffer.png -------------------------------------------------------------------------------- /docs/cacti/images/mysql_innodb_row_lock_time.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mysql_innodb_row_lock_time.png -------------------------------------------------------------------------------- /docs/cacti/images/mysql_innodb_row_lock_waits.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mysql_innodb_row_lock_waits.png -------------------------------------------------------------------------------- /docs/cacti/images/mysql_innodb_row_operations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mysql_innodb_row_operations.png -------------------------------------------------------------------------------- /docs/cacti/images/mysql_innodb_tables_in_use.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mysql_innodb_tables_in_use.png -------------------------------------------------------------------------------- /docs/cacti/images/mysql_innodb_transactions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mysql_innodb_transactions.png -------------------------------------------------------------------------------- /docs/cacti/images/mysql_mysql_network_traffic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mysql_mysql_network_traffic.png -------------------------------------------------------------------------------- /docs/cacti/images/use-per-data-source-value.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/use-per-data-source-value.png -------------------------------------------------------------------------------- /docs/cacti/images/mysql_innodb_lock_structures.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mysql_innodb_lock_structures.png -------------------------------------------------------------------------------- /docs/cacti/images/mysql_innodb_semaphore_waits.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mysql_innodb_semaphore_waits.png -------------------------------------------------------------------------------- /docs/cacti/images/mysql_mysql_binaryrelay_logs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mysql_mysql_binaryrelay_logs.png -------------------------------------------------------------------------------- /docs/cacti/images/mysql_mysql_command_counters.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mysql_mysql_command_counters.png -------------------------------------------------------------------------------- /docs/cacti/images/mysql_mysql_files_and_tables.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mysql_mysql_files_and_tables.png -------------------------------------------------------------------------------- /docs/cacti/images/mysql_mysql_temporary_objects.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mysql_mysql_temporary_objects.png -------------------------------------------------------------------------------- /t/cacti/samples/nginx-001.txt: -------------------------------------------------------------------------------- 1 | Active connections: 251 2 | server accepts handled requests 3 | 255601634 255601634 671013148 4 | Reading: 5 Writing: 27 Waiting: 219 5 | -------------------------------------------------------------------------------- /docs/cacti/images/linux_disk_sectors_read_written.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/linux_disk_sectors_read_written.png -------------------------------------------------------------------------------- /docs/cacti/images/linux_network_connection_states.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/linux_network_connection_states.png -------------------------------------------------------------------------------- /docs/cacti/images/mysql_innodb_adaptive_hash_index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mysql_innodb_adaptive_hash_index.png -------------------------------------------------------------------------------- /docs/cacti/images/mysql_innodb_current_lock_waits.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mysql_innodb_current_lock_waits.png -------------------------------------------------------------------------------- /docs/cacti/images/mysql_innodb_insert_buffer_usage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mysql_innodb_insert_buffer_usage.png -------------------------------------------------------------------------------- /docs/cacti/images/mysql_innodb_memory_allocation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mysql_innodb_memory_allocation.png -------------------------------------------------------------------------------- /docs/cacti/images/mysql_innodb_semaphore_wait_time.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mysql_innodb_semaphore_wait_time.png -------------------------------------------------------------------------------- /docs/cacti/images/mysql_mysql_query_cache_memory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mysql_mysql_query_cache_memory.png -------------------------------------------------------------------------------- /docs/cacti/images/mysql_mysql_query_response_time.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mysql_mysql_query_response_time.png -------------------------------------------------------------------------------- /docs/cacti/images/mysql_mysql_query_time_histogram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mysql_mysql_query_time_histogram.png -------------------------------------------------------------------------------- /docs/cacti/images/mysql_mysql_transaction_handler.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mysql_mysql_transaction_handler.png -------------------------------------------------------------------------------- /docs/cacti/images/galera_parallelization_efficiency.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/galera_parallelization_efficiency.png -------------------------------------------------------------------------------- /docs/cacti/images/memcached_additions_and_evictions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/memcached_additions_and_evictions.png -------------------------------------------------------------------------------- /docs/cacti/images/mysql_innodb_buffer_pool_activity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mysql_innodb_buffer_pool_activity.png -------------------------------------------------------------------------------- /docs/cacti/images/mysql_innodb_buffer_pool_efficiency.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mysql_innodb_buffer_pool_efficiency.png -------------------------------------------------------------------------------- /docs/cacti/images/mysql-cacti-templates-installed-version.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mysql-cacti-templates-installed-version.png -------------------------------------------------------------------------------- /docs/cacti/images/mysql_innodb_internal_hash_memory_usage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mysql_innodb_internal_hash_memory_usage.png -------------------------------------------------------------------------------- /docs/cacti/images/mysql_innodb_transactions_activelocked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/mysql_innodb_transactions_activelocked.png -------------------------------------------------------------------------------- /t/nagios/pmp-check-mysql-deadlocks/check-functions.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | . ../../../nagios/bin/pmp-check-mysql-deadlocks 4 | 5 | echo "should print UNK could not count deadlocks" 6 | main 7 | -------------------------------------------------------------------------------- /docs/cacti/images/linux_disk_read_write_time_per_io_request.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/percona-monitoring-plugins/HEAD/docs/cacti/images/linux_disk_read_write_time_per_io_request.png -------------------------------------------------------------------------------- /t/nagios/pmp-check-mysql-pidfile/check-functions.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | . ../../../nagios/bin/pmp-check-mysql-pidfile 4 | 5 | echo "Should print /tmp/mysql.5520.pid" 6 | get_pidfile "samples/global-variables-001.txt" 7 | -------------------------------------------------------------------------------- /t/nagios/pmp-check-mysql-processlist/samples/copy-processlist-1.txt: -------------------------------------------------------------------------------- 1 | State: copy to tmp table 2 | State: Copying to tmp table on disk 3 | State: Copying to tmp table 4 | State: Copying to group table 5 | -------------------------------------------------------------------------------- /t/nagios/pmp-check-lvm-snapshots/samples/lvs-001.txt: -------------------------------------------------------------------------------- 1 | LV VG Attr LSize Origin Snap% Move Log Copy% Convert 2 | LogVol00 VolGroup00 -wi-ao 5.88G 3 | LogVol01 VolGroup00 -wi-ao 2.00G 4 | -------------------------------------------------------------------------------- /t/cacti/samples/df-001.txt: -------------------------------------------------------------------------------- 1 | Filesystem 1K-blocks Used Available Use% Mounted on 2 | /dev/vzfs 30720000 4488715 26231285 15% / 3 | tmpfs 4147072 0 4147072 0% /lib/init/rw 4 | tmpfs 4147072 0 4147072 0% /dev/shm 5 | -------------------------------------------------------------------------------- /t/nagios/pmp-check-lvm-snapshots/samples/lvs-002.txt: -------------------------------------------------------------------------------- 1 | LV VG Attr LSize Origin Snap% Move Log Copy% Convert 2 | LogVol00 VolGroup00 -wi-ao 5.88G 3 | LogVol01 VolGroup00 -wi-ao 2.00G 4 | lv1 vg2 owi-a- 5.00G 5 | lv2 vg2 swi-a- 1.00G lv1 0.00 6 | -------------------------------------------------------------------------------- /t/nagios/pmp-check-mysql-deleted-files/check-functions.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | . ../../../nagios/bin/pmp-check-mysql-deleted-files 4 | 5 | echo "should print nothing" 6 | check_deleted_files samples/lsof-001.txt /tmp/ 7 | 8 | echo "should print out 5 /tmp/ib* files" 9 | check_deleted_files samples/lsof-001.txt /foo/ 10 | -------------------------------------------------------------------------------- /t/nagios/pmp-check-lvm-snapshots/samples/lvs-003.txt: -------------------------------------------------------------------------------- 1 | LV VG Attr LSize Origin Snap% Move Log Copy% Convert 2 | LogVol00 VolGroup00 -wi-ao 5.88G 3 | LogVol01 VolGroup00 -wi-ao 2.00G 4 | lv1 vg2 owi-a- 5.00G 5 | lv2 vg2 swi-a- 1.00G lv1 20.57 6 | -------------------------------------------------------------------------------- /t/nagios/pmp-check-unix-memory/check-functions.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | . ../../../nagios/bin/pmp-check-unix-memory 4 | 5 | echo "Should print 29" 6 | get_used_memory_linux samples/meminfo-001.txt 7 | 8 | echo "Should print 89" 9 | get_used_memory_linux samples/meminfo-002.txt 10 | 11 | echo "Should print 53" 12 | get_used_memory_bsd samples/sysctl-001.txt 13 | 14 | -------------------------------------------------------------------------------- /t/nagios/pmp-check-mysql-innodb/check-functions.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | . ../../../nagios/bin/pmp-check-mysql-innodb 4 | 5 | echo "should print 40 31615419 foozle@10.124.62.114" 6 | get_longest_trx "samples/innodb-status-001.txt" 7 | 8 | echo "should print 0" 9 | get_waiter_count "samples/innodb-status-001.txt" 10 | 11 | echo "should print 1" 12 | get_waiter_count "samples/innodb-status-002.txt" 13 | -------------------------------------------------------------------------------- /docs/cacti/developer-documentation.rst: -------------------------------------------------------------------------------- 1 | .. _cacti_developer_documentation: 2 | 3 | Cacti Templates Developer Documentation 4 | ======================================= 5 | 6 | This documentation is for users who wish to extend the Cacti templates to create 7 | new graphs, collect new types of data, and so on. 8 | 9 | .. toctree:: 10 | 11 | adding-graphs 12 | cacti-hashes 13 | creating-graphs 14 | helper-tools 15 | -------------------------------------------------------------------------------- /t/cacti/samples/jmx-001.txt: -------------------------------------------------------------------------------- 1 | heap_memory_used: 52685256 2 | heap_memory_committed: 205979648 3 | heap_memory_max: 1864171520 4 | non_heap_memory_used: 55160928 5 | non_heap_memory_committed: 61603840 6 | non_heap_memory_max: 318767104 7 | open_file_descriptors: 60 8 | max_file_descriptors: 1024 9 | current_threads_busy: 7 10 | current_thread_count: 172 11 | max_threads: 200 12 | 13 | BUILD SUCCESSFUL 14 | Total time: 0 seconds 15 | -------------------------------------------------------------------------------- /t/cacti/samples/redis-001.txt: -------------------------------------------------------------------------------- 1 | $362 2 | redis_version:1.2.5 3 | arch_bits:32 4 | multiplexing_api:epoll 5 | uptime_in_seconds:86 6 | uptime_in_days:0 7 | connected_clients:119 8 | connected_slaves:911 9 | used_memory:412372 10 | used_memory_human:402.71K 11 | changes_since_last_save:4321 12 | bgsave_in_progress:0 13 | last_save_time:1268794518 14 | bgrewriteaof_in_progress:0 15 | total_connections_received:3333 16 | total_commands_processed:5 17 | role:master 18 | 19 | -------------------------------------------------------------------------------- /t/cacti/samples/innodb-010.txt: -------------------------------------------------------------------------------- 1 | ===================================== 2 | 060606 9:15:20 INNODB MONITOR OUTPUT 3 | ===================================== 4 | Per second averages calculated from the last 22 seconds 5 | ---------- 6 | SEMAPHORES 7 | ---------- 8 | OS WAIT ARRAY INFO: reservation count 6863603, signal count 6213866 9 | Mutex spin waits 453110184, rounds 526682897, OS waits 3676843 10 | RW-shared spins 8301816, OS waits 2289645; RW-excl spins 10020839, OS waits 297503 11 | -------------------------------------------------------------------------------- /t/cacti/samples/apache-002.txt: -------------------------------------------------------------------------------- 1 | Total Accesses: 368 2 | Total kBytes: 1151 3 | CPULoad: .0284617 4 | Uptime: 49224 5 | ReqPerSec: .00747603 6 | BytesPerSec: 23.9441 7 | BytesPerReq: 3202.78 8 | BusyWorkers: 1 9 | IdleWorkers: 19 10 | Scoreboard: ...._......_____________W_____.................................................................................................................................................................................................................................. 11 | -------------------------------------------------------------------------------- /t/cacti/samples/apache-001.txt: -------------------------------------------------------------------------------- 1 | Total Accesses: 3452389 2 | Total kBytes: 23293720 3 | CPULoad: .023871 4 | Uptime: 332244 5 | ReqPerSec: 10.3911 6 | BytesPerSec: 71792.9 7 | BytesPerReq: 6909.06 8 | BusyWorkers: 1 9 | IdleWorkers: 8 10 | Scoreboard: ____W____....................................................................................................................................................................................................................................................... 11 | -------------------------------------------------------------------------------- /t/nagios/pmp-check-lvm-snapshots/samples/lvs-004.txt: -------------------------------------------------------------------------------- 1 | File descriptor 4 (/etc/nagios/objects/.commands.cfg.swp) leaked on lvs invocation. Parent PID 15863: /bin/bash 2 | File descriptor 5 (/etc/nagios/objects/.localhost.cfg.swp) leaked on lvs invocation. Parent PID 15863: /bin/bash 3 | LV VG Attr LSize Origin Snap% Move Log Copy% Convert 4 | LogVol00 VolGroup00 -wi-ao 14.88G 5 | LogVol01 VolGroup00 -wi-ao 1.00G 6 | -------------------------------------------------------------------------------- /t/nagios/pmp-check-mysql-processlist/check-functions.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | . ../../../nagios/bin/pmp-check-mysql-processlist 4 | 5 | echo "should print 15" 6 | max 1 5 15 11 8 7 | 8 | echo "should print 1" 9 | count_mysql_processlist "samples/locked-processlist-5.1-1.txt" \ 10 | "State" "Locked" 11 | 12 | echo "should print 2" 13 | count_mysql_processlist "samples/locked-processlist-5.5-1.txt" \ 14 | "State" "Waiting for table level lock" 15 | 16 | echo "should print 4" 17 | count_mysql_processlist "samples/copy-processlist-1.txt" \ 18 | "State" ".*opy.* to.* table.*" 19 | -------------------------------------------------------------------------------- /t/cacti/samples/memcached-001.txt: -------------------------------------------------------------------------------- 1 | STAT pid 2120 2 | STAT uptime 32314 3 | STAT time 1261775864 4 | STAT version 1.2.2 5 | STAT pointer_size 32 6 | STAT rusage_user 0.396024 7 | STAT rusage_system 1.956122 8 | STAT curr_items 0 9 | STAT total_items 0 10 | STAT bytes 0 11 | STAT curr_connections 1 12 | STAT total_connections 5 13 | STAT connection_structures 2 14 | STAT cmd_get 0 15 | STAT cmd_set 0 16 | STAT get_hits 0 17 | STAT get_misses 0 18 | STAT evictions 0 19 | STAT bytes_read 45 20 | STAT bytes_written 942 21 | STAT limit_maxbytes 67108864 22 | STAT threads 1 23 | END 24 | -------------------------------------------------------------------------------- /t/cacti/samples/proc_stat-001.txt: -------------------------------------------------------------------------------- 1 | cpu 24198 0 69614 2630536 558 5872 1572 0 0 2 | cpu0 24198 0 69614 2630536 558 5872 1572 0 0 3 | intr 339490 212 33 0 0 0 0 4 0 2 0 0 31580 112 0 31995 275552 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 | ctxt 697948 5 | btime 1261743527 6 | processes 11558 7 | procs_running 2 8 | procs_blocked 0 9 | -------------------------------------------------------------------------------- /t/cacti/samples/df-002.txt: -------------------------------------------------------------------------------- 1 | Filesystem 1024-blocks Used Available Capacity Mounted on 2 | /dev/sda6 2064208 887520 1071832 46% / 3 | tmpfs 8160308 0 8160308 0% /dev/shm 4 | /dev/sda1 253871 49432 191332 21% /boot 5 | /dev/mapper/vg00-data 52701748 44171784 5852820 89% /data 6 | /dev/mapper/vg00-server 4128448 426876 3491860 11% /server 7 | /dev/sda7 1032088 44896 934764 5% /tmp 8 | /dev/sda3 4128448 759032 3159704 20% /usr 9 | /dev/sda5 4128448 324624 3594112 9% /var 10 | /dev/mapper/vg01-data1 141077368 90639264 50438104 65% /data1 11 | -------------------------------------------------------------------------------- /t/cacti/samples/netdev-001.txt: -------------------------------------------------------------------------------- 1 | Inter-| Receive | Transmit 2 | face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed 3 | lo: 629537 5673 0 0 0 0 0 0 629537 5673 0 0 0 0 0 0 4 | eth0:99704481 202800 0 0 0 0 0 21436 21749178 120857 0 0 0 0 0 0 5 | vboxnet0: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 | tun0:41478158 41646 0 0 0 0 0 0 4429662 41920 0 0 0 0 0 0 7 | -------------------------------------------------------------------------------- /t/nagios/pmp-check-lvm-snapshots/check-functions.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | . ../../../nagios/bin/pmp-check-lvm-snapshots 4 | 5 | echo "should print nothing" 6 | check_lvm_snapshot_fullness "samples/lvs-001.txt" 20 7 | 8 | echo "should print nothing" 9 | check_lvm_snapshot_fullness "samples/lvs-002.txt" 20 10 | 11 | echo "should print nothing" 12 | check_lvm_snapshot_fullness "samples/lvs-003.txt" 30 13 | 14 | echo "should print vg2/lv2[lv1]=20.57%" 15 | check_lvm_snapshot_fullness "samples/lvs-003.txt" 20 16 | 17 | echo "should print nothing" 18 | check_lvm_snapshot_fullness "samples/lvs-004.txt" 30 19 | 20 | echo "should print CRIT LVM snapshot volumes over 20% full: vg2/lv2[lv1]=20.57%" 21 | main -c 20 "samples/lvs-003.txt" 22 | -------------------------------------------------------------------------------- /t/nagios/pmp-check-mysql-processlist/samples/locked-processlist-5.1-1.txt: -------------------------------------------------------------------------------- 1 | *************************** 1. row *************************** 2 | Id: 4 3 | User: root 4 | Host: localhost:37626 5 | db: test 6 | Command: Sleep 7 | Time: 36 8 | State: 9 | Info: NULL 10 | *************************** 2. row *************************** 11 | Id: 5 12 | User: root 13 | Host: localhost:37627 14 | db: test 15 | Command: Query 16 | Time: 27 17 | State: Locked 18 | Info: select * from t 19 | *************************** 3. row *************************** 20 | Id: 6 21 | User: root 22 | Host: localhost:37628 23 | db: test 24 | Command: Query 25 | Time: 0 26 | State: NULL 27 | Info: show full processlist 28 | -------------------------------------------------------------------------------- /t/nagios/pmp-check-mysql-replication-delay/check-functions.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | . ../../../nagios/bin/pmp-check-mysql-replication-delay 4 | 5 | echo "should print OK 10 seconds of replication delay" 6 | main samples/show-slave-status-001.txt 7 | 8 | echo "should print WARN 10 seconds of replication delay" 9 | main -w 9 samples/show-slave-status-001.txt 10 | 11 | echo "should print CRIT 10 seconds of replication delay" 12 | main -c 9 samples/show-slave-status-001.txt 13 | 14 | echo "should print UNK if the slave is not running" 15 | main samples/show-slave-status-002.txt 16 | 17 | echo "should print CRIT (delayed slave) 10 seconds of replication delay" 18 | main -m 20 -w 300 -c 600 samples/show-slave-status-001.txt 19 | 20 | echo "should print OK 10 seconds of replication delay" 21 | main -m 8 -w 300 -c 600 samples/show-slave-status-001.txt 22 | -------------------------------------------------------------------------------- /t/nagios/check_all.sh: -------------------------------------------------------------------------------- 1 | ../../nagios/bin/pmp-check-mysql-status -x Threads_connected -o / -y max_connections -T pct -w 80 -c 95 2 | ../../nagios/bin/pmp-check-mysql-status -x Threads_running -w 40 -c 100 3 | ../../nagios/bin/pmp-check-mysql-replication-delay -w 300 -c 600 4 | ../../nagios/bin/pmp-check-mysql-replication-running 5 | ../../nagios/bin/pmp-check-mysql-processlist 6 | ../../nagios/bin/pmp-check-mysql-innodb 7 | ../../nagios/bin/pmp-check-mysql-deadlocks 8 | ../../nagios/bin/pmp-check-mysql-ts-count 9 | ../../nagios/bin/pmp-check-mysql-pidfile 10 | ../../nagios/bin/pmp-check-mysql-deleted-files 11 | ../../nagios/bin/pmp-check-mysql-file-privs 12 | ../../nagios/bin/pmp-check-pt-table-checksum 13 | ../../nagios/bin/pmp-check-unix-memory 14 | ../../nagios/bin/pmp-check-lvm-snapshots 15 | for d in `find . -maxdepth 1 -type d -name "pmp-*"`; do 16 | cd $d 17 | sh check-functions.sh 18 | cd .. 19 | done 20 | -------------------------------------------------------------------------------- /docs/cacti/adding-graphs.rst: -------------------------------------------------------------------------------- 1 | .. _cacti_adding_graphs: 2 | 3 | Adding Graphs 4 | ------------- 5 | 6 | This document shows you how to add graphs to an existing template. Much of the technical background is covered in the documentation on creating graphs, so you can treat this page as a quick-reference. 7 | 8 | Here's what to do: 9 | 10 | #. Make sure there is a blueprint, so the work is identified and tracked. 11 | #. Do whatever's necessary to return the data items from the script (usually as integers, not floats, unless you're using ``GAUGE``). 12 | #. Add the data items to the magic array. 13 | #. Write tests as appropriate. 14 | #. Ensure all existing tests still pass. 15 | #. Add a new graph definition in the ``definitions/`` Perl file. 16 | #. Add the new data items to the end of the ``definitions/`` Perl file, in the input. 17 | #. Make the hashes unique. 18 | #. Test the graphs. Don't forget to upgrade the PHP script! 19 | #. Update the documentation. Add new samples and explanatory text. 20 | -------------------------------------------------------------------------------- /t/cacti/samples/diskstats-001.txt: -------------------------------------------------------------------------------- 1 | 1 0 ram0 0 0 0 0 0 0 0 0 0 0 0 2 | 1 1 ram1 0 0 0 0 0 0 0 0 0 0 0 3 | 1 2 ram2 0 0 0 0 0 0 0 0 0 0 0 4 | 1 3 ram3 0 0 0 0 0 0 0 0 0 0 0 5 | 1 4 ram4 0 0 0 0 0 0 0 0 0 0 0 6 | 1 5 ram5 0 0 0 0 0 0 0 0 0 0 0 7 | 1 6 ram6 0 0 0 0 0 0 0 0 0 0 0 8 | 1 7 ram7 0 0 0 0 0 0 0 0 0 0 0 9 | 1 8 ram8 0 0 0 0 0 0 0 0 0 0 0 10 | 1 9 ram9 0 0 0 0 0 0 0 0 0 0 0 11 | 1 10 ram10 0 0 0 0 0 0 0 0 0 0 0 12 | 1 11 ram11 0 0 0 0 0 0 0 0 0 0 0 13 | 1 12 ram12 0 0 0 0 0 0 0 0 0 0 0 14 | 1 13 ram13 0 0 0 0 0 0 0 0 0 0 0 15 | 1 14 ram14 0 0 0 0 0 0 0 0 0 0 0 16 | 1 15 ram15 0 0 0 0 0 0 0 0 0 0 0 17 | 2 0 fd0 0 0 0 0 0 0 0 0 0 0 0 18 | 3 0 hda 14583 796 322574 7260 13122 26386 316080 24448 0 14036 31708 19 | 3 1 hda1 12043 387 300113 6472 12737 21340 272616 22360 0 12368 28832 20 | 3 2 hda2 3 0 6 0 0 0 0 0 0 0 0 21 | 3 5 hda5 2510 406 22215 760 385 5046 43464 2088 0 2016 2848 22 | 22 0 hdc 0 0 0 0 0 0 0 0 0 0 0 23 | -------------------------------------------------------------------------------- /dev-docs/making-releases.rst: -------------------------------------------------------------------------------- 1 | .. _cacti_making_releases: 2 | 3 | Making Releases 4 | =============== 5 | 6 | Here's how to create a release: 7 | 8 | * Make sure the Changelog is up to date and check the issue list. 9 | * Make a note of any changes that will require special upgrade instructions. 10 | * Update the $version in the script files. 11 | * Update the version in the definitions files. 12 | * Make sure $debug, $cache_dir, $debug_log are set correctly in the script files. 13 | * run `./make.sh` in the top level. 14 | * Update the upgrade instructions. 15 | * Update each template's documentation to include any changes and update the version number of the release. 16 | 17 | In case you don't want to create PDF docs run `./make.sh nopdf` instead. 18 | 19 | Packages required for make.sh: 20 | php perl-Time-HiRes python-sphinx-doc texlive-latex 21 | 22 | Building packages 23 | ================= 24 | 25 | * Run `./build/build.sh ` 26 | 27 | Packages required for build.sh: 28 | rpm-build dpkg fakeroot php perl-Time-HiRes 29 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ⚠ Percona Monitoring Plugins is End of Life ⚠ 2 | 3 | Effective August 1, 2020, Percona moved the Percona Monitoring Plugins to end of life status. This means that open PRs and issues cannot be addressed. No new versions, enhancements, bug fixes, or security updates will be released. The software will continue to be available at our [download site](https://www.percona.com/downloads/percona-monitoring-plugins/LATEST/). 4 | 5 | Read more: 6 | 7 | **Call for Maintainers** 8 | 9 | If you are interested in continuing this project in your name/organization and would like to become its core maintainer, please contact us under info@percona.com or on our [forums](https://forums.percona.com/). 10 | 11 | --- 12 | 13 | The Percona Monitoring Plugins are high-quality components to add enterprise-grade MySQL monitoring and graphing capabilities to your existing in-house, on-premises monitoring solutions. The components are designed to integrate seamlessly with widely deployed solutions such as Nagios, Cacti and Zabbix. 14 | 15 | Project home page: http://www.percona.com/software/percona-monitoring-plugins 16 | -------------------------------------------------------------------------------- /t/cacti/misc_functions_1.php: -------------------------------------------------------------------------------- 1 | 'a1,a2'), 'a1:45 b2:90 a3:0'), 37 | 'a1:45', 38 | 'extract_desired' 39 | ); 40 | 41 | ?> 42 | -------------------------------------------------------------------------------- /docs/cacti/openvz-templates.rst: -------------------------------------------------------------------------------- 1 | .. _cacti_openvz_templates: 2 | 3 | Percona OpenVZ Monitoring Template for Cacti 4 | ============================================ 5 | 6 | These templates use ``ss_get_by_ssh.php`` to connect to a server via SSH and 7 | extract statistics from the OpenVZ container, by concatenating the contents of 8 | ``/proc/user_beancounters`` to standard output. 9 | 10 | Installation 11 | ------------ 12 | 13 | Once the SSH connection is working, import the OpenVZ template and apply 14 | it to your host, then add the graphs. 15 | 16 | Depending on your version of OpenVZ or Virtuozzo, the file 17 | ``/proc/user_beancounters`` might not be accessible to ordinary users. This 18 | means you either need to SSH as root, or use a program such as `beanc 19 | `_ to read the file. If you choose the 20 | latter approach, you should change the ``$openvz_cmd`` configuration variable. 21 | 22 | You can test one of your hosts like this. You may need to change some of the 23 | example values below, such as the cacti username and the hostname you're 24 | connecting to:: 25 | 26 | sudo -u cacti php /usr/share/cacti/scripts/ss_get_by_ssh.php --type openvz --host 127.0.0.1 --items jn,jo 27 | 28 | Sample Graphs 29 | ------------- 30 | 31 | No sample graphs are available yet. 32 | -------------------------------------------------------------------------------- /t/cacti/samples/meminfo-001.txt: -------------------------------------------------------------------------------- 1 | MemTotal: 502412 kB 2 | MemFree: 38228 kB 3 | Buffers: 20216 kB 4 | Cached: 67376 kB 5 | SwapCached: 6000 kB 6 | Active: 184416 kB 7 | Inactive: 211916 kB 8 | Active(anon): 137720 kB 9 | Inactive(anon): 171256 kB 10 | Active(file): 46696 kB 11 | Inactive(file): 40660 kB 12 | Unevictable: 0 kB 13 | Mlocked: 0 kB 14 | SwapTotal: 1015800 kB 15 | SwapFree: 738288 kB 16 | Dirty: 8 kB 17 | Writeback: 0 kB 18 | AnonPages: 303872 kB 19 | Mapped: 20980 kB 20 | Shmem: 228 kB 21 | Slab: 48128 kB 22 | SReclaimable: 24308 kB 23 | SUnreclaim: 23820 kB 24 | KernelStack: 1192 kB 25 | PageTables: 9340 kB 26 | NFS_Unstable: 0 kB 27 | Bounce: 0 kB 28 | WritebackTmp: 0 kB 29 | CommitLimit: 1267004 kB 30 | Committed_AS: 1243048 kB 31 | VmallocTotal: 34359738367 kB 32 | VmallocUsed: 8188 kB 33 | VmallocChunk: 34359719420 kB 34 | HardwareCorrupted: 0 kB 35 | AnonHugePages: 0 kB 36 | HugePages_Total: 0 37 | HugePages_Free: 0 38 | HugePages_Rsvd: 0 39 | HugePages_Surp: 0 40 | Hugepagesize: 2048 kB 41 | DirectMap4k: 8128 kB 42 | DirectMap2M: 516096 kB 43 | -------------------------------------------------------------------------------- /t/cacti/samples/meminfo-002.txt: -------------------------------------------------------------------------------- 1 | MemTotal: 8060856 kB 2 | MemFree: 721756 kB 3 | Buffers: 407352 kB 4 | Cached: 4504204 kB 5 | SwapCached: 880 kB 6 | Active: 4449164 kB 7 | Inactive: 1608056 kB 8 | Active(anon): 598308 kB 9 | Inactive(anon): 548404 kB 10 | Active(file): 3850856 kB 11 | Inactive(file): 1059652 kB 12 | Unevictable: 0 kB 13 | Mlocked: 0 kB 14 | SwapTotal: 8290300 kB 15 | SwapFree: 8279488 kB 16 | Dirty: 244 kB 17 | Writeback: 0 kB 18 | AnonPages: 1144952 kB 19 | Mapped: 45588 kB 20 | Shmem: 1044 kB 21 | Slab: 1191436 kB 22 | SReclaimable: 1100868 kB 23 | SUnreclaim: 90568 kB 24 | KernelStack: 4752 kB 25 | PageTables: 10764 kB 26 | NFS_Unstable: 0 kB 27 | Bounce: 0 kB 28 | WritebackTmp: 0 kB 29 | CommitLimit: 12320728 kB 30 | Committed_AS: 1900188 kB 31 | VmallocTotal: 34359738367 kB 32 | VmallocUsed: 27984 kB 33 | VmallocChunk: 34359707244 kB 34 | HardwareCorrupted: 0 kB 35 | AnonHugePages: 880640 kB 36 | HugePages_Total: 0 37 | HugePages_Free: 0 38 | HugePages_Rsvd: 0 39 | HugePages_Surp: 0 40 | Hugepagesize: 2048 kB 41 | DirectMap4k: 8180 kB 42 | DirectMap2M: 8380416 kB 43 | -------------------------------------------------------------------------------- /t/nagios/pmp-check-unix-memory/samples/meminfo-001.txt: -------------------------------------------------------------------------------- 1 | MemTotal: 8060856 kB 2 | MemFree: 832496 kB 3 | Buffers: 407304 kB 4 | Cached: 4453884 kB 5 | SwapCached: 1100 kB 6 | Active: 4281540 kB 7 | Inactive: 1651300 kB 8 | Active(anon): 524980 kB 9 | Inactive(anon): 547684 kB 10 | Active(file): 3756560 kB 11 | Inactive(file): 1103616 kB 12 | Unevictable: 0 kB 13 | Mlocked: 0 kB 14 | SwapTotal: 8290300 kB 15 | SwapFree: 8278580 kB 16 | Dirty: 92 kB 17 | Writeback: 0 kB 18 | AnonPages: 1070644 kB 19 | Mapped: 46244 kB 20 | Shmem: 1012 kB 21 | Slab: 1202600 kB 22 | SReclaimable: 1111744 kB 23 | SUnreclaim: 90856 kB 24 | KernelStack: 4752 kB 25 | PageTables: 10556 kB 26 | NFS_Unstable: 0 kB 27 | Bounce: 0 kB 28 | WritebackTmp: 0 kB 29 | CommitLimit: 12320728 kB 30 | Committed_AS: 1847688 kB 31 | VmallocTotal: 34359738367 kB 32 | VmallocUsed: 27984 kB 33 | VmallocChunk: 34359707244 kB 34 | HardwareCorrupted: 0 kB 35 | AnonHugePages: 712704 kB 36 | HugePages_Total: 0 37 | HugePages_Free: 0 38 | HugePages_Rsvd: 0 39 | HugePages_Surp: 0 40 | Hugepagesize: 2048 kB 41 | DirectMap4k: 8180 kB 42 | DirectMap2M: 8380416 kB 43 | -------------------------------------------------------------------------------- /t/nagios/pmp-check-unix-memory/samples/meminfo-002.txt: -------------------------------------------------------------------------------- 1 | MemTotal: 1694732 kB 2 | MemFree: 67872 kB 3 | MemAvailable: 175984 kB 4 | Buffers: 25064 kB 5 | Cached: 87880 kB 6 | SwapCached: 165652 kB 7 | Active: 1095148 kB 8 | Inactive: 468556 kB 9 | Active(anon): 1055592 kB 10 | Inactive(anon): 395228 kB 11 | Active(file): 39556 kB 12 | Inactive(file): 73328 kB 13 | Unevictable: 0 kB 14 | Mlocked: 0 kB 15 | SwapTotal: 917500 kB 16 | SwapFree: 685044 kB 17 | Dirty: 164 kB 18 | Writeback: 0 kB 19 | AnonPages: 1449844 kB 20 | Mapped: 16684 kB 21 | Shmem: 4 kB 22 | Slab: 30976 kB 23 | SReclaimable: 14704 kB 24 | SUnreclaim: 16272 kB 25 | KernelStack: 808 kB 26 | PageTables: 14844 kB 27 | NFS_Unstable: 0 kB 28 | Bounce: 0 kB 29 | WritebackTmp: 0 kB 30 | CommitLimit: 1764864 kB 31 | Committed_AS: 2466416 kB 32 | VmallocTotal: 34359738367 kB 33 | VmallocUsed: 4224 kB 34 | VmallocChunk: 34359724403 kB 35 | AnonHugePages: 0 kB 36 | HugePages_Total: 0 37 | HugePages_Free: 0 38 | HugePages_Rsvd: 0 39 | HugePages_Surp: 0 40 | Hugepagesize: 2048 kB 41 | DirectMap4k: 1748992 kB 42 | DirectMap2M: 0 kB 43 | -------------------------------------------------------------------------------- /zabbix/scripts/get_mysql_stats_wrapper.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # The wrapper for Cacti PHP script. 3 | # It runs the script every 5 min. and parses the cache file on each following run. 4 | # Version: $VERSION$ 5 | # 6 | # This program is part of $PROJECT_NAME$ 7 | # License: GPL License (see COPYING) 8 | # Copyright: $CURRENT_YEAR$ Percona 9 | # Authors: Roman Vynar 10 | 11 | ITEM=$1 12 | HOST=localhost 13 | DIR=`dirname $0` 14 | CMD="/usr/bin/php -q $DIR/ss_get_mysql_stats.php --host $HOST --items gg" 15 | CACHEFILE="/tmp/$HOST-mysql_cacti_stats.txt" 16 | 17 | if [ "$ITEM" = "running-slave" ]; then 18 | # Check for running slave 19 | RES=`HOME=~zabbix mysql -e 'SHOW SLAVE STATUS\G' | egrep '(Slave_IO_Running|Slave_SQL_Running):' | awk -F: '{print $2}' | tr '\n' ','` 20 | if [ "$RES" = " Yes, Yes," ]; then 21 | echo 1 22 | else 23 | echo 0 24 | fi 25 | exit 26 | elif [ -e $CACHEFILE ]; then 27 | # Check and run the script 28 | TIMEFLM=`stat -c %Y /tmp/$HOST-mysql_cacti_stats.txt` 29 | TIMENOW=`date +%s` 30 | if [ `expr $TIMENOW - $TIMEFLM` -gt 300 ]; then 31 | rm -f $CACHEFILE 32 | $CMD 2>&1 > /dev/null 33 | fi 34 | else 35 | $CMD 2>&1 > /dev/null 36 | fi 37 | 38 | # Parse cache file 39 | if [ -e $CACHEFILE ]; then 40 | cat $CACHEFILE | sed 's/ /\n/g; s/-1/0/g'| grep $ITEM | awk -F: '{print $2}' 41 | else 42 | echo "ERROR: run the command manually to investigate the problem: $CMD" 43 | fi 44 | -------------------------------------------------------------------------------- /docs/cacti/cacti-hashes.rst: -------------------------------------------------------------------------------- 1 | .. _cacti_cacti_hashes: 2 | 3 | Cacti Hash Identifiers 4 | ====================== 5 | 6 | Cacti generates a type of GUID identifier for each object. This has a few 7 | characters of metadata: the text ``hash_``, the object type, the Cacti version 8 | that generated the GUID, and a random string. The inclusion of the Cacti 9 | version number means that graphs aren't backwards compatible if you regenerate 10 | them on a newer version of Cacti and try to install them on an older version of 11 | Cacti. The older version will examine the version string in the hash and 12 | generate an error. 13 | 14 | To avoid this problem, this templating system generates hashes that look like this:: 15 | 16 | hash_10_VER_ac260a1434298e088f15f70cd1a5f726 17 | 18 | The template generation process replaces the ``_VER_`` constant with an 19 | appropriate value for the target version of Cacti. As an 20 | example, if you're generating for Cacti 0.8.6g, the value will look like the 21 | following:: 22 | 23 | hash_100010ac260a1434298e088f15f70cd1a5f726 24 | 25 | If you need to add support for a newer version, look for ``%hash_version_codes`` 26 | in ``pmp-cacti-template``. 27 | 28 | The hashes in the template definition ``.def`` files should be globally unique. 29 | It's difficult to generate them manually, so there is a 30 | ``pmp-cacti-make-hashes`` helper tool to make this easier. You can read more 31 | about this in the documentation on creating graphs. 32 | -------------------------------------------------------------------------------- /docs/cacti/upgrading-templates.rst: -------------------------------------------------------------------------------- 1 | .. _cacti_upgrading_templates: 2 | 3 | Upgrading Percona Monitoring Plugins for Cacti 4 | ============================================== 5 | 6 | Upgrading is normally a simple process. Before you begin, find the version of 7 | the templates and scripts that is currently installed. You can find this as a 8 | GPRINT item, as in the following screenshot: 9 | 10 | .. image:: images/mysql-cacti-templates-installed-version.png 11 | 12 | This shows that the MySQL templates installed were generated from version 1.1.4 13 | of the templates, against version 1.1.4 of the PHP script file. 14 | 15 | Check the installed scripts for their version:: 16 | 17 | # grep ^.version /path/to/ss_get_mysql_stats.php 18 | $version = "1.1.4"; 19 | 20 | To upgrade Percona Cacti scripts simply overwrite ss_get_*.php files from a new 21 | tarball or update the package:: 22 | 23 | yum update percona-cacti-templates 24 | 25 | or:: 26 | 27 | apt-get install percona-cacti-templates 28 | 29 | Afterwards, re-import templates into Cacti using the web interface or from the command line, e.g.:: 30 | 31 | php /usr/share/cacti/cli/import_template.php --filename=/usr/share/cacti/resource/percona/templates/cacti_host_template_percona_gnu_linux_server_ht_0.8.6i-sver1.0.3.xml \ 32 | --with-user-rras='1:2:3:4' 33 | 34 | Then rebuild the poller cache under Cacti -> System Utilities. 35 | 36 | If any special upgrade steps are necessary, the changelog will explain them. 37 | -------------------------------------------------------------------------------- /t/nagios/pmp-check-mysql-replication-running/check-functions.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | . ../../../nagios/bin/pmp-check-mysql-replication-running 4 | 5 | echo "should print OK Slave_IO_Running: Yes Slave_SQL_Running: Yes Last_Error:" 6 | main samples/show-slave-status-001.txt 7 | 8 | echo "should print WARN Slave_IO_Running: Connecting Slave_SQL_Running: Yes Last_Error:" 9 | main samples/show-slave-status-002.txt 10 | 11 | echo "should print WARN Slave_IO_Running: Yes Slave_SQL_Running: No Last_Error:" 12 | main samples/show-slave-status-003.txt 13 | 14 | echo "should print CRIT Slave_IO_Running: Yes Slave_SQL_Running: No Last_Error:" 15 | main -c 1 samples/show-slave-status-003.txt 16 | 17 | echo "should print OK This server is not configured as a replica." 18 | main samples/empty 19 | 20 | echo "should print WARN This server is not configured as a replica." 21 | main -w 100 samples/empty 22 | 23 | echo "should print UNK could not determine replication status" 24 | main samples/doesnt-exist 25 | 26 | echo "should print OK (delayed slave) Slave_IO_Running: Yes Slave_SQL_Running: No Last_Error:" 27 | main -d 1 samples/show-slave-status-003.txt 28 | 29 | echo "should print CRIT Slave_IO_Running: No Slave_SQL_Running: No Last_Error:" 30 | main -d 1 samples/show-slave-status-004.txt 31 | 32 | echo "should print CRIT Slave_IO_Running: Yes Slave_SQL_Running: No Last_Error: Error 'Table 'mydb.mytable' doesn't exist' on query. Default database:" 33 | main -d 1 samples/show-slave-status-005.txt 34 | -------------------------------------------------------------------------------- /t/cacti/samples/diskstats-003.txt: -------------------------------------------------------------------------------- 1 | 1 0 ram0 0 0 0 0 0 0 0 0 0 0 0 2 | 1 1 ram1 0 0 0 0 0 0 0 0 0 0 0 3 | 1 2 ram2 0 0 0 0 0 0 0 0 0 0 0 4 | 1 3 ram3 0 0 0 0 0 0 0 0 0 0 0 5 | 1 4 ram4 0 0 0 0 0 0 0 0 0 0 0 6 | 1 5 ram5 0 0 0 0 0 0 0 0 0 0 0 7 | 1 6 ram6 0 0 0 0 0 0 0 0 0 0 0 8 | 1 7 ram7 0 0 0 0 0 0 0 0 0 0 0 9 | 1 8 ram8 0 0 0 0 0 0 0 0 0 0 0 10 | 1 9 ram9 0 0 0 0 0 0 0 0 0 0 0 11 | 1 10 ram10 0 0 0 0 0 0 0 0 0 0 0 12 | 1 11 ram11 0 0 0 0 0 0 0 0 0 0 0 13 | 1 12 ram12 0 0 0 0 0 0 0 0 0 0 0 14 | 1 13 ram13 0 0 0 0 0 0 0 0 0 0 0 15 | 1 14 ram14 0 0 0 0 0 0 0 0 0 0 0 16 | 1 15 ram15 0 0 0 0 0 0 0 0 0 0 0 17 | 8 0 sda 102175206 18713828 3929110867 3209470073 465493340 2564681367 24288846800 1533388347 0 2843692667 447897904 18 | 8 1 sda1 122607 6342154 22400 44800 19 | 8 2 sda2 15425346 385290786 472909074 3783272616 20 | 8 3 sda3 125187 991545 364485 2915880 21 | 8 4 sda4 10 20 0 0 22 | 8 5 sda5 105282988 3536461938 2557511825 3322743184 23 | 8 16 sdb 9934872 3720092 634463358 22138443 11742050 46167052 439609124 1636093266 0 94564330 1658230754 24 | 8 17 sdb1 13651567 634437306 57935345 439609098 25 | 2 0 fd0 0 0 0 0 0 0 0 0 0 0 0 26 | 9 0 md0 0 0 0 0 0 0 0 0 0 0 0 27 | 253 0 dm-0 2029514 0 196439842 16755666 24753827 0 240548176 919939106 0 132836279 936697089 28 | 253 1 dm-1 103252992 0 3340021012 3195812856 2532758157 0 20262065256 3727877179 0 2312628667 2633592273 29 | -------------------------------------------------------------------------------- /t/cacti/samples/diskstats-002.txt: -------------------------------------------------------------------------------- 1 | 1 0 ram0 0 0 0 0 0 0 0 0 0 0 0 2 | 1 1 ram1 0 0 0 0 0 0 0 0 0 0 0 3 | 1 2 ram2 0 0 0 0 0 0 0 0 0 0 0 4 | 1 3 ram3 0 0 0 0 0 0 0 0 0 0 0 5 | 1 4 ram4 0 0 0 0 0 0 0 0 0 0 0 6 | 1 5 ram5 0 0 0 0 0 0 0 0 0 0 0 7 | 1 6 ram6 0 0 0 0 0 0 0 0 0 0 0 8 | 1 7 ram7 0 0 0 0 0 0 0 0 0 0 0 9 | 1 8 ram8 0 0 0 0 0 0 0 0 0 0 0 10 | 1 9 ram9 0 0 0 0 0 0 0 0 0 0 0 11 | 1 10 ram10 0 0 0 0 0 0 0 0 0 0 0 12 | 1 11 ram11 0 0 0 0 0 0 0 0 0 0 0 13 | 1 12 ram12 0 0 0 0 0 0 0 0 0 0 0 14 | 1 13 ram13 0 0 0 0 0 0 0 0 0 0 0 15 | 1 14 ram14 0 0 0 0 0 0 0 0 0 0 0 16 | 1 15 ram15 0 0 0 0 0 0 0 0 0 0 0 17 | 7 0 loop0 0 0 0 0 0 0 0 0 0 0 0 18 | 7 1 loop1 0 0 0 0 0 0 0 0 0 0 0 19 | 7 2 loop2 0 0 0 0 0 0 0 0 0 0 0 20 | 7 3 loop3 0 0 0 0 0 0 0 0 0 0 0 21 | 7 4 loop4 0 0 0 0 0 0 0 0 0 0 0 22 | 7 5 loop5 0 0 0 0 0 0 0 0 0 0 0 23 | 7 6 loop6 0 0 0 0 0 0 0 0 0 0 0 24 | 7 7 loop7 0 0 0 0 0 0 0 0 0 0 0 25 | 8 0 sda 78260 12097 1511582 746860 173916 181003 2839818 12264948 0 537108 13011620 26 | 8 1 sda1 98 2315 5913 1468 1 0 2 0 0 956 1468 27 | 8 2 sda2 38 171 1672 672 0 0 0 0 0 500 672 28 | 8 3 sda3 47538 6250 917013 373568 22972 17170 321144 183452 0 219332 556972 29 | 8 4 sda4 30566 3341 586664 370308 150943 163833 2518672 12081496 0 347416 12451664 30 | 11 0 sr0 0 0 0 0 0 0 0 0 0 0 0 31 | -------------------------------------------------------------------------------- /t/nagios/pmp-check-mysql-replication-running/samples/show-slave-status-005.txt: -------------------------------------------------------------------------------- 1 | *************************** 1. row *************************** 2 | Slave_IO_State: Waiting for master to send event 3 | Master_Host: 1.2.3.4 4 | Master_User: replica 5 | Master_Port: 3306 6 | Connect_Retry: 60 7 | Master_Log_File: mysql-bin.001079 8 | Read_Master_Log_Pos: 269214454 9 | Relay_Log_File: slave-relay.000130 10 | Relay_Log_Pos: 100125935 11 | Relay_Master_Log_File: mysql-bin.001079 12 | Slave_IO_Running: Yes 13 | Slave_SQL_Running: No 14 | Replicate_Do_DB: mydb 15 | Replicate_Ignore_DB: 16 | Replicate_Do_Table: 17 | Replicate_Ignore_Table: 18 | Replicate_Wild_Do_Table: 19 | Replicate_Wild_Ignore_Table: 20 | Last_Errno: 1146 21 | Last_Error: Error 'Table 'mydb.mytable' doesn't exist' on query. Default database: 'mydb'. 22 | Query: 'UPDATE thread AS thread,mytable AS aggregate 23 | SET thread.views = thread.views + aggregate.views 24 | WHERE thread.threadid = aggregate.threadid' 25 | Skip_Counter: 0 26 | Exec_Master_Log_Pos: 203015142 27 | Relay_Log_Space: 166325247 28 | Until_Condition: None 29 | Until_Log_File: 30 | Until_Log_Pos: 0 31 | Master_SSL_Allowed: No 32 | Master_SSL_CA_File: 33 | Master_SSL_CA_Path: 34 | Master_SSL_Cert: 35 | Master_SSL_Cipher: 36 | Master_SSL_Key: 37 | Seconds_Behind_Master: NULL 38 | -------------------------------------------------------------------------------- /docs/cacti/mongodb-templates.rst: -------------------------------------------------------------------------------- 1 | .. _cacti_mongodb_templates: 2 | 3 | Percona MongoDB Monitoring Template for Cacti 4 | ============================================= 5 | 6 | These templates use ``ss_get_by_ssh.php`` to connect to a server via SSH and 7 | extract statistics from the MongoDB server running there, by executing the 8 | ``serverStatus`` admin command from the MongoDB shell. This means that the 9 | ``mongo`` CLI needs to be in ``$PATH`` and you must be running version 1.2 or 10 | newer of MongoDB. 11 | 12 | Installation 13 | ------------ 14 | 15 | Once the SSH connection is working, confirm that you can login to 16 | MongoDB from with the "mongo" cli tool. From this tool, confirm that the 17 | ``serverStatus`` command is present by running:: 18 | 19 | db._adminCommand({serverStatus : 1}); 20 | 21 | This should produce quite a bit of output. With all of this confirmed, test one 22 | of your hosts with the command below. You may need to change some of the example 23 | values below, such as the cacti username and the hostname you're connecting to:: 24 | 25 | sudo -u cacti php /usr/share/cacti/scripts/ss_get_by_ssh.php --type mongodb --host 127.0.0.1 --items mk,ml 26 | 27 | Sample Graphs 28 | ------------- 29 | 30 | The following sample graphs demonstrate how the data is presented. 31 | 32 | .. image:: images/mongodb_background_flushes.png 33 | 34 | Background flushes 35 | 36 | .. image:: images/mongodb_commands.png 37 | 38 | Commands 39 | 40 | .. image:: images/mongodb_connections.png 41 | 42 | Connections 43 | 44 | .. image:: images/mongodb_index_ops.png 45 | 46 | Index Operations 47 | 48 | .. image:: images/mongodb_memory.png 49 | 50 | Memory 51 | -------------------------------------------------------------------------------- /docs/cacti/redis-templates.rst: -------------------------------------------------------------------------------- 1 | .. _cacti_redis_templates: 2 | 3 | Percona Redis Monitoring Template for Cacti 4 | =========================================== 5 | 6 | These templates use ``ss_get_by_ssh.php`` to connect to a server and extract 7 | statistics from the Redis server with the `INFO command 8 | `_. The templates *do not use 9 | SSH*, but connect directly with TCP sockets to gather the information. 10 | 11 | Installation 12 | ------------ 13 | 14 | Import the Redis template and apply it to your host, then add the graphs. 15 | 16 | You can test one of your hosts like this. You may need to change some of the 17 | example values below, such as the cacti username and the hostname you're 18 | connecting to:: 19 | 20 | sudo -u cacti php /usr/share/cacti/scripts/ss_get_by_ssh.php --type redis --host 127.0.0.1 --items ln,lo 21 | 22 | Sample Graphs 23 | ------------- 24 | 25 | The following sample graphs demonstrate how the data is presented. 26 | 27 | .. image:: images/Redis_Commands.png 28 | 29 | Shows commands to the Redis server. 30 | 31 | .. image:: images/Redis_Connections.png 32 | 33 | Shows connections to the Redis server. 34 | The top two items are *current* connections at the time the poller sampled 35 | the data; the bottom line, Total Connections, is the number of new 36 | connections created per second during the polling interval. That's the 37 | important number to watch, and despite the name it should not be equal to the 38 | sum of the first two lines! 39 | 40 | .. image:: images/Redis_Memory.png 41 | 42 | Shows memory usage. 43 | 44 | .. image:: images/Redis_Unsaved_Changes.png 45 | 46 | Shows unsaved changes. 47 | -------------------------------------------------------------------------------- /docs/cacti/nginx-templates.rst: -------------------------------------------------------------------------------- 1 | .. _cacti_nginx_templates: 2 | 3 | Percona Nginx Monitoring Template for Cacti 4 | =========================================== 5 | 6 | These templates use ``ss_get_by_ssh.php`` to connect to a server via SSH and 7 | extract statistics from the Nginx server running there, by executing the 8 | ``wget`` program with the url ``/server-status``. 9 | 10 | Installation 11 | ------------ 12 | 13 | Once the SSH connection is working, configure Nginx to report its 14 | status. You can add the following to any server context and restart Nginx:: 15 | 16 | location /server-status { 17 | stub_status on; 18 | allow 127.0.0.1 19 | # deny all; 20 | } 21 | 22 | If you decide to use a different URL, you'll have to configure that in the 23 | script configuration (covered in the general install guide) or pass a 24 | command-line option (also covered in the general install guide). 25 | 26 | Finally, test one of your hosts like this. You may need to change some of the 27 | example values below, such as the cacti username and the hostname you're 28 | connecting to:: 29 | 30 | sudo -u cacti php /usr/share/cacti/scripts/ss_get_by_ssh.php --type nginx --host 127.0.0.1 --items hw,hx 31 | 32 | Sample Graphs 33 | ------------- 34 | 35 | The following sample graphs demonstrate how the data is presented. 36 | 37 | .. image:: images/nginx_accepts_handled.png 38 | 39 | The number of connections the server accepted and handled. 40 | 41 | .. image:: images/nginx_requests.png 42 | 43 | The number of requests the Nginx server received. 44 | 45 | .. image:: images/nginx_scoreboard.png 46 | 47 | The number of connections to the Nginx server in various states. 48 | -------------------------------------------------------------------------------- /t/cacti/samples/redis-002.txt: -------------------------------------------------------------------------------- 1 | $1466 2 | # Server 3 | redis_version:2.6.14 4 | redis_git_sha1:00000000 5 | redis_git_dirty:0 6 | redis_mode:standalone 7 | os:Linux 3.4.43-43.43.amzn1.x86_64 x86_64 8 | arch_bits:64 9 | multiplexing_api:epoll 10 | gcc_version:4.6.3 11 | process_id:24297 12 | run_id:011fa23949ad763d81844453968ca7a5621296d3 13 | tcp_port:6379 14 | uptime_in_seconds:10183 15 | uptime_in_days:0 16 | hz:10 17 | lru_clock:1059890 18 | 19 | # Clients 20 | connected_clients:1 21 | client_longest_output_list:0 22 | client_biggest_input_buf:0 23 | blocked_clients:0 24 | 25 | # Memory 26 | used_memory:856928 27 | used_memory_human:836.84K 28 | used_memory_rss:2125824 29 | used_memory_peak:798360 30 | used_memory_peak_human:779.65K 31 | used_memory_lua:31744 32 | mem_fragmentation_ratio:2.48 33 | mem_allocator:jemalloc-3.2.0 34 | 35 | # Persistence 36 | loading:0 37 | rdb_changes_since_last_save:88 38 | rdb_bgsave_in_progress:0 39 | rdb_last_save_time:1373737522 40 | rdb_last_bgsave_status:ok 41 | rdb_last_bgsave_time_sec:-1 42 | rdb_current_bgsave_time_sec:-1 43 | aof_enabled:0 44 | aof_rewrite_in_progress:0 45 | aof_rewrite_scheduled:0 46 | aof_last_rewrite_time_sec:-1 47 | aof_current_rewrite_time_sec:-1 48 | aof_last_bgrewrite_status:ok 49 | 50 | # Stats 51 | total_connections_received:4 52 | total_commands_processed:3 53 | instantaneous_ops_per_sec:0 54 | rejected_connections:0 55 | expired_keys:0 56 | evicted_keys:0 57 | keyspace_hits:0 58 | keyspace_misses:0 59 | pubsub_channels:0 60 | pubsub_patterns:0 61 | latest_fork_usec:0 62 | 63 | # Replication 64 | role:master 65 | connected_slaves:1 66 | 67 | # CPU 68 | used_cpu_sys:3.12 69 | used_cpu_user:1.04 70 | used_cpu_sys_children:0.00 71 | used_cpu_user_children:0.00 72 | 73 | # Keyspace 74 | 75 | -------------------------------------------------------------------------------- /t/nagios/pmp-check-mysql-replication-delay/samples/show-slave-status-001.txt: -------------------------------------------------------------------------------- 1 | *************************** 1. row *************************** 2 | Slave_IO_State: Waiting for master to send event 3 | Master_Host: master.db 4 | Master_User: replication 5 | Master_Port: 3306 6 | Connect_Retry: 60 7 | Master_Log_File: mysql-bin.000545 8 | Read_Master_Log_Pos: 521709851 9 | Relay_Log_File: mysql-relay.001273 10 | Relay_Log_Pos: 4871334 11 | Relay_Master_Log_File: mysql-bin.000545 12 | Slave_IO_Running: Yes 13 | Slave_SQL_Running: Yes 14 | Replicate_Do_DB: 15 | Replicate_Ignore_DB: 16 | Replicate_Do_Table: 17 | Replicate_Ignore_Table: 18 | Replicate_Wild_Do_Table: 19 | Replicate_Wild_Ignore_Table: 20 | Last_Errno: 0 21 | Last_Error: 22 | Skip_Counter: 0 23 | Exec_Master_Log_Pos: 521709851 24 | Relay_Log_Space: 4871528 25 | Until_Condition: None 26 | Until_Log_File: 27 | Until_Log_Pos: 0 28 | Master_SSL_Allowed: Yes 29 | Master_SSL_CA_File: /mnt/data-store/mysql/ca-cert.pem 30 | Master_SSL_CA_Path: 31 | Master_SSL_Cert: /mnt/data-store/mysql/client-cert.pem 32 | Master_SSL_Cipher: 33 | Master_SSL_Key: /mnt/data-store/mysql/client-key.pem 34 | Seconds_Behind_Master: 10 35 | Master_SSL_Verify_Server_Cert: No 36 | Last_IO_Errno: 0 37 | Last_IO_Error: 38 | Last_SQL_Errno: 0 39 | Last_SQL_Error: 40 | -------------------------------------------------------------------------------- /t/nagios/pmp-check-mysql-replication-delay/samples/show-slave-status-002.txt: -------------------------------------------------------------------------------- 1 | *************************** 1. row *************************** 2 | Slave_IO_State: Waiting for master to send event 3 | Master_Host: master.db 4 | Master_User: replication 5 | Master_Port: 3306 6 | Connect_Retry: 60 7 | Master_Log_File: mysql-bin.000545 8 | Read_Master_Log_Pos: 521709851 9 | Relay_Log_File: mysql-relay.001273 10 | Relay_Log_Pos: 4871334 11 | Relay_Master_Log_File: mysql-bin.000545 12 | Slave_IO_Running: Yes 13 | Slave_SQL_Running: Yes 14 | Replicate_Do_DB: 15 | Replicate_Ignore_DB: 16 | Replicate_Do_Table: 17 | Replicate_Ignore_Table: 18 | Replicate_Wild_Do_Table: 19 | Replicate_Wild_Ignore_Table: 20 | Last_Errno: 0 21 | Last_Error: 22 | Skip_Counter: 0 23 | Exec_Master_Log_Pos: 521709851 24 | Relay_Log_Space: 4871528 25 | Until_Condition: None 26 | Until_Log_File: 27 | Until_Log_Pos: 0 28 | Master_SSL_Allowed: Yes 29 | Master_SSL_CA_File: /mnt/data-store/mysql/ca-cert.pem 30 | Master_SSL_CA_Path: 31 | Master_SSL_Cert: /mnt/data-store/mysql/client-cert.pem 32 | Master_SSL_Cipher: 33 | Master_SSL_Key: /mnt/data-store/mysql/client-key.pem 34 | Seconds_Behind_Master: NULL 35 | Master_SSL_Verify_Server_Cert: No 36 | Last_IO_Errno: 0 37 | Last_IO_Error: 38 | Last_SQL_Errno: 0 39 | Last_SQL_Error: 40 | -------------------------------------------------------------------------------- /t/nagios/pmp-check-mysql-replication-running/samples/show-slave-status-001.txt: -------------------------------------------------------------------------------- 1 | *************************** 1. row *************************** 2 | Slave_IO_State: Waiting for master to send event 3 | Master_Host: master.db 4 | Master_User: replication 5 | Master_Port: 3306 6 | Connect_Retry: 60 7 | Master_Log_File: mysql-bin.000545 8 | Read_Master_Log_Pos: 521709851 9 | Relay_Log_File: mysql-relay.001273 10 | Relay_Log_Pos: 4871334 11 | Relay_Master_Log_File: mysql-bin.000545 12 | Slave_IO_Running: Yes 13 | Slave_SQL_Running: Yes 14 | Replicate_Do_DB: 15 | Replicate_Ignore_DB: 16 | Replicate_Do_Table: 17 | Replicate_Ignore_Table: 18 | Replicate_Wild_Do_Table: 19 | Replicate_Wild_Ignore_Table: 20 | Last_Errno: 0 21 | Last_Error: 22 | Skip_Counter: 0 23 | Exec_Master_Log_Pos: 521709851 24 | Relay_Log_Space: 4871528 25 | Until_Condition: None 26 | Until_Log_File: 27 | Until_Log_Pos: 0 28 | Master_SSL_Allowed: Yes 29 | Master_SSL_CA_File: /mnt/data-store/mysql/ca-cert.pem 30 | Master_SSL_CA_Path: 31 | Master_SSL_Cert: /mnt/data-store/mysql/client-cert.pem 32 | Master_SSL_Cipher: 33 | Master_SSL_Key: /mnt/data-store/mysql/client-key.pem 34 | Seconds_Behind_Master: 0 35 | Master_SSL_Verify_Server_Cert: No 36 | Last_IO_Errno: 0 37 | Last_IO_Error: 38 | Last_SQL_Errno: 0 39 | Last_SQL_Error: 40 | -------------------------------------------------------------------------------- /t/nagios/pmp-check-mysql-replication-running/samples/show-slave-status-003.txt: -------------------------------------------------------------------------------- 1 | *************************** 1. row *************************** 2 | Slave_IO_State: Waiting for master to send event 3 | Master_Host: master.db 4 | Master_User: replication 5 | Master_Port: 3306 6 | Connect_Retry: 60 7 | Master_Log_File: mysql-bin.000545 8 | Read_Master_Log_Pos: 521709851 9 | Relay_Log_File: mysql-relay.001273 10 | Relay_Log_Pos: 4871334 11 | Relay_Master_Log_File: mysql-bin.000545 12 | Slave_IO_Running: Yes 13 | Slave_SQL_Running: No 14 | Replicate_Do_DB: 15 | Replicate_Ignore_DB: 16 | Replicate_Do_Table: 17 | Replicate_Ignore_Table: 18 | Replicate_Wild_Do_Table: 19 | Replicate_Wild_Ignore_Table: 20 | Last_Errno: 0 21 | Last_Error: 22 | Skip_Counter: 0 23 | Exec_Master_Log_Pos: 521709851 24 | Relay_Log_Space: 4871528 25 | Until_Condition: None 26 | Until_Log_File: 27 | Until_Log_Pos: 0 28 | Master_SSL_Allowed: Yes 29 | Master_SSL_CA_File: /mnt/data-store/mysql/ca-cert.pem 30 | Master_SSL_CA_Path: 31 | Master_SSL_Cert: /mnt/data-store/mysql/client-cert.pem 32 | Master_SSL_Cipher: 33 | Master_SSL_Key: /mnt/data-store/mysql/client-key.pem 34 | Seconds_Behind_Master: 0 35 | Master_SSL_Verify_Server_Cert: No 36 | Last_IO_Errno: 0 37 | Last_IO_Error: 38 | Last_SQL_Errno: 0 39 | Last_SQL_Error: 40 | -------------------------------------------------------------------------------- /t/nagios/pmp-check-mysql-replication-running/samples/show-slave-status-002.txt: -------------------------------------------------------------------------------- 1 | *************************** 1. row *************************** 2 | Slave_IO_State: Waiting for master to send event 3 | Master_Host: master.db 4 | Master_User: replication 5 | Master_Port: 3306 6 | Connect_Retry: 60 7 | Master_Log_File: mysql-bin.000545 8 | Read_Master_Log_Pos: 521709851 9 | Relay_Log_File: mysql-relay.001273 10 | Relay_Log_Pos: 4871334 11 | Relay_Master_Log_File: mysql-bin.000545 12 | Slave_IO_Running: Connecting 13 | Slave_SQL_Running: Yes 14 | Replicate_Do_DB: 15 | Replicate_Ignore_DB: 16 | Replicate_Do_Table: 17 | Replicate_Ignore_Table: 18 | Replicate_Wild_Do_Table: 19 | Replicate_Wild_Ignore_Table: 20 | Last_Errno: 0 21 | Last_Error: 22 | Skip_Counter: 0 23 | Exec_Master_Log_Pos: 521709851 24 | Relay_Log_Space: 4871528 25 | Until_Condition: None 26 | Until_Log_File: 27 | Until_Log_Pos: 0 28 | Master_SSL_Allowed: Yes 29 | Master_SSL_CA_File: /mnt/data-store/mysql/ca-cert.pem 30 | Master_SSL_CA_Path: 31 | Master_SSL_Cert: /mnt/data-store/mysql/client-cert.pem 32 | Master_SSL_Cipher: 33 | Master_SSL_Key: /mnt/data-store/mysql/client-key.pem 34 | Seconds_Behind_Master: 0 35 | Master_SSL_Verify_Server_Cert: No 36 | Last_IO_Errno: 0 37 | Last_IO_Error: 38 | Last_SQL_Errno: 0 39 | Last_SQL_Error: 40 | -------------------------------------------------------------------------------- /t/nagios/pmp-check-mysql-status/check-functions.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | . ../../../nagios/bin/pmp-check-mysql-status 4 | 5 | printf "should print 1: " 6 | compute_result samples/status-variables-001.txt Threads_running 7 | 8 | printf "should print 0.150531: " 9 | compute_result samples/status-variables-001.txt Bytes_received / Bytes_sent 10 | 11 | printf "should print 15.053114: " 12 | compute_result samples/status-variables-001.txt Bytes_received / Bytes_sent pct 13 | 14 | printf "should exit 0: " 15 | compare_result 15 20 30 '>=' 16 | echo $? 17 | 18 | printf "should exit 1: " 19 | compare_result 15 20 15 '>=' 20 | echo $? 21 | 22 | printf "should exit 0: " 23 | compare_result 15 20 15 '>' 24 | echo $? 25 | 26 | printf "should exit 2: " 27 | compare_result 15 15 10 '>=' 28 | echo $? 29 | 30 | printf "should exit 0: " 31 | compare_result 15 "" "" '>=' 32 | echo $? 33 | 34 | printf "should exit 0: " 35 | compare_result 15 "20" "" '>=' 36 | echo $? 37 | 38 | printf "should exit 0: " 39 | compare_result 15 "" "20" '>=' 40 | echo $? 41 | 42 | printf "should exit 1: " 43 | compare_result 2 "" 4 '!=' 44 | echo $? 45 | 46 | printf "should exit 0: " 47 | compare_result 4 "" 4 '!=' 48 | echo $? 49 | 50 | printf "should exit 1: " 51 | compare_result 4 "" 4 '==' 52 | echo $? 53 | 54 | printf "should exit 2: " 55 | compare_result STRICT IDEMPOTENT "" '==' 56 | echo $? 57 | 58 | printf "should exit 0: " 59 | compare_result STRICT IDEMPOTENT "" '==' str 60 | echo $? 61 | 62 | printf "should exit 1: " 63 | compare_result STRICT "" STRICT '==' str 64 | echo $? 65 | 66 | printf "should exit 0: " 67 | compare_result STRICT STRICT "" '!=' str 68 | echo $? 69 | 70 | printf "should exit 0: " 71 | compare_result 5 20 "" '>=' 72 | echo $? 73 | 74 | printf "should exit 2: " 75 | compare_result 5 20 "" '>=' str 76 | echo $? 77 | 78 | -------------------------------------------------------------------------------- /cacti/bin/pmp-cacti-make-hashes: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | # This is a script that uniqueifies hashes in a file. When given the --refresh 4 | # option it will replace every hash with a new one. 5 | # 6 | # This program is copyright (c) 2008 Baron Schwartz. Feedback and improvements 7 | # are welcome. 8 | # 9 | # THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED 10 | # WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 11 | # MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12 | # 13 | # This program is free software; you can redistribute it and/or modify it under 14 | # the terms of the GNU General Public License as published by the Free Software 15 | # Foundation, version 2. 16 | # 17 | # You should have received a copy of the GNU General Public License along with 18 | # this program; if not, write to the Free Software Foundation, Inc., 59 Temple 19 | # Place, Suite 330, Boston, MA 02111-1307 USA. 20 | 21 | use strict; 22 | use warnings FATAL => 'all'; 23 | 24 | use English qw(-no_match_vars); 25 | use Digest::MD5 qw(md5_hex); 26 | use Time::HiRes qw(gettimeofday); 27 | 28 | my %seen; 29 | 30 | my $hash_pat = qr/_VER_([a-fA-F0-9]+)/; 31 | 32 | my $refresh; 33 | if ( @ARGV && $ARGV[0] eq '--refresh' ) { 34 | shift @ARGV; 35 | $refresh = 1; 36 | } 37 | 38 | while ( my $line = <> ) { 39 | my ( $hash ) = $line =~ m/$hash_pat/g; 40 | if ( $hash ) { 41 | die "hash $hash isn't the right length" unless length($hash) == 32; 42 | if ( $refresh || $seen{$hash}++ ) { 43 | my $new = md5_hex('abcd' . gettimeofday() . rand()); 44 | while ( $seen{$new} ) { 45 | $new = md5_hex('abcd' . gettimeofday() . rand()); 46 | } 47 | $seen{$new}++; 48 | $line =~ s/$hash/$new/; 49 | } 50 | } 51 | print $line; 52 | } 53 | -------------------------------------------------------------------------------- /t/nagios/pmp-check-mysql-replication-running/samples/show-slave-status-004.txt: -------------------------------------------------------------------------------- 1 | *************************** 1. row *************************** 2 | Slave_IO_State: 3 | Master_Host: 1.2.3.4 4 | Master_User: replica 5 | Master_Port: 3306 6 | Connect_Retry: 60 7 | Master_Log_File: mysql-bin.030382 8 | Read_Master_Log_Pos: 252330903 9 | Relay_Log_File: mysqld-relay-bin.017800 10 | Relay_Log_Pos: 833254426 11 | Relay_Master_Log_File: mysql-bin.030209 12 | Slave_IO_Running: No 13 | Slave_SQL_Running: No 14 | Replicate_Do_DB: 15 | Replicate_Ignore_DB: 16 | Replicate_Do_Table: 17 | Replicate_Ignore_Table: 18 | Replicate_Wild_Do_Table: 19 | Replicate_Wild_Ignore_Table: 20 | Last_Errno: 0 21 | Last_Error: 22 | Skip_Counter: 0 23 | Exec_Master_Log_Pos: 833254272 24 | Relay_Log_Space: 188541562295 25 | Until_Condition: None 26 | Until_Log_File: 27 | Until_Log_Pos: 0 28 | Master_SSL_Allowed: No 29 | Master_SSL_CA_File: 30 | Master_SSL_CA_Path: 31 | Master_SSL_Cert: 32 | Master_SSL_Cipher: 33 | Master_SSL_Key: 34 | Seconds_Behind_Master: NULL 35 | Master_SSL_Verify_Server_Cert: No 36 | Last_IO_Errno: 1236 37 | Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'Could not find first log file name in binary log index file' 38 | Last_SQL_Errno: 0 39 | Last_SQL_Error: 40 | Replicate_Ignore_Server_Ids: 41 | Master_Server_Id: 11 42 | -------------------------------------------------------------------------------- /t/nagios/pmp-check-mysql-processlist/samples/locked-processlist-5.5-1.txt: -------------------------------------------------------------------------------- 1 | *************************** 1. row *************************** 2 | Id: 77 3 | User: root 4 | Host: localhost:62439 5 | db: test 6 | Command: Query 7 | Time: 480 8 | State: Waiting for table level lock 9 | Info: select * from test.t 10 | Rows_sent: 0 11 | Rows_examined: 0 12 | Rows_read: 1 13 | *************************** 2. row *************************** 14 | Id: 78 15 | User: root 16 | Host: localhost:62441 17 | db: NULL 18 | Command: Query 19 | Time: 403 20 | State: Waiting for table level lock 21 | Info: update test.t set a=sleep(500) 22 | Rows_sent: 0 23 | Rows_examined: 0 24 | Rows_read: 1 25 | *************************** 3. row *************************** 26 | Id: 79 27 | User: root 28 | Host: localhost:62444 29 | db: NULL 30 | Command: Sleep 31 | Time: 399 32 | State: 33 | Info: NULL 34 | Rows_sent: 0 35 | Rows_examined: 0 36 | Rows_read: 2 37 | *************************** 4. row *************************** 38 | Id: 80 39 | User: root 40 | Host: localhost:62447 41 | db: test 42 | Command: Query 43 | Time: 493 44 | State: User sleep 45 | Info: update t set a=sleep(5000) 46 | Rows_sent: 0 47 | Rows_examined: 1 48 | Rows_read: 1 49 | *************************** 5. row *************************** 50 | Id: 85 51 | User: root 52 | Host: localhost:62484 53 | db: NULL 54 | Command: Query 55 | Time: 0 56 | State: NULL 57 | Info: show full processlist 58 | Rows_sent: 0 59 | Rows_examined: 0 60 | Rows_read: 1 61 | -------------------------------------------------------------------------------- /docs/cacti/apache-templates.rst: -------------------------------------------------------------------------------- 1 | .. _cacti_apache_graphs: 2 | 3 | Percona Apache Monitoring Template for Cacti 4 | ============================================ 5 | 6 | These templates use ``ss_get_by_ssh.php`` to connect to a server via SSH and 7 | extract statistics from the Apache server running there, by executing the 8 | ``wget`` program with the url ``/server-status``. 9 | 10 | Installation 11 | ------------ 12 | 13 | Once the SSH connection is working, `configure Apache to report its 14 | status `_. The typical 15 | setup is to enable status for 127.0.0.1 at the URL ``/server-status``. If you 16 | decide to use a different URL, you'll have to configure that in the script 17 | configuration (covered in the general install guide) or pass a command-line 18 | option (also covered in the general install guide). 19 | 20 | Be sure to configure Apache with the ``ExtendedStatus On`` directive so you get 21 | full status. 22 | 23 | Finally, test one of your hosts like this. You may need to change some of the 24 | example values below, such as the cacti username and the hostname you're 25 | connecting to:: 26 | 27 | sudo -u cacti php /usr/share/cacti/scripts/ss_get_by_ssh.php --type apache --host 127.0.0.1 --items gg,gh 28 | 29 | Sample Graphs 30 | ------------- 31 | 32 | The following sample graphs demonstrate how the data is presented. 33 | 34 | .. image:: images/apache_bytes.png 35 | 36 | The number of bytes sent by Apache. 37 | 38 | .. image:: images/apache_cpu_load.png 39 | 40 | Apache's CPU usage. 41 | 42 | .. image:: images/apache_requests.png 43 | 44 | The number of requests that Apache has handled. 45 | 46 | .. image:: images/apache_scoreboard.png 47 | 48 | The number of Apache processes in each of a variety of statuses. 49 | 50 | .. image:: images/apache_workers.png 51 | 52 | The number of worker processes busy or idle at any given time. 53 | -------------------------------------------------------------------------------- /docs/cacti/index.rst: -------------------------------------------------------------------------------- 1 | .. _cacti_overview: 2 | 3 | Percona Monitoring Plugins for Cacti 4 | ==================================== 5 | 6 | Many Cacti templates you'll find online are often poor quality and have many 7 | problems. Cacti's design can also cause inefficiency if you don't know how to 8 | use it correctly, and most templates don't avoid those inefficiencies. The 9 | Percona's Cacti templates alleviate these problems, which are common in other 10 | templates: 11 | 12 | * No duplicated data in RRD files. 13 | * No unused data in RRD files. 14 | * No wasted polling for the same data, which can cause timeouts and increased load 15 | 16 | These templates offer the following improvements: 17 | 18 | * Versioning and backwards compatibility. 19 | * Good documentation. 20 | * Much more data is collected and graphed than you'll typically find. 21 | * Graphs have attractive colors and consistent formatting. Metrics are printed as well as graphed, so you can read the numbers as well as look at the picture. 22 | * Support for the newest versions of MySQL and InnoDB. 23 | * Integration with other Percona software, such as Percona Server and Percona Toolkit. 24 | * Easy to install and configure. 25 | * Easy and safe to upgrade, with support for a configuration file so you can upgrade the scripts without losing your configuration. 26 | * Debugging features to help find and solve problems. 27 | * Templates don't conflict with your existing Cacti installation; they don't use anything pre-defined in Cacti. That means you can import them without fear of overwriting your customized settings. 28 | * Real software engineering! There is a test suite, to keep the code high quality. 29 | 30 | In addition, the software supports a much easier way to generate graphs and 31 | templates than you will find elsewhere, so you can create your own custom graphs 32 | of anything you desire. If you need help with this, Percona can also assist 33 | with that. 34 | -------------------------------------------------------------------------------- /zabbix/triggers/mysql.yml: -------------------------------------------------------------------------------- 1 | # Zabbix triggers for MySQL 2 | # 3 | # License: GPL License (see COPYING) 4 | # Copyright: 2013 Percona 5 | # Authors: Roman Vynar 6 | 7 | # MySQL process 8 | - name: MySQL is down on {HOST.NAME} 9 | expression: '{TEMPLATE:proc.num[mysqld].last(0)}=0' 10 | severity: Disaster 11 | 12 | # MySQL connections 13 | - name: MySQL connections utilization more than 80% on {HOST.NAME} 14 | expression: '{TEMPLATE:MySQL.Threads-connected.last(0)}/{TEMPLATE:MySQL.max-connections.last(0)}>0.8' 15 | severity: Average 16 | dependencies: ['MySQL connections utilization more than 95% on {HOST.NAME}'] 17 | - name: MySQL connections utilization more than 95% on {HOST.NAME} 18 | expression: '{TEMPLATE:MySQL.Threads-connected.last(0)}/{TEMPLATE:MySQL.max-connections.last(0)}>0.95' 19 | severity: High 20 | dependencies: ['MySQL is down on {HOST.NAME}'] 21 | 22 | # MySQL active threads 23 | - name: MySQL active threads more than 40 on {HOST.NAME} 24 | expression: '{TEMPLATE:MySQL.Threads-running.last(0)}>40' 25 | severity: Average 26 | dependencies: ['MySQL active threads more than 100 on {HOST.NAME}'] 27 | - name: MySQL active threads more than 100 on {HOST.NAME} 28 | expression: '{TEMPLATE:MySQL.Threads-running.last(0)}>100' 29 | severity: High 30 | dependencies: ['MySQL is down on {HOST.NAME}'] 31 | 32 | # MySQL replication 33 | - name: MySQL slave lag more than 300 on {HOST.NAME} 34 | expression: '{TEMPLATE:MySQL.slave-lag.last(0)}>300' 35 | severity: Average 36 | dependencies: ['MySQL slave lag more than 600 on {HOST.NAME}'] 37 | - name: MySQL slave lag more than 600 on {HOST.NAME} 38 | expression: '{TEMPLATE:MySQL.slave-lag.last(0)}>600' 39 | severity: High 40 | dependencies: ['Slave is stopped on {HOST.NAME}'] 41 | - name: Slave is stopped on {HOST.NAME} 42 | expression: '{TEMPLATE:MySQL.running-slave.last(0)}=0' 43 | severity: High 44 | dependencies: ['MySQL is down on {HOST.NAME}'] 45 | -------------------------------------------------------------------------------- /util/pod2rst: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | 3 | use strict; 4 | use warnings FATAL => 'all'; 5 | 6 | use English qw(-no_match_vars); 7 | 8 | my %headings = ( 9 | '1' => '=', 10 | '2' => '-', 11 | ); 12 | my $list = 0; 13 | my $marker = ""; 14 | 15 | # Skip up until the documentation starts. 16 | while(<>) { 17 | last if m/^=pod/; 18 | } 19 | 20 | # Read a para at a time 21 | $RS = ""; 22 | 23 | LINE: 24 | while (<>) { 25 | my $line = $_; 26 | chomp $line; 27 | 28 | if ( $line eq '=cut' ) { 29 | last LINE; 30 | } 31 | 32 | # Take care of inline stylings. 33 | $line =~ s/C<(.*?)>/``$1``/gs; 34 | 35 | # Escape special characters that aren't at the beginning of a line. 36 | $line =~ s/(? db._adminCommand({serverStatus:1}) 6 | { 7 | "uptime" : 288777, 8 | "localTime" : "Mon Mar 29 2010 20:41:27 GMT-0700 (PDT)", 9 | "globalLock" : { 10 | "totalTime" : 288777173126, 11 | "lockTime" : 1366671934, 12 | "ratio" : 0.0047326176068760465 13 | }, 14 | "mem" : { 15 | "resident" : 15287, 16 | "virtual" : 62425, 17 | "supported" : true, 18 | "mapped" : 61971 19 | }, 20 | "connections" : { 21 | "current" : 3, 22 | "available" : 19997 23 | }, 24 | "extra_info" : { 25 | "note" : "fields vary by platform", 26 | "heap_usage_bytes" : 3050496, 27 | "page_faults" : 11759 28 | }, 29 | "indexCounters" : { 30 | "btree" : { 31 | "accesses" : 1589814, 32 | "hits" : 1589814, 33 | "misses" : 0, 34 | "resets" : 0, 35 | "missRatio" : 0 36 | } 37 | }, 38 | "backgroundFlushing" : { 39 | "flushes" : 4883, 40 | "total_ms" : 2309034, 41 | "average_ms" : 472.87200491501125, 42 | "last_ms" : 36, 43 | "last_finished" : "Mon Mar 29 2010 20:41:26 GMT-0700 (PDT)" 44 | }, 45 | "repl" : { 46 | "ismaster" : 0, 47 | "msg" : "not paired", 48 | "sources" : [ 49 | { 50 | "host" : "192.168.1.230", 51 | "syncedTo" : { 52 | "time" : "Wed Mar 31 2010 11:25:58 GMT-0700 (PDT)", 53 | "inc" : 1 54 | }, 55 | "masterFirst" : "Wed Mar 17 2010 16:25:45 GMT-0700 (PDT)", 56 | "masterLast" : "Wed Mar 31 2010 11:25:58 GMT-0700 (PDT)", 57 | "lagSeconds" : 0 58 | } 59 | ] 60 | }, 61 | "opcountersRepl" : { 62 | "insert" : 22090596, 63 | "query" : 0, 64 | "update" : 10367, 65 | "delete" : 16203779, 66 | "getmore" : 0, 67 | "command" : 0 68 | }, 69 | "opcounters" : { 70 | "insert" : 1584705, 71 | "query" : 145518, 72 | "update" : 2521129, 73 | "delete" : 601, 74 | "getmore" : 2268817, 75 | "command" : 17810 76 | }, 77 | "asserts" : { 78 | "regular" : 0, 79 | "warning" : 0, 80 | "msg" : 0, 81 | "user" : 164, 82 | "rollovers" : 0 83 | }, 84 | "ok" : 1 85 | } 86 | > bye 87 | -------------------------------------------------------------------------------- /t/cacti/samples/vmstat-001.txt: -------------------------------------------------------------------------------- 1 | nr_free_pages 130840 2 | nr_inactive_anon 294045 3 | nr_active_anon 3147436 4 | nr_inactive_file 4621304 5 | nr_active_file 758721 6 | nr_unevictable 0 7 | nr_mlock 0 8 | nr_anon_pages 22571 9 | nr_mapped 3081 10 | nr_file_pages 5380166 11 | nr_dirty 29 12 | nr_writeback 0 13 | nr_slab_reclaimable 44001 14 | nr_slab_unreclaimable 170481 15 | nr_page_table_pages 11151 16 | nr_kernel_stack 345 17 | nr_unstable 0 18 | nr_bounce 0 19 | nr_vmscan_write 1274 20 | nr_writeback_temp 0 21 | nr_isolated_anon 0 22 | nr_isolated_file 0 23 | nr_shmem 76 24 | numa_hit 283582756 25 | numa_miss 31703965 26 | numa_foreign 31703965 27 | numa_interleave 38201 28 | numa_local 283559638 29 | numa_other 31727083 30 | nr_anon_transparent_hugepages 6677 31 | pgpgin 344603708 32 | pgpgout 76233236 33 | pswpin 32 34 | pswpout 1274 35 | pgalloc_dma 0 36 | pgalloc_dma32 11642352 37 | pgalloc_normal 313550150 38 | pgalloc_movable 0 39 | pgfree 325583764 40 | pgactivate 1002412 41 | pgdeactivate 496466 42 | pgfault 265210810 43 | pgmajfault 3892 44 | pgrefill_dma 0 45 | pgrefill_dma32 1761 46 | pgrefill_normal 112988 47 | pgrefill_movable 0 48 | pgsteal_dma 0 49 | pgsteal_dma32 7072219 50 | pgsteal_normal 105946028 51 | pgsteal_movable 0 52 | pgscan_kswapd_dma 0 53 | pgscan_kswapd_dma32 6833440 54 | pgscan_kswapd_normal 104536352 55 | pgscan_kswapd_movable 0 56 | pgscan_direct_dma 0 57 | pgscan_direct_dma32 238907 58 | pgscan_direct_normal 1413746 59 | pgscan_direct_movable 0 60 | zone_reclaim_failed 0 61 | pginodesteal 0 62 | slabs_scanned 722176 63 | kswapd_steal 111365615 64 | kswapd_inodesteal 1537580 65 | kswapd_low_wmark_hit_quickly 8648 66 | kswapd_high_wmark_hit_quickly 46184 67 | kswapd_skip_congestion_wait 0 68 | pageoutrun 219715 69 | allocstall 91 70 | pgrotated 1274 71 | compact_blocks_moved 6517 72 | compact_pages_moved 195206 73 | compact_pagemigrate_failed 0 74 | compact_stall 244 75 | compact_fail 34 76 | compact_success 210 77 | htlb_buddy_alloc_success 0 78 | htlb_buddy_alloc_fail 0 79 | unevictable_pgs_culled 5053 80 | unevictable_pgs_scanned 0 81 | unevictable_pgs_rescued 4440 82 | unevictable_pgs_mlocked 6098 83 | unevictable_pgs_munlocked 6098 84 | unevictable_pgs_cleared 0 85 | unevictable_pgs_stranded 0 86 | unevictable_pgs_mlockfreed 0 87 | -------------------------------------------------------------------------------- /docs/cacti/faq.rst: -------------------------------------------------------------------------------- 1 | .. _cacti_faq: 2 | 3 | Frequently Asked Questions on Cacti Templates 4 | ============================================= 5 | 6 | My graphs have NaN on them. What is wrong? 7 | 8 | Please read and follow the directions at http://www.cacti.net/downloads/docs/html/debugging.html. 9 | 10 | My Cacti error log has many lines like "WARNING: Result from CMD not valid. Partial Result: U" What's wrong? 11 | 12 | Please read and follow the directions at http://www.cacti.net/downloads/docs/html/debugging.html. 13 | 14 | Running ``poller.php`` or the PHP script shows the correct output, but I see nothing in the graphs in Cacti. Why? 15 | 16 | If you ran either of those commands before Cacti did, then the cache file that 17 | the PHP script uses may have the wrong ownership. Check that the Cacti user 18 | has access to this cache file. Also check the ownership on the PHP script 19 | itself; does the Cacti user have permission to execute it? Sometimes the 20 | problem is due to installing or running as root from the command line, not 21 | realizing that Cacti runs as a different user. 22 | 23 | The output is truncated when I use Spine. Why? 24 | 25 | This is a Cacti bug. Use cmd.php for now. 26 | 27 | I get a blank page when I try to import the templates. Why? 28 | 29 | Check your webserver log. PHP might have run out of memory. If you see 30 | something like "Allowed memory size of 8388608 bytes exhausted (tried to 31 | allocate 10 bytes)" then you should increase ``memory_limit`` in your 32 | ``php.ini`` file and restart the webserver. Check that you've changed the 33 | correct ``php.ini`` file. If the problem persists, you might be changing the 34 | wrong one or doing it wrong. Some users have reported that they need to add 35 | ``ini_set('memory_limit', '64M');`` to the top of include/global.php. 36 | 37 | When I try to import the templates, my browser asks me if I want to download templates_import.php. Why? 38 | 39 | This might be the same problem as the blank page just mentioned. Check your web server's error logs. 40 | 41 | If I have a host that is both an Apache and MySQL server, should I be creating two separate devices in cacti, each with the appropriate Host Template? 42 | 43 | You don't need to. You can simply make it a MySQL server, create the 44 | appropriate graphs, and then switch to an Apache server and create the 45 | appropriate graphs. 46 | 47 | How do I graph a MySQL server that uses a non-standard port? 48 | 49 | See the documentation on customizing the templates. 50 | -------------------------------------------------------------------------------- /docs/cacti/jmx-templates.rst: -------------------------------------------------------------------------------- 1 | .. _cacti_jmx_templates: 2 | 3 | Percona JMX Monitoring Template for Cacti 4 | ========================================= 5 | 6 | These templates use ``ss_get_by_ssh.php`` to connect to a server via SSH and 7 | extract statistics from the JMX server. 8 | 9 | Installation 10 | ------------ 11 | 12 | Once the SSH connection is working, you need to make the Java runtime information 13 | available through JMX by adding the JMX system properties when you start the 14 | program you want to monitor. For a normal Java program, you can learn more about 15 | this from 16 | 17 | `Monitoring and Management Using JMX 18 | `_. If you are 19 | using Tomcat, you can read `Monitoring and Managing Tomcat 20 | `_. A simple example of 21 | how to start Notepad.jar with JMX instrumentation follows:: 22 | 23 | java -jar -Dcom.sun.management.jmxremote \ 24 | -Dcom.sun.management.jmxremote.port=9012 \ 25 | -Dcom.sun.management.jmxremote.ssl=false \ 26 | -Dcom.sun.magement.jmxremote.authenticate=false \ 27 | /path/to/Notepad.jar 28 | 29 | Now you need to install ``ant`` and the XML file with the JMX definitions. Copy 30 | ``misc/jmx-monitor.xml`` to the monitoring user's ``$HOME`` directory on the 31 | server you want to monitor. Then download ``catalina-ant-jmx.jar``, which is 32 | part of `Tomcat `_, to the 33 | ``$HOME/.ant/lib`` directory. 34 | 35 | Before you test the Cacti script's functionality, test that the instrumentation 36 | is available to JMX. Run the following command on the host you want to monitor, 37 | from the Cacti user's home directory. Replace any values as needed:: 38 | 39 | ant -Djmx.server.port=9012 -e -q -f jmx-monitor.xml 40 | 41 | Now on the Cacti host, test a command similar to the following, replacing any 42 | values necessary with ones appropriate for your environment:: 43 | 44 | sudo -u cacti php /usr/share/cacti/scripts/ss_get_by_ssh.php --type jmx --host 127.0.0.1 --items lt,lu 45 | 46 | Sample Graphs 47 | ------------- 48 | 49 | The following sample graphs demonstrate how the data is presented. 50 | 51 | .. image:: images/jmx-file-descriptor.png 52 | 53 | The file descriptors used by the JMX process. 54 | 55 | .. image:: images/jmx-heap-memory-usage.png 56 | 57 | The heap memory usage used by the JMX process. 58 | 59 | .. image:: images/jmx-nonheap-memory-usage.png 60 | 61 | The non-heap memory usage used by the JMX process. 62 | -------------------------------------------------------------------------------- /docs/cacti/memcached-templates.rst: -------------------------------------------------------------------------------- 1 | .. _cacti_memcached_templates: 2 | 3 | Percona Memcached Monitoring Template for Cacti 4 | =============================================== 5 | 6 | These templates use ``ss_get_by_ssh.php`` to connect to a server via SSH and 7 | extract statistics from the memcached server running there, by executing the 8 | ``nc`` (netcat) program with the command "STAT". This means you don't need any 9 | memcached APIs installed. Standard Unix command-line tools are all you need. 10 | 11 | Installation 12 | ------------ 13 | 14 | Once the SSH connection is working, you need to test the memcached 15 | function. You may need to change some of the example values below, such as the 16 | cacti username and the hostname you're connecting to:: 17 | 18 | sudo -u cacti php /usr/share/cacti/scripts/ss_get_by_ssh.php --type memcached --host 127.0.0.1 --items ij,ik 19 | 20 | You need ``nc`` on the server. Some versions of ``nc`` accept different 21 | command-line options. You can change the options used by configuring the PHP 22 | script. If you don't want to do this for some reason, then you can install a 23 | version of ``nc`` that conforms to the expectations coded in the script's 24 | default configuration instead. 25 | 26 | On Debian/Ubuntu, ``netcat-openbsd`` does not work, 27 | so you need the ``netcat-traditional`` package, and you need to switch to 28 | ``/bin/nc.traditional`` with the following command:: 29 | 30 | update-alternatives --config nc 31 | 32 | Also for Debian re-define PHP variable in ss_get_by_ssh.php.cnf this way:: 33 | 34 | 'hash_07_VER_2442551920abf4f05121043fe4cd51d7', 19 | OPVZ_kmemsize_failcnt => 'hash_07_VER_2442551920abf4f05121043fe4cd51d7', 20 | 21 | OPVZ_lockedpages_held => 'hash_07_VER_2442551920abf4f05121043fe4cd51d7', 22 | OPVZ_lockedpages_failcnt => 'hash_07_VER_2442551920abf4f05121043fe4cd51d7', 23 | OPVZ_privvmpages_held => 'hash_07_VER_2442551920abf4f05121043fe4cd51d7', 24 | OPVZ_privvmpages_failcnt => 'hash_07_VER_2442551920abf4f05121043fe4cd51d7', 25 | OPVZ_shmpages_held => 'hash_07_VER_2442551920abf4f05121043fe4cd51d7', 26 | OPVZ_shmpages_failcnt => 'hash_07_VER_2442551920abf4f05121043fe4cd51d7', 27 | OPVZ_physpages_held => 'hash_07_VER_2442551920abf4f05121043fe4cd51d7', 28 | OPVZ_physpages_failcnt => 'hash_07_VER_2442551920abf4f05121043fe4cd51d7', 29 | OPVZ_vmguarpages_held => 'hash_07_VER_2442551920abf4f05121043fe4cd51d7', 30 | OPVZ_vmguarpages_failcnt => 'hash_07_VER_2442551920abf4f05121043fe4cd51d7', 31 | OPVZ_oomguarpages_held => 'hash_07_VER_2442551920abf4f05121043fe4cd51d7', 32 | OPVZ_oomguarpages_failcnt => 'hash_07_VER_2442551920abf4f05121043fe4cd51d7', 33 | 34 | That's a sample used to create the OpenVZ graphs. It will create boilerplate for two graphs. 35 | 36 | Then run this script with that file as input. The output will be generic text 37 | that's ready to paste into the ``graphs`` section of your definitions file. 38 | You'll need to edit all of the things like the data input name, the name of each 39 | file, the colors, data types, and so on. But this can be a fast way to get 40 | started. 41 | 42 | When you're done, make sure you generate new hashes for everything, or you'll 43 | re-use hashes from another template. The best way to do this is to run 44 | ``pmp-cacti-make-hashes`` with the ``--refresh`` option on that to generate all new 45 | hashes. 46 | -------------------------------------------------------------------------------- /cacti/bin/pmp-cacti-graph-defs: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | # This is a script that helps generates a Perl data structure for Cacti graph 4 | # templates. 5 | # 6 | # This program is copyright (c) 2007 Baron Schwartz. Feedback and improvements 7 | # are welcome. 8 | # 9 | # THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED 10 | # WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 11 | # MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12 | # 13 | # This program is free software; you can redistribute it and/or modify it under 14 | # the terms of the GNU General Public License as published by the Free Software 15 | # Foundation, version 2. 16 | # 17 | # You should have received a copy of the GNU General Public License along with 18 | # this program; if not, write to the Free Software Foundation, Inc., 59 Temple 19 | # Place, Suite 330, Boston, MA 02111-1307 USA. 20 | 21 | use strict; 22 | use warnings FATAL => 'all'; 23 | use English qw(-no_match_vars); 24 | 25 | my $oktorun = 1; 26 | while ( $oktorun ) { 27 | my @names; 28 | my $line; 29 | while ( $line = <> ) { 30 | chomp $line; 31 | last unless $line; # Break at blank lines. 32 | my ( $name ) = $line =~ m/(\S+)/; 33 | push @names, $name; 34 | } 35 | $oktorun = defined $line; # exit at eof 36 | 37 | print <<' EOF'; 38 | { name => 'NAME', 39 | base_value => '1024', 40 | hash => 'hash_00_VER_09d9a71a602d18d831925419fddbdd39', 41 | dt => { 42 | hash => 'hash_01_VER_07ad123d392f3d06d255271acb37f628', 43 | input => 'Get NAME Stats', 44 | EOF 45 | 46 | foreach my $name ( @names ) { 47 | print <<" EOF"; 48 | $name => { 49 | data_source_type_id => '1', 50 | hash => 'hash_08_VER_ccda4eba57a840570248abdcfc46043f' 51 | }, 52 | EOF 53 | } 54 | 55 | print <<' EOF'; 56 | }, 57 | items => [ 58 | EOF 59 | 60 | foreach my $name ( @names ) { 61 | print <<" EOF"; 62 | { item => '$name', 63 | color => '91204D', 64 | task => 'hash_09_VER_75f16bbbd9a2db71c459d811910d638b', 65 | type => 'AREA', 66 | hashes => [ 67 | 'hash_10_VER_1324ebad5fb000d1baa62fb4610b2b7b', 68 | 'hash_10_VER_0cab391e9fca9406bb1824e8b3b9b724', 69 | 'hash_10_VER_fcdaa9ac97c925ba2af1486063b2d401', 70 | 'hash_10_VER_042bdc29fe56dc077c2735581c3bea87' 71 | ], 72 | }, 73 | EOF 74 | } 75 | 76 | print <<' EOF'; 77 | ], 78 | }, 79 | EOF 80 | 81 | } 82 | -------------------------------------------------------------------------------- /docs/cacti/hardening-cacti-setup.rst: -------------------------------------------------------------------------------- 1 | .. _hardening_cacti_setup: 2 | 3 | Hardening Cacti setup 4 | ===================== 5 | 6 | By default, the Cacti setup is closed from accessing from Web. Here is an excerpt from ``/etc/httpd/conf.d/cacti.conf``:: 7 | 8 | 9 | 10 | # httpd 2.4 11 | Require host localhost 12 | 13 | 14 | # httpd 2.2 15 | Order deny,allow 16 | Deny from all 17 | Allow from localhost 18 | 19 | 20 | 21 | In order, to access the Cacti web interface, most likely, you will be changing this configuration. Commenting out Deny/Require statements will open the Cacti to the local network or Internet. This will create **a potential vulnerability to disclose MySQL password** contained in scripts under the directory ``/usr/share/cacti/scripts/``, in particular ``/usr/share/cacti/scripts/ss_get_mysql_stats.php`` and ``/usr/share/cacti/scripts/ss_get_mysql_stats.php.cnf``, when trying to access them from Web. 22 | 23 | Unfortunately, the folder ``/usr/share/cacti/scripts/`` is not closed by default as it is done with ``/usr/share/cacti/log/`` and ``/usr/share/cacti/rra/`` directories. 24 | 25 | We strongly recommend to close any access from the web for these additional directories or files: 26 | 27 | * /usr/share/cacti/scripts/ 28 | * /usr/share/cacti/site/scripts/ (for Debian systems) 29 | * /usr/share/cacti/cli/ 30 | * /usr/share/cacti/.boto 31 | 32 | Here is an example of httpd configuration that can harden your setup (goes to ``/etc/httpd/conf.d/cacti.conf``):: 33 | 34 | 35 | 36 | Redirect 404 / 37 | 38 | 39 | 40 | Require all denied 41 | 42 | 43 | Order deny,allow 44 | Deny from all 45 | 46 | 47 | 48 | 49 | Even if you fully password-protected your Cacti installation using HTTP authentication, it is still recommended to double-secure the directories and files listed above. 50 | 51 | Outlining the basic rules: 52 | 53 | * keep your PHP config files ``ss_get_mysql_stats.php.cnf`` and ``ss_get_by_ssh.php.cnf`` outside the web directory ``/usr/share/cacti/scripts/``. The recommended location is ``/etc/cacti/``. 54 | * do not put any SSH keys under cacti user home directory which is still the web directory. 55 | * avoid placing ``.boto`` file under ``~cacti/``, use ``/etc/boto.cfg`` instead (that's for RDS plugins). 56 | -------------------------------------------------------------------------------- /t/cacti/samples/innodb-004.txt: -------------------------------------------------------------------------------- 1 | ===================================== 2 | 070915 16:24:28 INNODB MONITOR OUTPUT 3 | ===================================== 4 | Per second averages calculated from the last 13 seconds 5 | ---------- 6 | SEMAPHORES 7 | ---------- 8 | OS WAIT ARRAY INFO: reservation count 8, signal count 8 9 | Mutex spin waits 0, rounds 80, OS waits 0 10 | RW-shared spins 16, OS waits 8; RW-excl spins 1, OS waits 0 11 | ------------------------ 12 | LATEST FOREIGN KEY ERROR 13 | ------------------------ 14 | 070915 16:23:09 Cannot DISCARD table `test/t1` 15 | because it is referenced by `test/t2` 16 | ------------ 17 | TRANSACTIONS 18 | ------------ 19 | Trx id counter 0 3366 20 | Purge done for trx's n:o < 0 3357 undo n:o < 0 0 21 | History list length 8 22 | Total number of lock structs in row lock hash table 0 23 | LIST OF TRANSACTIONS FOR EACH SESSION: 24 | ---TRANSACTION 0 3365, not started, process no 5202, OS thread id 1141152064 25 | MySQL thread id 11, query id 197 localhost root 26 | show innodb status 27 | -------- 28 | FILE I/O 29 | -------- 30 | I/O thread 0 state: waiting for i/o request (insert buffer thread) 31 | I/O thread 1 state: waiting for i/o request (log thread) 32 | I/O thread 2 state: waiting for i/o request (read thread) 33 | I/O thread 3 state: waiting for i/o request (write thread) 34 | Pending normal aio reads: 0, aio writes: 0, 35 | ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0 36 | Pending flushes (fsync) log: 0; buffer pool: 0 37 | 42 OS file reads, 73 OS file writes, 64 OS fsyncs 38 | 0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s 39 | ------------------------------------- 40 | INSERT BUFFER AND ADAPTIVE HASH INDEX 41 | ------------------------------------- 42 | Ibuf: size 1, free list len 0, seg size 2, 43 | 0 inserts, 0 merged recs, 0 merges 44 | Hash table size 17393, used cells 0, node heap has 1 buffer(s) 45 | 0.00 hash searches/s, 0.00 non-hash searches/s 46 | --- 47 | LOG 48 | --- 49 | Log sequence number 0 73291 50 | Log flushed up to 0 73291 51 | Last checkpoint at 0 73291 52 | 0 pending log writes, 0 pending chkp writes 53 | 34 log i/o's done, 0.00 log i/o's/second 54 | ---------------------- 55 | BUFFER POOL AND MEMORY 56 | ---------------------- 57 | Total memory allocated 20556394; in additional pool allocated 722688 58 | Buffer pool size 512 59 | Free buffers 480 60 | Database pages 31 61 | Modified db pages 0 62 | Pending reads 0 63 | Pending writes: LRU 0, flush list 0, single page 0 64 | Pages read 33, created 20, written 61 65 | 0.00 reads/s, 0.00 creates/s, 0.00 writes/s 66 | No buffer pool page gets since the last printout 67 | -------------- 68 | ROW OPERATIONS 69 | -------------- 70 | 0 queries inside InnoDB, 0 queries in queue 71 | 1 read views open inside InnoDB 72 | Main thread process no. 5202, id 1140881728, state: waiting for server activity 73 | Number of rows inserted 0, updated 0, deleted 0, read 0 74 | 0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s 75 | ---------------------------- 76 | END OF INNODB MONITOR OUTPUT 77 | ============================ 78 | -------------------------------------------------------------------------------- /t/cacti/samples/innodb-005.txt: -------------------------------------------------------------------------------- 1 | ===================================== 2 | 070915 16:32:07 INNODB MONITOR OUTPUT 3 | ===================================== 4 | Per second averages calculated from the last 18 seconds 5 | ---------- 6 | SEMAPHORES 7 | ---------- 8 | OS WAIT ARRAY INFO: reservation count 10, signal count 10 9 | Mutex spin waits 0, rounds 100, OS waits 0 10 | RW-shared spins 20, OS waits 10; RW-excl spins 1, OS waits 0 11 | ------------------------ 12 | LATEST FOREIGN KEY ERROR 13 | ------------------------ 14 | 070915 16:31:46 Cannot drop table `test/t1` 15 | because it is referenced by `test/t2` 16 | ------------ 17 | TRANSACTIONS 18 | ------------ 19 | Trx id counter 0 3371 20 | Purge done for trx's n:o < 0 3370 undo n:o < 0 0 21 | History list length 9 22 | Total number of lock structs in row lock hash table 0 23 | LIST OF TRANSACTIONS FOR EACH SESSION: 24 | ---TRANSACTION 0 3368, not started, process no 5202, OS thread id 1141152064 25 | MySQL thread id 12, query id 210 localhost root 26 | show innodb status 27 | -------- 28 | FILE I/O 29 | -------- 30 | I/O thread 0 state: waiting for i/o request (insert buffer thread) 31 | I/O thread 1 state: waiting for i/o request (log thread) 32 | I/O thread 2 state: waiting for i/o request (read thread) 33 | I/O thread 3 state: waiting for i/o request (write thread) 34 | Pending normal aio reads: 0, aio writes: 0, 35 | ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0 36 | Pending flushes (fsync) log: 0; buffer pool: 0 37 | 42 OS file reads, 89 OS file writes, 78 OS fsyncs 38 | 0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s 39 | ------------------------------------- 40 | INSERT BUFFER AND ADAPTIVE HASH INDEX 41 | ------------------------------------- 42 | Ibuf: size 1, free list len 0, seg size 2, 43 | 0 inserts, 0 merged recs, 0 merges 44 | Hash table size 17393, used cells 0, node heap has 1 buffer(s) 45 | 0.00 hash searches/s, 0.00 non-hash searches/s 46 | --- 47 | LOG 48 | --- 49 | Log sequence number 0 74102 50 | Log flushed up to 0 74102 51 | Last checkpoint at 0 74102 52 | 0 pending log writes, 0 pending chkp writes 53 | 41 log i/o's done, 0.00 log i/o's/second 54 | ---------------------- 55 | BUFFER POOL AND MEMORY 56 | ---------------------- 57 | Total memory allocated 20556394; in additional pool allocated 719872 58 | Buffer pool size 512 59 | Free buffers 480 60 | Database pages 31 61 | Modified db pages 0 62 | Pending reads 0 63 | Pending writes: LRU 0, flush list 0, single page 0 64 | Pages read 33, created 20, written 69 65 | 0.00 reads/s, 0.00 creates/s, 0.00 writes/s 66 | No buffer pool page gets since the last printout 67 | -------------- 68 | ROW OPERATIONS 69 | -------------- 70 | 0 queries inside InnoDB, 0 queries in queue 71 | 1 read views open inside InnoDB 72 | Main thread process no. 5202, id 1140881728, state: waiting for server activity 73 | Number of rows inserted 2, updated 0, deleted 0, read 1 74 | 0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s 75 | ---------------------------- 76 | END OF INNODB MONITOR OUTPUT 77 | ============================ 78 | -------------------------------------------------------------------------------- /docs/cacti/galera-templates.rst: -------------------------------------------------------------------------------- 1 | .. _cacti_galera_templates: 2 | 3 | Percona Galera/MySQL Monitoring Template for Cacti 4 | ================================================== 5 | 6 | Galera/MySQL is synchronous multi-master cluster for InnoDB databases. 7 | Please refer to :ref:`MySQL Monitoring Template ` 8 | for installation intructions. 9 | 10 | Sample Graphs 11 | ------------- 12 | 13 | The following sample graphs demonstrate how the data is presented. 14 | 15 | 16 | .. image:: images/galera_writeset_traffic.png 17 | 18 | Galera Writeset Traffic. This graph shows the bytes of data replicated to the cluster (from this node) 19 | and received from the cluster (any other node). 20 | 21 | .. image:: images/galera_writeset_count.png 22 | 23 | Galera Writeset Count. This graph shows the count of transactions replicated to the cluster (from this node) 24 | and received from cluster (any other node). 25 | 26 | .. image:: images/galera_writeset_size.png 27 | 28 | Galera Writeset Size. This graph shows the average transaction size sent/received. 29 | 30 | .. image:: images/galera_replication_queues.png 31 | 32 | Galera Replication Queues. The length of send and recv queues. 33 | 34 | .. image:: images/galera_parallelization_efficiency.png 35 | 36 | Galera Parallelization Efficiency. This graph shows the average distances between highest and lowest seqno 37 | that are concurrently applied, commited and can be possibly applied in parallel (potential degree of parallelization). 38 | 39 | .. image:: images/galera_writing_conflicts.png 40 | 41 | Galera Writing Conflicts. This graphs shows the number of local transactions being committed on this node that failed certification 42 | (some other node had a commit that conflicted with ours) -- client received deadlock error on commit and also 43 | the number of local transactions in flight on this node that were aborted because they locked something an applier thread needed 44 | -- deadlock error anywhere in an open transaction. The spike on the graph was created on the time of writing to the same table 45 | potentially the same rows from 2 nodes. 46 | 47 | .. image:: images/galera_cluster_size.png 48 | 49 | Galera Cluster Size. This graph shows the number of members currently connected to the cluster. 50 | 51 | .. image:: images/galera_flow_control.png 52 | 53 | Galera Flow Control. This graph shows the number of FC_PAUSE events sent/received. They are sent by a node when its replication queue 54 | gets too full. If a node is sending out FC messages it indicates the problem. On the graph you can observe FC sent/received when we 55 | were writing to both nodes and once we stopped writing to the current node, FC sent becomes 0 but still receiving FC messages from 56 | the neighbouring node. 57 | 58 | IMPORTANT NOTE: the Flow Control graph can be faulty until this `bug `_ is fixed. 59 | The reason is the respective status variables are nullified on every ``SHOW STATUS`` query which means if something else runs it 60 | the Cacti script will see zeros right after that. 61 | -------------------------------------------------------------------------------- /t/cacti/samples/innodb-003.txt: -------------------------------------------------------------------------------- 1 | ===================================== 2 | 070915 16:17:48 INNODB MONITOR OUTPUT 3 | ===================================== 4 | Per second averages calculated from the last 46 seconds 5 | ---------- 6 | SEMAPHORES 7 | ---------- 8 | OS WAIT ARRAY INFO: reservation count 8, signal count 8 9 | Mutex spin waits 0, rounds 80, OS waits 0 10 | RW-shared spins 16, OS waits 8; RW-excl spins 1, OS waits 0 11 | ------------------------ 12 | LATEST FOREIGN KEY ERROR 13 | ------------------------ 14 | 070915 16:15:55 Error in foreign key constraint of table test/#sql-1452_9: 15 | foreign key (a) references t4(a): 16 | Cannot resolve table name close to: 17 | (a) 18 | ------------ 19 | TRANSACTIONS 20 | ------------ 21 | Trx id counter 0 3362 22 | Purge done for trx's n:o < 0 3357 undo n:o < 0 0 23 | History list length 8 24 | Total number of lock structs in row lock hash table 0 25 | LIST OF TRANSACTIONS FOR EACH SESSION: 26 | ---TRANSACTION 0 0, not started, process no 5202, OS thread id 1141152064 27 | MySQL thread id 9, query id 181 localhost root 28 | show innodb status 29 | -------- 30 | FILE I/O 31 | -------- 32 | I/O thread 0 state: waiting for i/o request (insert buffer thread) 33 | I/O thread 1 state: waiting for i/o request (log thread) 34 | I/O thread 2 state: waiting for i/o request (read thread) 35 | I/O thread 3 state: waiting for i/o request (write thread) 36 | Pending normal aio reads: 0, aio writes: 0, 37 | ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0 38 | Pending flushes (fsync) log: 0; buffer pool: 0 39 | 42 OS file reads, 73 OS file writes, 64 OS fsyncs 40 | 0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s 41 | ------------------------------------- 42 | INSERT BUFFER AND ADAPTIVE HASH INDEX 43 | ------------------------------------- 44 | Ibuf: size 1, free list len 0, seg size 2, 45 | 0 inserts, 0 merged recs, 0 merges 46 | Hash table size 17393, used cells 0, node heap has 1 buffer(s) 47 | 0.00 hash searches/s, 0.00 non-hash searches/s 48 | --- 49 | LOG 50 | --- 51 | Log sequence number 0 73291 52 | Log flushed up to 0 73291 53 | Last checkpoint at 0 73291 54 | 0 pending log writes, 0 pending chkp writes 55 | 34 log i/o's done, 0.00 log i/o's/second 56 | ---------------------- 57 | BUFFER POOL AND MEMORY 58 | ---------------------- 59 | Total memory allocated 20556394; in additional pool allocated 718336 60 | Buffer pool size 512 61 | Free buffers 480 62 | Database pages 31 63 | Modified db pages 0 64 | Pending reads 0 65 | Pending writes: LRU 0, flush list 0, single page 0 66 | Pages read 33, created 20, written 61 67 | 0.00 reads/s, 0.00 creates/s, 0.00 writes/s 68 | No buffer pool page gets since the last printout 69 | -------------- 70 | ROW OPERATIONS 71 | -------------- 72 | 0 queries inside InnoDB, 0 queries in queue 73 | 1 read views open inside InnoDB 74 | Main thread process no. 5202, id 1140881728, state: waiting for server activity 75 | Number of rows inserted 0, updated 0, deleted 0, read 0 76 | 0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s 77 | ---------------------------- 78 | END OF INNODB MONITOR OUTPUT 79 | ============================ 80 | -------------------------------------------------------------------------------- /t/nagios/pmp-check-unix-memory/samples/ps-001.txt: -------------------------------------------------------------------------------- 1 | PID VSZ COMMAND 2 | 1 23620 init 3 | 2 0 kthreadd 4 | 3 0 ksoftirqd/0 5 | 4 0 migration/0 6 | 5 0 watchdog/0 7 | 6 0 migration/1 8 | 7 0 ksoftirqd/1 9 | 8 0 watchdog/1 10 | 9 0 events/0 11 | 10 0 events/1 12 | 11 0 cpuset 13 | 12 0 khelper 14 | 13 0 netns 15 | 14 0 async/mgr 16 | 15 0 pm 17 | 16 0 xenwatch 18 | 18 0 xenbus 19 | 19 0 sync_supers 20 | 20 0 bdi-default 21 | 21 0 kintegrityd/0 22 | 22 0 kintegrityd/1 23 | 23 0 kblockd/0 24 | 24 0 kblockd/1 25 | 25 0 ata_aux 26 | 26 0 ata_sff/0 27 | 27 0 ata_sff/1 28 | 28 0 khubd 29 | 29 0 kseriod 30 | 30 0 kmmcd 31 | 31 0 khungtaskd 32 | 32 0 kswapd0 33 | 33 0 ksmd 34 | 34 0 aio/0 35 | 35 0 aio/1 36 | 36 0 ecryptfs-kthrea 37 | 37 0 crypto/0 38 | 38 0 crypto/1 39 | 43 0 khvcd 40 | 44 0 kstriped 41 | 45 0 kmpathd/0 42 | 46 0 kmpathd/1 43 | 47 0 kmpath_handlerd 44 | 48 0 ksnapd 45 | 49 0 kondemand/0 46 | 50 0 kondemand/1 47 | 51 0 kconservative/0 48 | 52 0 kconservative/1 49 | 188 0 kjournald 50 | 226 17084 upstart-udev-br 51 | 237 16932 udevd 52 | 411 49308 sshd 53 | 456 136176 rsyslogd 54 | 526 16928 udevd 55 | 528 16928 udevd 56 | 532 6128 getty 57 | 534 6128 getty 58 | 535 6128 getty 59 | 538 6128 getty 60 | 539 6128 getty 61 | 541 6128 getty 62 | 545 18932 atd 63 | 546 21124 cron 64 | 584 0 flush-202:1 65 | 591 15668 haproxy 66 | 596 44776 ha_logd 67 | 599 44776 ha_logd 68 | 627 55592 perl 69 | 628 245064 perl 70 | 635 145516 openhpid 71 | 777 25848 ntpd 72 | 780 75176 remote_syslog 73 | 895 74636 heartbeat 74 | 901 74576 heartbeat 75 | 902 74572 heartbeat 76 | 903 74572 heartbeat 77 | 904 74572 heartbeat 78 | 905 74572 heartbeat 79 | 908 44468 perl 80 | 915 55796 perl 81 | 923 44468 perl 82 | 926 55796 perl 83 | 930 55796 perl 84 | 949 94840 apache2 85 | 1028 6128 getty 86 | 1195 70640 sshd 87 | 1253 70640 sshd 88 | 1254 19512 bash 89 | 1259 37108 su 90 | 1260 19624 bash 91 | 5045 70640 sshd 92 | 5103 70640 sshd 93 | 5104 19480 bash 94 | 5105 37108 su 95 | 5106 19600 bash 96 | 5118 70640 sshd 97 | 5176 70640 sshd 98 | 5177 19480 bash 99 | 5178 70640 sshd 100 | 5236 70640 sshd 101 | 5237 19480 bash 102 | 5238 40676 ssh 103 | 5241 40676 ssh 104 | 6247 94340 apache2 105 | 6248 373788 apache2 106 | 6260 374444 apache2 107 | 6939 70640 sshd 108 | 6997 70640 sshd 109 | 6998 19480 bash 110 | 7000 6876 ps 111 | 9276 70640 sshd 112 | 9334 70640 sshd 113 | 9335 19512 bash 114 | 9423 40676 ssh 115 | 11262 70640 sshd 116 | 11322 70640 sshd 117 | 11323 16064 nc 118 | 23859 70640 sshd 119 | 23917 73860 sshd 120 | 23918 16064 nc 121 | 26553 70640 sshd 122 | 26611 70640 sshd 123 | 26612 19512 bash 124 | 26616 40676 ssh 125 | -------------------------------------------------------------------------------- /t/cacti/samples/openvz-001.txt: -------------------------------------------------------------------------------- 1 | Version: 2.5 2 | uid resource held maxheld barrier limit failcnt 3 | 200: kmemsize 8906701 25288727 147901640 147901640 0 4 | lockedpages 0 0 256 256 0 5 | privvmpages 39695 61719 262144 262144 0 6 | shmpages 688 1392 21504 21504 0 7 | dummy 0 0 0 0 0 8 | numproc 32 58 240 240 0 9 | physpages 11101 18217 0 9223372036854775807 0 10 | vmguarpages 0 0 33792 9223372036854775807 0 11 | oomguarpages 11101 18217 26112 9223372036854775807 0 12 | numtcpsock 6 32 360 360 0 13 | numflock 6 8 188 206 0 14 | numpty 1 1 16 16 0 15 | numsiginfo 0 20 256 256 0 16 | tcpsndbuf 338656 375920 27033600 27033600 0 17 | tcprcvbuf 98304 218448 1720320 2703360 0 18 | othersockbuf 9280 31136 1126080 2097152 0 19 | dgramrcvbuf 0 9760 262144 262144 0 20 | numothersock 9 26 360 360 0 21 | dcachesize 0 0 3409920 3624960 0 22 | numfile 788 1298 9312 9312 0 23 | dummy 0 0 0 0 0 24 | dummy 0 0 0 0 0 25 | dummy 0 0 0 0 0 26 | numiptent 10 10 128 128 0 27 | 28 | 29 | -------------------------------------------------------------------------------- /cacti/misc/jmx-monitor.xml: -------------------------------------------------------------------------------- 1 | 17 | 21 | 22 | 23 | 24 | 25 | 30 | 35 | 40 | 45 | 50 | 55 | 60 | 65 | heap_memory_used: ${HeapMemoryUsage.used} 66 | heap_memory_committed: ${HeapMemoryUsage.committed} 67 | heap_memory_max: ${HeapMemoryUsage.max} 68 | non_heap_memory_used: ${NonHeapMemoryUsage.used} 69 | non_heap_memory_committed: ${NonHeapMemoryUsage.committed} 70 | non_heap_memory_max: ${NonHeapMemoryUsage.max} 71 | open_file_descriptors: ${OpenFileDescriptorCount} 72 | max_file_descriptors: ${MaxFileDescriptorCount} 73 | current_threads_busy: ${currentThreadsBusy} 74 | current_thread_count: ${currentThreadCount} 75 | max_threads: ${maxThreads} 76 | 77 | 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /t/cacti/samples/innodb-008.txt: -------------------------------------------------------------------------------- 1 | ===================================== 2 | 060818 21:25:38 INNODB MONITOR OUTPUT 3 | ===================================== 4 | Per second averages calculated from the last 1 seconds 5 | ---------- 6 | SEMAPHORES 7 | ---------- 8 | OS WAIT ARRAY INFO: reservation count 25852795, signal count 25040646 9 | --Thread 1568861104 has waited at btr0cur.c line 424 for 0.00 seconds the semaphore: 10 | S-lock on RW-latch at 0x654e0088 created in file buf0buf.c line 490 11 | a writer (thread id 1568861104) has reserved it in mode exclusive 12 | number of readers 0, waiters flag 1 13 | Last time read locked in file btr0cur.c line 424 14 | Last time write locked in file buf0buf.c line 1693 15 | Mutex spin waits 1472567303, rounds 1361479798, OS waits 10761956 16 | RW-shared spins 28507164, OS waits 11626439; RW-excl spins 20124203, OS waits 2147828 17 | ------------ 18 | TRANSACTIONS 19 | ------------ 20 | Trx id counter 0 133408350 21 | Purge done for trx's n:o < 0 133408332 undo n:o < 0 0 22 | History list length 0 23 | Total number of lock structs in row lock hash table 79453 24 | LIST OF TRANSACTIONS FOR EACH SESSION: 25 | ---TRANSACTION 0 0, not started, process no 6080, OS thread id 1548745648 26 | MySQL thread id 127564, query id 1251173802 kenya 192.168.0.8 baron 27 | SHOW /*!5 ENGINE */ INNODB STATUS 28 | -------- 29 | FILE I/O 30 | -------- 31 | I/O thread 0 state: waiting for i/o request (insert buffer thread) 32 | I/O thread 1 state: waiting for i/o request (log thread) 33 | I/O thread 2 state: doing file i/o (read thread) ev set 34 | I/O thread 3 state: waiting for i/o request (write thread) 35 | Pending normal aio reads: 45, aio writes: 0, 36 | ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0 37 | Pending flushes (fsync) log: 0; buffer pool: 0 38 | 45418933 OS file reads, 35217570 OS file writes, 28236603 OS fsyncs 39 | 1 pending preads, 0 pending pwrites 40 | 42.96 reads/s, 75823 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s 41 | ------------------------------------- 42 | INSERT BUFFER AND ADAPTIVE HASH INDEX 43 | ------------------------------------- 44 | Ibuf for space 0: size 1, free list len 14, seg size 16, is empty 45 | Ibuf for space 0: size 1, free list len 14, seg size 16, 46 | 27146584 inserts, 27146584 merged recs, 2778819 merges 47 | Hash table size 5312557, used cells 4557942, node heap has 10145 buffer(s) 48 | 9493.51 hash searches/s, 2038.96 non-hash searches/s 49 | --- 50 | LOG 51 | --- 52 | Log sequence number 476 3871193896 53 | Log flushed up to 476 3871193896 54 | Last checkpoint at 476 3870845161 55 | 0 pending log writes, 0 pending chkp writes 56 | 24755286 log i/o's done, 0.00 log i/o's/second 57 | ---------------------- 58 | BUFFER POOL AND MEMORY 59 | ---------------------- 60 | Total memory allocated 1466180702; in additional pool allocated 9271040 61 | Buffer pool size 81920 62 | Free buffers 0 63 | Database pages 71206 64 | Modified db pages 127 65 | Pending reads 64 66 | Pending writes: LRU 0, flush list 0, single page 0 67 | Pages read 193076880, created 6774244, written 30675418 68 | 205.79 reads/s, 0.00 creates/s, 0.00 writes/s 69 | Buffer pool hit rate 995 / 1000 70 | -------------- 71 | ROW OPERATIONS 72 | -------------- 73 | 2 queries inside InnoDB, 0 queries in queue 74 | 1 read views open inside InnoDB 75 | Main thread process no. 6080, id 1596521392, state: sleeping 76 | Number of rows inserted 366123974, updated 347070333, deleted 135232886, read 2210469195 77 | 0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 11224.78 reads/s 78 | ---------------------------- 79 | END OF INNODB MONITOR OUTPUT 80 | ============================ 81 | -------------------------------------------------------------------------------- /t/cacti/samples/innodb-007.txt: -------------------------------------------------------------------------------- 1 | ===================================== 2 | 060815 22:00:08 INNODB MONITOR OUTPUT 3 | ===================================== 4 | Per second averages calculated from the last 1 seconds 5 | ---------- 6 | SEMAPHORES 7 | ---------- 8 | OS WAIT ARRAY INFO: reservation count 2732706, signal count 2379850 9 | --Thread 1194400096 has waited at ./../include/buf0buf.ic line 621 for 0.00 seconds the semaphore: 10 | Mutex at 0x2a97b65cb8 created file buf0buf.c line 538, lock var 0 11 | waiters flag 0 12 | wait is ending 13 | --Thread 1229543776 has waited at ./../include/buf0buf.ic line 621 for 0.00 seconds the semaphore: 14 | Mutex at 0x2a97b65cb8 created file buf0buf.c line 538, lock var 0 15 | waiters flag 0 16 | wait is ending 17 | --Thread 1180023136 has waited at buf0buf.c line 1095 for 0.00 seconds the semaphore: 18 | Mutex at 0x2a97b65cb8 created file buf0buf.c line 538, lock var 0 19 | waiters flag 0 20 | wait is ending 21 | Mutex spin waits 972676265, rounds 873903174, OS waits 1082677 22 | RW-shared spins 1173365, OS waits 286911; RW-excl spins 2180540, OS waits 132392 23 | ------------ 24 | TRANSACTIONS 25 | ------------ 26 | Trx id counter 0 418256672 27 | Purge done for trx's n:o < 0 418256427 undo n:o < 0 0 28 | History list length 68 29 | Total number of lock structs in row lock hash table 9127 30 | LIST OF TRANSACTIONS FOR EACH SESSION: 31 | ---TRANSACTION 0 0, not started, process no 15072, OS thread id 1309149536 32 | MySQL thread id 7292664, query id 62690007 localhost baron 33 | SHOW /*!5 ENGINE */ INNODB STATUS 34 | -------- 35 | FILE I/O 36 | -------- 37 | I/O thread 0 state: waiting for i/o request (insert buffer thread) 38 | I/O thread 1 state: waiting for i/o request (log thread) 39 | I/O thread 2 state: waiting for i/o request (read thread) 40 | I/O thread 3 state: waiting for i/o request (write thread) 41 | Pending normal aio reads: 0, aio writes: 0, 42 | ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0 43 | Pending flushes (fsync) log: 0; buffer pool: 0 44 | 54061 OS file reads, 41303508 OS file writes, 35873693 OS fsyncs 45 | 0.00 reads/s, 0 avg bytes/read, 45.95 writes/s, 37.96 fsyncs/s 46 | ------------------------------------- 47 | INSERT BUFFER AND ADAPTIVE HASH INDEX 48 | ------------------------------------- 49 | Ibuf for space 0: size 1, free list len 5, seg size 7, is empty 50 | Ibuf for space 0: size 1, free list len 5, seg size 7, 51 | 4622 inserts, 4622 merged recs, 3923 merges 52 | Hash table size 4425293, used cells 4229064, node heap has 20330 buffer(s) 53 | 164964.04 hash searches/s, 8995.00 non-hash searches/s 54 | --- 55 | LOG 56 | --- 57 | Log sequence number 17 3726916467 58 | Log flushed up to 17 3726916467 59 | Last checkpoint at 17 3717618537 60 | 0 pending log writes, 0 pending chkp writes 61 | 35429003 log i/o's done, 34.97 log i/o's/second 62 | ---------------------- 63 | BUFFER POOL AND MEMORY 64 | ---------------------- 65 | Total memory allocated 2678883562; in additional pool allocated 18844672 66 | Buffer pool size 131072 67 | Free buffers 99 68 | Database pages 110571 69 | Modified db pages 3939 70 | Pending reads 0 71 | Pending writes: LRU 0, flush list 0, single page 0 72 | Pages read 67076, created 71687, written 8872882 73 | 0.00 reads/s, 0.00 creates/s, 18.98 writes/s 74 | Buffer pool hit rate 1000 / 1000 75 | -------------- 76 | ROW OPERATIONS 77 | -------------- 78 | 0 queries inside InnoDB, 0 queries in queue 79 | 3 read views open inside InnoDB 80 | Main thread process no. 15072, id 1157658976, state: sleeping 81 | Number of rows inserted 12652987, updated 17663832, deleted 11398378, read 83506215492 82 | 4.00 inserts/s, 12.99 updates/s, 0.00 deletes/s, 735874.13 reads/s 83 | ---------------------------- 84 | END OF INNODB MONITOR OUTPUT 85 | ============================ 86 | -------------------------------------------------------------------------------- /t/cacti/samples/innodb-012.txt: -------------------------------------------------------------------------------- 1 | ===================================== 2 | 070915 15:34:37 INNODB MONITOR OUTPUT 3 | ===================================== 4 | Per second averages calculated from the last 24 seconds 5 | ---------- 6 | SEMAPHORES 7 | ---------- 8 | OS WAIT ARRAY INFO: reservation count 7, signal count 7 9 | Mutex spin waits 0, rounds 60, OS waits 0 10 | RW-shared spins 14, OS waits 7; RW-excl spins 1, OS waits 0 11 | ------------------------ 12 | LATEST FOREIGN KEY ERROR 13 | ------------------------ 14 | 070915 15:10:24 Transaction: 15 | TRANSACTION 0 3358, ACTIVE 0 sec, process no 5202, OS thread id 1141152064 inserting, thread declared inside InnoDB 500 16 | mysql tables in use 1, locked 1 17 | 3 lock struct(s), heap size 368, undo log entries 1 18 | MySQL thread id 6, query id 162 localhost root update 19 | insert into t2(a) values(1) 20 | Foreign key constraint fails for table `test/t2`: 21 | , 22 | CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`a`) REFERENCES `t1` (`a`) 23 | Trying to add in child table, in index `a` tuple: 24 | DATA TUPLE: 2 fields; 25 | 0: len 4; hex 80000001; asc ;; 1: len 6; hex 000000000200; asc ;; 26 | 27 | But in parent table `test/t1`, in index `PRIMARY`, 28 | the closest match we can find is record: 29 | PHYSICAL RECORD: n_fields 1; compact format; info bits 0 30 | 0: len 8; hex 696e66696d756d00; asc infimum ;; 31 | 32 | ------------ 33 | TRANSACTIONS 34 | ------------ 35 | Trx id counter 0 3359 36 | Purge done for trx's n:o < 0 3357 undo n:o < 0 0 37 | History list length 8 38 | Total number of lock structs in row lock hash table 0 39 | LIST OF TRANSACTIONS FOR EACH SESSION: 40 | ---TRANSACTION 0 0, not started, process no 5202, OS thread id 1141152064 41 | MySQL thread id 8, query id 169 localhost root 42 | show innodb status 43 | -------- 44 | FILE I/O 45 | -------- 46 | I/O thread 0 state: waiting for i/o request (insert buffer thread) 47 | I/O thread 1 state: waiting for i/o request (log thread) 48 | I/O thread 2 state: waiting for i/o request (read thread) 49 | I/O thread 3 state: waiting for i/o request (write thread) 50 | Pending normal aio reads: 0, aio writes: 0, 51 | ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0 52 | Pending flushes (fsync) log: 0; buffer pool: 0 53 | 42 OS file reads, 63 OS file writes, 55 OS fsyncs 54 | 0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s 55 | ------------------------------------- 56 | INSERT BUFFER AND ADAPTIVE HASH INDEX 57 | ------------------------------------- 58 | Ibuf: size 1, free list len 0, seg size 2, 59 | 0 inserts, 0 merged recs, 0 merges 60 | Hash table size 17393, used cells 0, node heap has 1 buffer(s) 61 | 0.00 hash searches/s, 0.00 non-hash searches/s 62 | --- 63 | LOG 64 | --- 65 | Log sequence number 0 68906 66 | Log flushed up to 0 68906 67 | Last checkpoint at 0 68906 68 | 0 pending log writes, 0 pending chkp writes 69 | 31 log i/o's done, 0.00 log i/o's/second 70 | ---------------------- 71 | BUFFER POOL AND MEMORY 72 | ---------------------- 73 | Total memory allocated 20556394; in additional pool allocated 713728 74 | Buffer pool size 512 75 | Free buffers 480 76 | Database pages 31 77 | Modified db pages 0 78 | Pending reads 0 79 | Pending writes: LRU 0, flush list 0, single page 0 80 | Pages read 33, created 15, written 54 81 | 0.00 reads/s, 0.00 creates/s, 0.00 writes/s 82 | No buffer pool page gets since the last printout 83 | -------------- 84 | ROW OPERATIONS 85 | -------------- 86 | 0 queries inside InnoDB, 0 queries in queue 87 | 1 read views open inside InnoDB 88 | Main thread process no. 5202, id 1140881728, state: waiting for server activity 89 | Number of rows inserted 0, updated 0, deleted 0, read 0 90 | 0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s 91 | ---------------------------- 92 | END OF INNODB MONITOR OUTPUT 93 | ============================ 94 | -------------------------------------------------------------------------------- /t/cacti/samples/innodb-016.txt: -------------------------------------------------------------------------------- 1 | ===================================== 2 | 120125 6:06:34 INNODB MONITOR OUTPUT 3 | ===================================== 4 | Per second averages calculated from the last 20 seconds 5 | ----------------- 6 | BACKGROUND THREAD 7 | ----------------- 8 | srv_master_thread loops: 1 1_second, 1 sleeps, 0 10_second, 1 background, 1 flush 9 | srv_master_thread log flush and writes: 1 10 | ---------- 11 | SEMAPHORES 12 | ---------- 13 | OS WAIT ARRAY INFO: reservation count 2, signal count 3 14 | Mutex spin waits 1, rounds 11, OS waits 4 15 | RW-shared spins 5, rounds 60, OS waits 22 16 | RW-excl spins 9, rounds 13, OS waits 82 17 | Spin rounds per wait: 11.00 mutex, 30.00 RW-shared, 0.00 RW-excl 18 | ------------ 19 | TRANSACTIONS 20 | ------------ 21 | Trx id counter 500 22 | Purge done for trx's n:o < 10 undo n:o < 0 23 | History list length 0 24 | LIST OF TRANSACTIONS FOR EACH SESSION: 25 | ---TRANSACTION 0, not started 26 | MySQL thread id 27, OS thread handle 0x10c490000, query id 89 localhost 127.0.0.1 root 27 | show engine innodb status 28 | -------- 29 | FILE I/O 30 | -------- 31 | I/O thread 0 state: waiting for i/o request (insert buffer thread) 32 | I/O thread 1 state: waiting for i/o request (log thread) 33 | I/O thread 2 state: waiting for i/o request (read thread) 34 | I/O thread 3 state: waiting for i/o request (read thread) 35 | I/O thread 4 state: waiting for i/o request (read thread) 36 | I/O thread 5 state: waiting for i/o request (read thread) 37 | I/O thread 6 state: waiting for i/o request (write thread) 38 | I/O thread 7 state: waiting for i/o request (write thread) 39 | I/O thread 8 state: waiting for i/o request (write thread) 40 | I/O thread 9 state: waiting for i/o request (write thread) 41 | Pending normal aio reads: 0 [0, 0, 0, 0] , aio writes: 0 [0, 0, 0, 0] , 42 | ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0 43 | Pending flushes (fsync) log: 0; buffer pool: 0 44 | 153 OS file reads, 3 OS file writes, 3 OS fsyncs 45 | 0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s 46 | ------------------------------------- 47 | INSERT BUFFER AND ADAPTIVE HASH INDEX 48 | ------------------------------------- 49 | Ibuf: size 1, free list len 0, seg size 2, 9 merges 50 | merged operations: 51 | insert 4, delete mark 6, delete 7 52 | discarded operations: 53 | insert 0, delete mark 0, delete 0 54 | Hash table size 276707, node heap has 0 buffer(s) 55 | 0.00 hash searches/s, 0.00 non-hash searches/s 56 | --- 57 | LOG 58 | --- 59 | Log sequence number 1595675 60 | Log flushed up to 1595675 61 | Last checkpoint at 1595675 62 | 0 pending log writes, 0 pending chkp writes 63 | 8 log i/o's done, 0.00 log i/o's/second 64 | ---------------------- 65 | BUFFER POOL AND MEMORY 66 | ---------------------- 67 | Total memory allocated 137363456; in additional pool allocated 0 68 | Dictionary memory allocated 33650 69 | Buffer pool size 8192 70 | Free buffers 8050 71 | Database pages 142 72 | Old database pages 0 73 | Modified db pages 0 74 | Pending reads 0 75 | Pending writes: LRU 0, flush list 0, single page 0 76 | Pages made young 0, not young 0 77 | 0.00 youngs/s, 0.00 non-youngs/s 78 | Pages read 142, created 0, written 0 79 | 0.00 reads/s, 0.00 creates/s, 0.00 writes/s 80 | No buffer pool page gets since the last printout 81 | Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s 82 | LRU len: 142, unzip_LRU len: 0 83 | I/O sum[0]:cur[0], unzip sum[0]:cur[0] 84 | -------------- 85 | ROW OPERATIONS 86 | -------------- 87 | 0 queries inside InnoDB, 0 queries in queue 88 | 1 read views open inside InnoDB 89 | Main thread id 4498919424, state: waiting for server activity 90 | Number of rows inserted 0, updated 0, deleted 0, read 0 91 | 0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s 92 | ---------------------------- 93 | END OF INNODB MONITOR OUTPUT 94 | ============================ 95 | -------------------------------------------------------------------------------- /docs/config/conf.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | import sys, os 4 | 5 | # Add any Sphinx extension module names here, as strings. They can be extensions 6 | # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. 7 | extensions = ['sphinx.ext.autodoc'] 8 | 9 | # Add any paths that contain templates here, relative to this directory. 10 | templates_path = ['_templates'] 11 | 12 | # Add any paths that contain custom static files (such as style sheets) here, 13 | # relative to this directory. They are copied after the builtin static files, 14 | # so a file named "default.css" will overwrite the builtin "default.css". 15 | html_static_path = [] 16 | 17 | # The suffix of source filenames. 18 | source_suffix = '.rst' 19 | 20 | # The master toctree document. 21 | master_doc = 'index' 22 | 23 | # General information about the project. 24 | project = u'$PROJECT_NAME$' 25 | copyright = u'Percona LLC and/or its affiliates 2009-2015' 26 | 27 | # The version info for the project you're documenting, acts as replacement for 28 | # |version| and |release|, also used in various other places throughout the 29 | # built documents. 30 | # 31 | # The short X.Y version. 32 | version = '$VERSION$' 33 | # The full version, including alpha/beta/rc tags. 34 | release = '$VERSION$' 35 | 36 | # List of patterns, relative to source directory, that match files and 37 | # directories to ignore when looking for source files. 38 | exclude_patterns = [] 39 | 40 | # The name of the Pygments (syntax highlighting) style to use. 41 | pygments_style = 'sphinx' 42 | 43 | # -- Options for HTML output --------------------------------------------------- 44 | 45 | # The theme to use for HTML and HTML Help pages. See the documentation for 46 | # a list of builtin themes. 47 | html_theme = 'percona-theme' 48 | html_theme_path = ['.', './percona-theme'] 49 | html_title = 'Percona Monitoring Plugins Documentation' 50 | html_short_title = 'Monitoring Plugins' 51 | 52 | html_favicon = 'percona_favicon.ico' 53 | 54 | #html_last_updated_fmt = '' 55 | 56 | # If true, links to the reST sources are added to the pages. 57 | html_show_sourcelink = False 58 | 59 | # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. 60 | html_show_sphinx = False 61 | 62 | # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. 63 | #html_show_copyright = True 64 | 65 | # If true, an OpenSearch description file will be output, and all pages will 66 | # contain a tag referring to it. The value of this option must be the 67 | # base URL from which the finished HTML is served. 68 | #html_use_opensearch = '' 69 | 70 | # This is the file name suffix for HTML files (e.g. ".xhtml"). 71 | #html_file_suffix = None 72 | 73 | # Output file base name for HTML help builder. 74 | htmlhelp_basename = 'PerconaMonitoringPluginsdoc' 75 | 76 | 77 | # -- Options for LaTeX output -------------------------------------------------- 78 | 79 | # The paper size ('letter' or 'a4'). 80 | #latex_paper_size = 'letter' 81 | 82 | # The font size ('10pt', '11pt' or '12pt'). 83 | #latex_font_size = '10pt' 84 | 85 | # Grouping the document tree into LaTeX files. List of tuples 86 | # (source start file, target name, title, author, documentclass [howto/manual]). 87 | latex_documents = [ 88 | ('index', 'PerconaMonitoringPlugins.tex', u'Percona Monitoring Plugins Documentation', 89 | '', 'manual'), 90 | ] 91 | 92 | # The name of an image file (relative to this directory) to place at the top of 93 | # the title page. 94 | latex_logo = 'percona-logo.jpg' 95 | 96 | # -- Options for manual page output -------------------------------------------- 97 | 98 | # One entry per manual page. List of tuples 99 | # (source start file, name, description, authors, manual section). 100 | man_pages = [ 101 | ('index', 'perconamonitoringplugins', u'Percona Monitoring Plugins Documentation', 102 | [u'Percona Inc'], 1) 103 | ] 104 | -------------------------------------------------------------------------------- /t/cacti/samples/innodb-013.txt: -------------------------------------------------------------------------------- 1 | ===================================== 2 | 091027 21:13:23 INNODB MONITOR OUTPUT 3 | ===================================== 4 | Per second averages calculated from the last 17 seconds 5 | ---------- 6 | BACKGROUND THREAD 7 | ---------- 8 | srv_master_thread loops: 1 1_second, 1 sleeps, 0 10_second, 2 background, 2 flush 9 | srv_master_thread log flush and writes: 1 log writes only: 5 10 | ---------- 11 | SEMAPHORES 12 | ---------- 13 | OS WAIT ARRAY INFO: reservation count 2, signal count 2 14 | Mutex spin waits 0, rounds 0, OS waits 0 15 | RW-shared spins 3, OS waits 1; RW-excl spins 0, OS waits 0 16 | Spin rounds per wait: 0.00 mutex, 30.00 RW-shared, 0.00 RW-excl 17 | -------- 18 | FILE I/O 19 | -------- 20 | I/O thread 0 state: waiting for i/o request (insert buffer thread) 21 | I/O thread 1 state: waiting for i/o request (log thread) 22 | I/O thread 2 state: waiting for i/o request (read thread) 23 | I/O thread 3 state: waiting for i/o request (read thread) 24 | I/O thread 4 state: waiting for i/o request (read thread) 25 | I/O thread 5 state: waiting for i/o request (read thread) 26 | I/O thread 6 state: waiting for i/o request (write thread) 27 | I/O thread 7 state: waiting for i/o request (write thread) 28 | I/O thread 8 state: waiting for i/o request (write thread) 29 | I/O thread 9 state: waiting for i/o request (write thread) 30 | Pending normal aio reads: 0, aio writes: 0, 31 | ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0 32 | Pending flushes (fsync) log: 0; buffer pool: 0 33 | 26 OS file reads, 7 OS file writes, 7 OS fsyncs 34 | 0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s 35 | ------------------------------------- 36 | INSERT BUFFER AND ADAPTIVE HASH INDEX 37 | ------------------------------------- 38 | Ibuf: size 1, free list len 0, seg size 2, 39 | 0 inserts, 0 merged recs, 0 merges 40 | Hash table size 276671, node heap has 0 buffer(s) 41 | 0.00 hash searches/s, 0.00 non-hash searches/s 42 | --- 43 | LOG 44 | --- 45 | Log sequence number 44254 46 | Log flushed up to 44254 47 | Last checkpoint at 44254 48 | Max checkpoint age 7782360 49 | Modified age 0 50 | Checkpoint age 0 51 | 0 pending log writes, 0 pending chkp writes 52 | 10 log i/o's done, 0.00 log i/o's/second 53 | ---------------------- 54 | BUFFER POOL AND MEMORY 55 | ---------------------- 56 | Total memory allocated 137625600; in additional pool allocated 0 57 | Internal hash tables (constant factor + variable factor) 58 | Adaptive hash index 2217576 (2213368 + 4208) 59 | Page hash 139112 60 | Dictionary cache 584488 (554768 + 29720) 61 | File system 83520 (82672 + 848) 62 | Lock system 333240 (332872 + 368) 63 | Recovery system 0 (0 + 0) 64 | Threads 83016 (82696 + 320) 65 | Dictionary memory allocated 29720 66 | Buffer pool size 8191 67 | Buffer pool size, bytes 134201344 68 | Free buffers 8176 69 | Database pages 15 70 | Modified db pages 0 71 | Pending reads 0 72 | Pending writes: LRU 0, flush list 0, single page 0 73 | Pages read 16, created 0, written 1 74 | 0.00 reads/s, 0.00 creates/s, 0.00 writes/s 75 | No buffer pool page gets since the last printout 76 | LRU len: 15, unzip_LRU len: 0 77 | I/O sum[0]:cur[0], unzip sum[0]:cur[0] 78 | -------------- 79 | ROW OPERATIONS 80 | -------------- 81 | 0 queries inside InnoDB, 0 queries in queue 82 | 1 read views open inside InnoDB 83 | Main thread process no. 2173, id 1191237952, state: waiting for server activity 84 | Number of rows inserted 0, updated 0, deleted 0, read 0 85 | 0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s 86 | ------------ 87 | TRANSACTIONS 88 | ------------ 89 | Trx id counter 501 90 | Purge done for trx's n:o < 0 undo n:o < 0 91 | History list length 0 92 | LIST OF TRANSACTIONS FOR EACH SESSION: 93 | ---TRANSACTION 0, not started, process no 2173, OS thread id 1191770432 94 | MySQL thread id 1, query id 2 localhost root 95 | show innodb status 96 | ---------------------------- 97 | END OF INNODB MONITOR OUTPUT 98 | ============================ 99 | -------------------------------------------------------------------------------- /t/cacti/samples/innodb-002.txt: -------------------------------------------------------------------------------- 1 | ===================================== 2 | 090507 15:57:51 INNODB MONITOR OUTPUT 3 | ===================================== 4 | Per second averages calculated from the last 27 seconds 5 | ---------- 6 | SEMAPHORES 7 | ---------- 8 | OS WAIT ARRAY INFO: reservation count 4694218, signal count 9295635 9 | Mutex spin waits 79626940, rounds 157459864, OS waits 698719 10 | RW-shared spins 3859028, OS waits 2100750; RW-excl spins 4641946, OS waits 1530310 11 | Spin rounds per wait: 1.98 mutex, 14.39 RW-shared, 13.15 RW-excl 12 | -------- 13 | FILE I/O 14 | -------- 15 | I/O thread 0 state: waiting for i/o request (insert buffer thread) 16 | I/O thread 1 state: waiting for i/o request (log thread) 17 | I/O thread 2 state: waiting for i/o request (read thread) 18 | I/O thread 3 state: waiting for i/o request (write thread) 19 | Pending normal aio reads: 1, aio writes: 2, 20 | ibuf aio reads: 1, log i/o's: 2, sync i/o's: 3 21 | Pending flushes (fsync) log: 1; buffer pool: 2 22 | 8782182 OS file reads, 15635445 OS file writes, 947800 OS fsyncs 23 | 28.41 reads/s, 25569 avg bytes/read, 23.00 writes/s, 2.26 fsyncs/s 24 | ------------------------------------- 25 | INSERT BUFFER AND ADAPTIVE HASH INDEX 26 | ------------------------------------- 27 | Ibuf: size 10204, free list len 157151, seg size 167356, 28 | 17549044 inserts, 15956910 merged recs, 1676050 merges 29 | Hash table size 57374437, node heap has 72964 buffer(s) 30 | 639.20 hash searches/s, 1370.02 non-hash searches/s 31 | --- 32 | LOG 33 | --- 34 | Log sequence number 13093949495856 35 | Log flushed up to 13093948219327 36 | Last checkpoint at 13093217877062 37 | Max checkpoint age 847455806 38 | Modified age 731618794 39 | Checkpoint age 731618794 40 | 1 pending log writes, 2 pending chkp writes 41 | 3430041 log i/o's done, 17.44 log i/o's/second 42 | ---------------------- 43 | BUFFER POOL AND MEMORY 44 | ---------------------- 45 | Total memory allocated 29642194944; in additional pool allocated 0 46 | Internal hash tables (constant factor + variable factor) 47 | Adaptive hash index 1654507416 (458995496 + 1195511920) 48 | Page hash 28688008 49 | Dictionary cache 116312344 (114750928 + 1561416) 50 | File system 172560 (82672 + 89888) 51 | Lock system 71719560 (71718824 + 736) 52 | Recovery system 0 (0 + 0) 53 | Threads 407576 (406936 + 640) 54 | Dictionary memory allocated 1561416 55 | Buffer pool size 1769471 56 | Buffer pool size, bytes 28991012864 57 | Free buffers 1 58 | Database pages 1696503 59 | Modified db pages 160602 60 | Pending reads 0 61 | Pending writes: LRU 0, flush list 0, single page 0 62 | Pages read 15240822, created 1770238, written 21705836 63 | 44.37 reads/s, 2.15 creates/s, 21.18 writes/s 64 | Buffer pool hit rate 994 / 1000 65 | LRU len: 1696503, unzip_LRU len: 0 66 | I/O sum[2417]:cur[4], unzip sum[0]:cur[0] 67 | -------------- 68 | ROW OPERATIONS 69 | -------------- 70 | 1 queries inside InnoDB, 2 queries in queue 71 | 1 read views open inside InnoDB 72 | Main thread process no. 13510, id 1169914176, state: sleeping 73 | Number of rows inserted 50678311, updated 66425915, deleted 20605903, read 454561562 74 | 59.55 inserts/s, 434.35 updates/s, 35.15 deletes/s, 469.46 reads/s 75 | ------------ 76 | TRANSACTIONS 77 | ------------ 78 | Trx id counter EF861B144C 79 | Purge done for trx's n:o < 861B135D undo n:o < 0 80 | History list length 132 81 | LIST OF TRANSACTIONS FOR EACH SESSION: 82 | ---TRANSACTION 0, not started, process no 13510, OS thread id 1170446656 83 | MySQL thread id 8561, query id 79637659 linux.trioptima.com 192.168.33.253 mysqltop 84 | show innodb status 85 | ---TRANSACTION 861B144A, not started, process no 13510, OS thread id 1171245376 86 | MySQL thread id 4096, query id 79637665 Has read all relay log; waiting for the slave I/O thread to update it 87 | ---------------------------- 88 | END OF INNODB MONITOR OUTPUT 89 | ============================ 90 | -------------------------------------------------------------------------------- /docs/cacti/rds-templates.rst: -------------------------------------------------------------------------------- 1 | .. _cacti_rds_templates: 2 | 3 | Percona Amazon RDS Monitoring Template for Cacti 4 | ================================================ 5 | 6 | This page gives installation instructions specific to the RDS graph template, 7 | shows examples of graphs in the RDS template collection, and shows what they 8 | do. 9 | 10 | Installation Notes 11 | ------------------ 12 | 13 | This template utilizes the Python script and ``boto`` module (Python interface 14 | to Amazon Web Services) to get various RDS metrics from CloudWatch. 15 | 16 | To make the script working, please follow the instructions: 17 | 18 | * Install the package: ``yum install python-boto`` or ``apt-get install python-boto`` 19 | * Create a config /etc/boto.cfg or ~cacti/.boto with your AWS API credentials. 20 | See http://code.google.com/p/boto/wiki/BotoConfig 21 | 22 | The script ``~cacti/scripts/ss_get_rds_stats.py`` that is run under ``cacti`` user 23 | should have permissions to read the config /etc/boto.cfg or ~cacti/.boto. 24 | 25 | For example:: 26 | 27 | [root@centos6 ~]# cat /etc/boto.cfg 28 | [Credentials] 29 | aws_access_key_id = THISISATESTKEY 30 | aws_secret_access_key = thisisatestawssecretaccesskey 31 | 32 | If you do not use this config with other tools such as our Nagios plugin, 33 | you can secure this file the following way:: 34 | 35 | [root@centos6 ~]# chown cacti /etc/boto.cfg 36 | [root@centos6 ~]# chmod 600 /etc/boto.cfg 37 | 38 | **IMPORTANT:** If you decide to create ``~cacti/.boto`` instead, which is not secure 39 | as it falls under the web directory, ensure this file is not accessible from Web. 40 | Check out :ref:`Hardening Cacti setup ` guide. 41 | 42 | Test the script assuming DB instance identifier is ``blackbox``:: 43 | 44 | [root@centos6 ~]# sudo -u cacti ~cacti/scripts/ss_get_rds_stats.py --ident=blackbox --metric=CPUUtilization 45 | gh:6.53 46 | 47 | To check RDS details you can run:: 48 | 49 | [root@centos6 ~]# sudo -u cacti ~cacti/scripts/ss_get_rds_stats.py --ident=blackbox --print 50 | ... 51 | 52 | Now, you can add a device to the Cacti using Amazon RDS Server template and graph it. 53 | 54 | **NOTE**: you need to specify DB instance identifier as ``Hostname`` on adding device page. 55 | 56 | By default, the region is set to ``us-east-1``. You can re-define it globally in boto config or 57 | specify per instance on data source level in Cacti. You can also set region to ``all`` which will 58 | have the script to find region for a given instance automatically. However, this will work much slower 59 | than specifying region explicitly. 60 | 61 | Also you can specify boto profile name on data source level in Cacti in case you have multiple in use. 62 | 63 | Sample Graphs 64 | ------------- 65 | 66 | The following sample graphs demonstrate how the data is presented. 67 | 68 | .. image:: images/rds_binlog_disk_usage.png 69 | 70 | The amount of disk space occupied by binary logs on the master. 71 | 72 | .. image:: images/rds_cpu_utilization.png 73 | 74 | The percentage of CPU utilization. 75 | 76 | .. image:: images/rds_database_connections.png 77 | 78 | The number of database connections in use. 79 | 80 | .. image:: images/rds_disk_iops.png 81 | 82 | The average number of disk I/O operations per second. 83 | 84 | .. image:: images/rds_disk_latency.png 85 | 86 | The average amount of time taken per disk I/O operation. 87 | 88 | .. image:: images/rds_disk_queue_depth.png 89 | 90 | The number of outstanding IOs (read/write requests) waiting to access the disk. 91 | 92 | .. image:: images/rds_disk_throughput.png 93 | 94 | The average number of bytes read from/written to disk per second. 95 | 96 | .. image:: images/rds_memory.png 97 | 98 | The amount of used random access memory. The total available memory is the value 99 | according to the instance class. 100 | See http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html 101 | 102 | .. image:: images/rds_replica_lag.png 103 | 104 | The amount of time a Read Replica DB Instance lags behind the source DB Instance. 105 | 106 | .. image:: images/rds_storage_space.png 107 | 108 | The amount of used storage space. 109 | 110 | .. image:: images/rds_swap_usage.png 111 | 112 | The amount of swap space used on the DB Instance. 113 | 114 | -------------------------------------------------------------------------------- /t/nagios/pmp-check-mysql-deleted-files/samples/lsof-001.txt: -------------------------------------------------------------------------------- 1 | COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME 2 | mysqld 2159 mysql cwd DIR 253,0 4096 1147154 /var/lib/mysql 3 | mysqld 2159 mysql rtd DIR 253,0 4096 2 / 4 | mysqld 2159 mysql txt REG 253,0 7020332 1193496 /usr/libexec/mysqld 5 | mysqld 2159 mysql mem REG 253,0 610836 1193402 /usr/lib/libkrb5.so.3.3 6 | mysqld 2159 mysql mem REG 253,0 46680 3145768 /lib/libnss_files-2.5.so 7 | mysqld 2159 mysql mem REG 253,0 157304 1193401 /usr/lib/libk5crypto.so.3.1 8 | mysqld 2159 mysql mem REG 253,0 7880 3145731 /lib/libkeyutils-1.2.so 9 | mysqld 2159 mysql mem REG 253,0 33680 1193400 /usr/lib/libkrb5support.so.0.1 10 | mysqld 2159 mysql mem REG 253,0 7748 3145745 /lib/libcom_err.so.2.1 11 | mysqld 2159 mysql mem REG 253,0 190712 1193403 /usr/lib/libgssapi_krb5.so.2.2 12 | mysqld 2159 mysql mem REG 253,0 125736 3147322 /lib/ld-2.5.so 13 | mysqld 2159 mysql mem REG 253,0 1611564 3147323 /lib/libc-2.5.so 14 | mysqld 2159 mysql mem REG 253,0 16428 3147327 /lib/libdl-2.5.so 15 | mysqld 2159 mysql mem REG 253,0 129716 3147334 /lib/libpthread-2.5.so 16 | mysqld 2159 mysql mem REG 253,0 208352 3147326 /lib/libm-2.5.so 17 | mysqld 2159 mysql mem REG 253,0 245376 3147332 /lib/libsepol.so.1 18 | mysqld 2159 mysql mem REG 253,0 93508 3147333 /lib/libselinux.so.1 19 | mysqld 2159 mysql mem REG 253,0 44060 3147335 /lib/librt-2.5.so 20 | mysqld 2159 mysql mem REG 253,0 75028 1193303 /usr/lib/libz.so.1.2.3 21 | mysqld 2159 mysql mem REG 253,0 46636 3147328 /lib/libgcc_s-4.1.2-20080825.so.1 22 | mysqld 2159 mysql mem REG 253,0 45288 3147338 /lib/libcrypt-2.5.so 23 | mysqld 2159 mysql mem REG 253,0 936908 1189810 /usr/lib/libstdc++.so.6.0.8 24 | mysqld 2159 mysql mem REG 253,0 101404 3147342 /lib/libnsl-2.5.so 25 | mysqld 2159 mysql mem REG 253,0 76400 3147346 /lib/libresolv-2.5.so 26 | mysqld 2159 mysql mem REG 253,0 1296932 3147341 /lib/libcrypto.so.0.9.8e 27 | mysqld 2159 mysql mem REG 253,0 293108 3145752 /lib/libssl.so.0.9.8e 28 | mysqld 2159 mysql 0r CHR 1,3 1132 /dev/null 29 | mysqld 2159 mysql 1w REG 253,0 2741 1081665 /var/log/mysqld.log 30 | mysqld 2159 mysql 2w REG 253,0 2741 1081665 /var/log/mysqld.log 31 | mysqld 2159 mysql 3uW REG 253,0 10485760 1147207 /var/lib/mysql/ibdata1 32 | mysqld 2159 mysql 4u REG 253,0 0 2686979 /tmp/ibVANarW (deleted) 33 | mysqld 2159 mysql 5u REG 253,0 0 2686980 /tmp/ibsmCHGy (deleted) 34 | mysqld 2159 mysql 6u REG 253,0 0 2686981 /tmp/ibr2QeWa (deleted) 35 | mysqld 2159 mysql 7u REG 253,0 0 2686982 /tmp/ibc9nDcN (deleted) 36 | mysqld 2159 mysql 8uW REG 253,0 5242880 1147208 /var/lib/mysql/ib_logfile0 37 | mysqld 2159 mysql 9uW REG 253,0 5242880 1147209 /var/lib/mysql/ib_logfile1 38 | mysqld 2159 mysql 10u IPv4 6537 TCP *:mysql (LISTEN) 39 | mysqld 2159 mysql 11u REG 253,0 0 2686983 /tmp/ibX7zEzp (deleted) 40 | mysqld 2159 mysql 12u unix 0xcec4dac0 6538 /var/lib/mysql/mysql.sock 41 | mysqld 2159 mysql 13u REG 253,0 1024 1147160 /var/lib/mysql/mysql/host.MYI 42 | mysqld 2159 mysql 14u REG 253,0 0 1147161 /var/lib/mysql/mysql/host.MYD 43 | mysqld 2159 mysql 15u REG 253,0 2048 1147163 /var/lib/mysql/mysql/user.MYI 44 | mysqld 2159 mysql 16u REG 253,0 256 1147164 /var/lib/mysql/mysql/user.MYD 45 | mysqld 2159 mysql 17u REG 253,0 4096 1147157 /var/lib/mysql/mysql/db.MYI 46 | mysqld 2159 mysql 18u REG 253,0 876 1147158 /var/lib/mysql/mysql/db.MYD 47 | mysqld 2159 mysql 19u REG 253,0 1024 1147169 /var/lib/mysql/mysql/tables_priv.MYI 48 | mysqld 2159 mysql 20u REG 253,0 0 1147170 /var/lib/mysql/mysql/tables_priv.MYD 49 | mysqld 2159 mysql 21u REG 253,0 1024 1147172 /var/lib/mysql/mysql/columns_priv.MYI 50 | mysqld 2159 mysql 22u REG 253,0 0 1147173 /var/lib/mysql/mysql/columns_priv.MYD 51 | mysqld 2159 mysql 23u REG 253,0 1024 1147205 /var/lib/mysql/mysql/procs_priv.MYI 52 | mysqld 2159 mysql 24u REG 253,0 0 1147206 /var/lib/mysql/mysql/procs_priv.MYD 53 | mysqld 2159 mysql 25u unix 0xc9eb5200 135265 /var/lib/mysql/mysql.sock 54 | -------------------------------------------------------------------------------- /docs/nagios/index.rst: -------------------------------------------------------------------------------- 1 | .. _nagios_overview: 2 | 3 | Percona Monitoring Plugins for Nagios 4 | ===================================== 5 | 6 | Many of the freely available Nagios plugins for MySQL are poor quality, with no 7 | formal testing and without good documentation. A more serious problem, however, 8 | is that they are not created by experts in MySQL monitoring, so they tend to 9 | cause false alarms and noise, and don't encourage good practices to monitor what 10 | matters. 11 | 12 | These plugins offer the following improvements: 13 | 14 | * Created by MySQL experts. 15 | * Good documentation. 16 | * Support for the newest versions of MySQL and InnoDB. 17 | * Integration with other Percona software, such as Percona Server and Percona Toolkit. 18 | * Easy to install and configure. 19 | * Real software engineering! There is a test suite, to keep the code high quality. 20 | 21 | The plugins are designed to be executed locally or via NRPE. Most large 22 | installations should probably use NRPE for security and scalability. 23 | 24 | In general, the plugins either examine the local UNIX system and execute 25 | commands, or they connect to MySQL via the ``mysql`` commandline executable and 26 | retrieve information. Some plugins combine these actions. Each plugin's 27 | documentation explains its commandline options and arguments, as well as the 28 | commands executed and the privileges required. 29 | 30 | System Requirements 31 | =================== 32 | 33 | The plugins are all written in standard Unix shell script. They should run on 34 | any Unix or Unix-like operating system, such as GNU/Linux, Solaris, or FreeBSD. 35 | 36 | The plugins are designed to be used with MySQL 5.0 and newer versions, but they 37 | may work on 4.1 or older versions as well. 38 | 39 | Installation Instructions 40 | ========================= 41 | You can download the tarball from the `Percona Software Downloads 42 | `_ 43 | directory or install the package from `Percona Software Repositories 44 | `_:: 45 | 46 | yum install percona-nagios-plugins 47 | 48 | or:: 49 | 50 | apt-get install percona-nagios-plugins 51 | 52 | Configuration Best Practices 53 | ============================ 54 | 55 | These plugins can be used locally or via NRPE. NRPE is the suggested 56 | configuration. Some plugins execute commands that require privileges, so you 57 | may need to specify a command prefix to execute them with ``sudo``. 58 | 59 | For security reasons, it is recommended to not pass MySQL access credentials in 60 | the arguments. You can create /etc/nagios/mysql.cnf and the plugins will use it 61 | like the default .my.cnf file. For example:: 62 | 63 | [root@centos6 ~]# cat /etc/nagios/mysql.cnf 64 | [client] 65 | user = root 66 | password = s3cret 67 | [root@centos6 ~]# chown root:nagios /etc/nagios/mysql.cnf 68 | [root@centos6 ~]# chmod 640 /etc/nagios/mysql.cnf 69 | 70 | Also with MySQL 5.6 client you can use the login-path instead of the password 71 | or .my.cnf, /etc/nagios/mysql.cnf files. For this, you need to specify ``-L`` 72 | option, e.g. ``-L safelogin``. The actual .mylogin.cnf file should be created 73 | with ``mysql_config_editor`` tool and in case of Nagios, placed into nagios user 74 | home directory. 75 | 76 | Here you can find an excerpt of potential Nagios config :download:`click here `. 77 | 78 | And here is an excerpt of related NRPE config:: 79 | 80 | command[rdba_unix_memory]=/usr/lib64/nagios/plugins/pmp-check-unix-memory -d -w 96 -c 98 81 | command[rdba_mysql_pidfile]=/usr/lib64/nagios/plugins/pmp-check-mysql-pidfile 82 | 83 | 84 | Support Options 85 | =============== 86 | 87 | If you have questions, comments, or need help with the plugins, there are 88 | several options to consider. 89 | 90 | You can get self-service help via `Percona's forums 91 | `_, or the `Percona mailing list 92 | `_. 93 | 94 | You can report bugs and submit patches to the `Launchpad project 95 | `_. 96 | 97 | If you need help with installation, troubleshooting, configuration, selecting 98 | services to monitor, deciding on appropriate thresholds, writing more plugins, 99 | extending or modifying existing plugins, or fixing bugs in plugins, you may wish 100 | to consider a `MySQL Support Contract `_ 101 | from Percona. These monitoring plugins are fully supported under all Percona 102 | contracts. 103 | 104 | List of Plugins 105 | =============== 106 | 107 | .. toctree:: 108 | :maxdepth: 1 109 | :glob: 110 | 111 | pmp-* 112 | -------------------------------------------------------------------------------- /t/cacti/samples/proc_stat-002.txt: -------------------------------------------------------------------------------- 1 | cpu 2261920 38824 986335 39683698 62368 19193 8499 0 0 2 | cpu0 939072 15594 400977 20055708 8074 2510 848 0 0 3 | cpu1 1322847 23229 585358 19627990 54293 16683 7650 0 0 4 | intr 87480486 44711995 60585 0 0 0 0 0 0 0 406767 0 0 1784040 0 603177 0 589288 85761 3352351 2 0 629886 329031 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 | ctxt 125521467 6 | btime 1261575183 7 | processes 239810 8 | procs_running 2 9 | procs_blocked 0 10 | -------------------------------------------------------------------------------- /t/nagios/pmp-check-mysql-innodb/samples/innodb-status-002.txt: -------------------------------------------------------------------------------- 1 | *************************** 1. row *************************** 2 | Type: InnoDB 3 | Name: 4 | Status: 5 | ===================================== 6 | 120206 9:30:53 INNODB MONITOR OUTPUT 7 | ===================================== 8 | Per second averages calculated from the last 25 seconds 9 | ----------------- 10 | BACKGROUND THREAD 11 | ----------------- 12 | srv_master_thread loops: 14 1_second, 14 sleeps, 1 10_second, 4 background, 4 flush 13 | srv_master_thread log flush and writes: 14 14 | ---------- 15 | SEMAPHORES 16 | ---------- 17 | OS WAIT ARRAY INFO: reservation count 3, signal count 3 18 | Mutex spin waits 0, rounds 0, OS waits 0 19 | RW-shared spins 3, OS waits 3; RW-excl spins 0, OS waits 0 20 | Spin rounds per wait: 0.00 mutex, 30.00 RW-shared, 0.00 RW-excl 21 | ------------ 22 | TRANSACTIONS 23 | ------------ 24 | Trx id counter 1007 25 | Purge done for trx's n:o < 1004 undo n:o < 0 26 | History list length 20 27 | LIST OF TRANSACTIONS FOR EACH SESSION: 28 | ---TRANSACTION 0, not started, process no 4937, OS thread id 2831498048 29 | MySQL thread id 3, query id 22 localhost 127.0.0.1 root 30 | show innodb status 31 | ---TRANSACTION 1006, ACTIVE 22 sec, process no 4937, OS thread id 2831698752 starting index read 32 | mysql tables in use 1, locked 1 33 | LOCK WAIT 2 lock struct(s), heap size 320, 1 row lock(s) 34 | MySQL thread id 2, query id 20 localhost 127.0.0.1 root Sending data 35 | select * from t for update 36 | ------- TRX HAS BEEN WAITING 22 SEC FOR THIS LOCK TO BE GRANTED: 37 | RECORD LOCKS space id 0 page no 594 n bits 72 index `PRIMARY` of table `test`.`t` trx id 1006 lock_mode X waiting 38 | Record lock, heap no 2 PHYSICAL RECORD: n_fields 3; compact format; info bits 0 39 | 0: len 4; hex 80000000; asc ;; 40 | 1: len 6; hex 000000001001; asc ;; 41 | 2: len 7; hex 800000002d0110; asc - ;; 42 | 43 | ------------------ 44 | ---TRANSACTION 1004, ACTIVE 40 sec, process no 4937, OS thread id 2831899456 45 | 2 lock struct(s), heap size 320, 1 row lock(s) 46 | MySQL thread id 1, query id 14 localhost 127.0.0.1 root 47 | -------- 48 | FILE I/O 49 | -------- 50 | I/O thread 0 state: waiting for i/o request (insert buffer thread) 51 | I/O thread 1 state: waiting for i/o request (log thread) 52 | I/O thread 2 state: waiting for i/o request (read thread) 53 | I/O thread 3 state: waiting for i/o request (read thread) 54 | I/O thread 4 state: waiting for i/o request (read thread) 55 | I/O thread 5 state: waiting for i/o request (read thread) 56 | I/O thread 6 state: waiting for i/o request (write thread) 57 | I/O thread 7 state: waiting for i/o request (write thread) 58 | I/O thread 8 state: waiting for i/o request (write thread) 59 | I/O thread 9 state: waiting for i/o request (write thread) 60 | Pending normal aio reads: 0, aio writes: 0, 61 | ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0 62 | Pending flushes (fsync) log: 0; buffer pool: 0 63 | 28 OS file reads, 17 OS file writes, 12 OS fsyncs 64 | 0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s 65 | ------------------------------------- 66 | INSERT BUFFER AND ADAPTIVE HASH INDEX 67 | ------------------------------------- 68 | Ibuf: size 1, free list len 0, seg size 2, 69 | 0 inserts, 0 merged recs, 0 merges 70 | Hash table size 553193, node heap has 1 buffer(s) 71 | 0.00 hash searches/s, 0.00 non-hash searches/s 72 | --- 73 | LOG 74 | --- 75 | Log sequence number 7285308 76 | Log flushed up to 7285308 77 | Last checkpoint at 7285308 78 | 0 pending log writes, 0 pending chkp writes 79 | 13 log i/o's done, 0.00 log i/o's/second 80 | ---------------------- 81 | BUFFER POOL AND MEMORY 82 | ---------------------- 83 | Total memory allocated 135921664; in additional pool allocated 0 84 | Dictionary memory allocated 17801 85 | Buffer pool size 8191 86 | Free buffers 8172 87 | Database pages 18 88 | Old database pages 0 89 | Modified db pages 0 90 | Pending reads 0 91 | Pending writes: LRU 0, flush list 0, single page 0 92 | Pages made young 0, not young 0 93 | 0.00 youngs/s, 0.00 non-youngs/s 94 | Pages read 17, created 1, written 15 95 | 0.00 reads/s, 0.00 creates/s, 0.00 writes/s 96 | Buffer pool hit rate 1000 / 1000, young-making rate 0 / 1000 not 0 / 1000 97 | Pages read ahead 0.00/s, evicted without access 0.00/s 98 | LRU len: 18, unzip_LRU len: 0 99 | I/O sum[0]:cur[0], unzip sum[0]:cur[0] 100 | -------------- 101 | ROW OPERATIONS 102 | -------------- 103 | 0 queries inside InnoDB, 0 queries in queue 104 | 1 read views open inside InnoDB 105 | Main thread process no. 4937, id 2826009408, state: waiting for server activity 106 | Number of rows inserted 3, updated 0, deleted 0, read 4 107 | 0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s 108 | ---------------------------- 109 | END OF INNODB MONITOR OUTPUT 110 | ============================ 111 | 112 | -------------------------------------------------------------------------------- /docs/zabbix/index.rst: -------------------------------------------------------------------------------- 1 | .. _zabbix_overview: 2 | 3 | Percona Monitoring Plugins for Zabbix 4 | ===================================== 5 | 6 | These templates are mainly adopted from the existing :ref:`Cacti ones `. 7 | Currently, only MySQL template is available. 8 | 9 | There are a few major differences between Cacti and Zabbix templates: 10 | 11 | * Zabbix does not support negative Y axis, that's why you can see the negative 12 | values on some graphs to work out that - consider them the same as positive ones. 13 | * Zabbix does not support stacked graph items with mixed draw styles, that's why 14 | some graphs may not look so nice like in Cacti as the stacks are replaced with lines. 15 | 16 | Other Zabbix specific points: 17 | 18 | * The items are populated by polling Zabbix agent. 19 | * There are predefined triggers available to use. 20 | * There is a screen as a placeholder for all graphs. 21 | * 300 sec. polling interval - like with Cacti, the existing PHP script is used to 22 | retrive and cache MySQL metrics except some trigger-specific items. Due to the 23 | caching of results, PHP script runs only once per period. 24 | 25 | System Requirements 26 | =================== 27 | 28 | * Zabbix version 2.0.x. The actual testing has been done on the version 2.0.9. 29 | * Zabbix agent, php, php-mysql packages on monitored node. 30 | 31 | Installation Instructions 32 | ========================= 33 | 34 | Configure Zabbix Agent 35 | ---------------------- 36 | 37 | 1. Install the package from `Percona Software Repositories 38 | `_:: 39 | 40 | yum install percona-zabbix-templates 41 | 42 | or:: 43 | 44 | apt-get install percona-zabbix-templates 45 | 46 | It will place files under ``/var/lib/zabbix/percona/``. Alternatively, you can 47 | grab the tarball and copy folders ``zabbix/scripts/`` and ``zabbix/templates/`` 48 | into ``/var/lib/zabbix/percona/``. See below for the URL. 49 | 50 | 2. Copy Zabbix Agent config:: 51 | 52 | mkdir -p /etc/zabbix_agentd.conf.d/ 53 | cp /var/lib/zabbix/percona/templates/userparameter_percona_mysql.conf /etc/zabbix_agentd.conf.d/userparameter_percona_mysql.conf 54 | 55 | 3. Ensure /etc/zabbix_agentd.conf contains the line: ``Include=/etc/zabbix_agentd.conf.d/`` 56 | 57 | 4. Restart Agent:: 58 | 59 | service zabbix-agent restart 60 | 61 | Configure MySQL connectivity on Agent 62 | ------------------------------------- 63 | On this step we need to configure and verify MySQL connectivity with localhost on 64 | the Agent node. 65 | 66 | 1. Create .cnf file ``/var/lib/zabbix/percona/scripts/ss_get_mysql_stats.php.cnf`` 67 | as described at :ref:`configuration file ` 68 | 69 | Example:: 70 | 71 | `_ 108 | directory to your desktop. 109 | 110 | 2. Unpack it to get ``zabbix/templates/`` folder. 111 | 112 | 3. Import the XML template using Zabbix UI (Configuration -> Templates -> Import) 113 | by additionally choosing "Screens". 114 | 115 | 4. Create/edit hosts by assigning them "Percona Templates" group and linking the template 116 | "Percona MySQL Server Template" (Templates tab). 117 | 118 | You are done. 119 | 120 | Support Options 121 | =============== 122 | 123 | If you have questions, comments, or need help with the plugins, there are 124 | several options to consider. 125 | 126 | You can get self-service help via `Percona's forums 127 | `_, or the `Percona mailing list 128 | `_. 129 | 130 | You can report bugs and submit patches to the `Launchpad project 131 | `_. 132 | 133 | -------------------------------------------------------------------------------- /docs/index.rst: -------------------------------------------------------------------------------- 1 | Percona Monitoring Plugins 2 | ========================== 3 | 4 | .. important:: 5 | 6 | Effective August 1, 2020, Percona is moving the Percona Monitoring Plugins to end of life status. This means that no new versions, enhancements, bug fixes, or security updates will be released. The software will continue to be available at our download site (https://www.percona.com/downloads/percona-monitoring-plugins/LATEST/). 7 | 8 | The Monitoring Plugins provide a suite of predefined monitoring tools for use with other monitoring products. Since the release of Percona Monitoring and Management (https://www.percona.com/software/database-tools/percona-monitoring-and-management) , the Monitoring Plugins became redundant. 9 | 10 | We thank all of the users of Percona Monitoring Plugins for their support over the years and are happy to discuss alternatives. Please contact info@percona.com for more information. 11 | 12 | 13 | The Percona Monitoring Plugins are high-quality components to add 14 | enterprise-grade MySQL capabilities to your existing in-house, on-premises 15 | monitoring solutions. The components are designed to integrate seamlessly with 16 | widely deployed solutions such as Nagios, Cacti and Zabbix, and are delivered in 17 | the form of templates, plugins, and scripts. 18 | 19 | .. image:: zabbix/images/nagios-zabbix-cacti.png 20 | 21 | At Percona, our experience helping customers with emergencies informs our 22 | monitoring strategies. We have analyzed a large database of emergency issues, 23 | and used that to determine the best conditions to monitor. You can read about 24 | our suggested approaches to monitoring in our `white papers 25 | `_. 26 | 27 | Monitoring generally takes two forms: 28 | 29 | * Fault detection. 30 | 31 | Fault detection notifies you when systems become unhealthy or unavailable. 32 | In general, fault detection monitoring tends to fail because of false alarms, 33 | which cause personnel to ignore the alerts or not notice when the monitoring 34 | system itself fails. As a result, it is very important to choose very 35 | carefully when you monitor for faults: monitor only on actionable conditions 36 | that are not prone to false positives, and definitely indicate a problem, but 37 | do not duplicate other information or tell you something you already know. 38 | The classic example of a poor-quality check is a cache hit ratio, or a 39 | threshold such as the number of sort merges per second. 40 | 41 | * Metrics collection and graphing. 42 | 43 | By contrast to fault detection, it is a good idea to collect and store as 44 | much performance and status information about the systems as possible, for as 45 | long as possible, and to have a means of visualizing it as graphs or charts. 46 | These are good to glance at periodically, but they are really most useful 47 | when you are trying to diagnose a condition whose existence you have already 48 | identified. For example, if you see a period of degraded service on one 49 | chart, you might look at other charts to try to determine what changed during 50 | that period. 51 | 52 | In summary, you should alert as much as you need, no more no less, and prefer 53 | fewer alerts on broader conditions. You should never ignore an alert. But you 54 | should collect as many metrics as possible, and ignore most of them until you 55 | need them. 56 | 57 | We make our monitoring components freely available under the GNU GPL. If you 58 | would like help setting up the components, integrating them into your 59 | environment, choosing alerts, or any other task, Percona consulting and support 60 | staff can help. 61 | 62 | You can download the Percona Monitoring Plugins from the `Percona Software 63 | Downloads `_ 64 | directory, including our `Apt and Yum repositories 65 | `_. For specific installation 66 | instructions, read the detailed documentation on each type of components below. 67 | 68 | Plugins for Nagios 69 | ================== 70 | 71 | Nagios is the most widely-used open-source fault-detection system, with advanced 72 | features such as escalation, dependencies, and flexible notification rules. 73 | 74 | .. toctree:: 75 | :maxdepth: 2 76 | 77 | nagios/index 78 | 79 | .. _templates_for_cacti: 80 | 81 | Templates for Cacti 82 | =================== 83 | 84 | Cacti is a popular PHP- and MySQL-based web front-end to RRDTool, providing 85 | intuitive point-and-click configuration and browsing of graphs and metrics. 86 | 87 | .. toctree:: 88 | :maxdepth: 1 89 | 90 | cacti/index 91 | cacti/faq 92 | cacti/installing-templates 93 | cacti/customizing-templates 94 | cacti/mysql-templates 95 | cacti/galera-templates 96 | cacti/ssh-based-templates 97 | cacti/apache-templates 98 | cacti/jmx-templates 99 | cacti/linux-templates 100 | cacti/memcached-templates 101 | cacti/mongodb-templates 102 | cacti/nginx-templates 103 | cacti/openvz-templates 104 | cacti/redis-templates 105 | cacti/rds-templates 106 | cacti/developer-documentation 107 | cacti/hardening-cacti-setup 108 | cacti/upgrading-templates 109 | 110 | Templates for Zabbix 111 | ==================== 112 | 113 | Zabbix is an enterprise-class open source distributed monitoring solution 114 | for networks and applications. 115 | 116 | .. toctree:: 117 | :maxdepth: 1 118 | 119 | zabbix/index 120 | 121 | Changelog 122 | ========= 123 | 124 | .. toctree:: 125 | :maxdepth: 2 126 | 127 | changelog 128 | -------------------------------------------------------------------------------- /docs/cacti/customizing-templates.rst: -------------------------------------------------------------------------------- 1 | .. _cacti_customizing_templates: 2 | 3 | Customizing Percona Monitoring Plugins for Cacti 4 | ================================================ 5 | 6 | The templates that are included in the release packages are generic, designed to 7 | be suitable for default installations. However, if they don't meet your needs, 8 | you can generate your own easily. 9 | 10 | It is important to note that these templates are designed to avoid the problems 11 | caused by modifying templates within Cacti and then exporting them. Instead of 12 | doing this, you should use the provided command-line tools to modify the 13 | templates before you import them. If you want to, you can modify them over and 14 | over again and keep re-importing them. Cacti will update its database to match 15 | the changes that you import. 16 | 17 | You can customize many aspects of the templates. The following sections will 18 | explain the possible customizations. All of these are possible simply by 19 | passing the correct options to the ``pmp-cacti-template`` command-line tool. 20 | 21 | Generating Templates 22 | -------------------- 23 | 24 | The process of generating a template is very simple. You simply execute the 25 | ``pmp-cacti-template`` program and give it the associated script and template 26 | definition file. For example, to create MySQL templates identical to the ones 27 | in the release file:: 28 | 29 | $ pmp-cacti-template --script scripts/ss_get_mysql_stats.php \ 30 | definitions/mysql.def > mysql-template.xml 31 | 32 | Generate Templates for a Specific Cacti Version 33 | ----------------------------------------------- 34 | 35 | Cacti templates are version-specific, because the hash identifiers that are used 36 | as GUIDs have a version number embedded in them. This can prevent templates 37 | exported from one version of Cacti from being imported to another, even if there 38 | is no real incompatibility. The ``--cactiver`` option to the ``pmp-cacti-template`` 39 | script will control this. 40 | 41 | The version numbers it understands are embedded in the program, and if you 42 | specify an illegal value, it'll let you know. The versions are 43 | forwards-compatible, so templates generated for an earlier version of Cacti 44 | should work on a newer version too. 45 | 46 | Accept Input in Each Data Source 47 | -------------------------------- 48 | 49 | If you want to specify command-line options to data sources, you can easily make 50 | certain command-line options for the script required per-graph. For example, 51 | let's suppose that you want to ensure the ``ss_get_mysql_stats.php`` script is 52 | executed with the ``--port`` command-line option. 53 | 54 | You can generate templates that require this. The option to use is ``--mpds``, 55 | which is short for "make per data source". You give it a comma-separated list 56 | of options. Here's an example with ``--port``:: 57 | 58 | pmp-cacti-template \ 59 | --script scripts/ss_get_mysql_stats.php definitions/mysql.def \ 60 | --mpds port > templates_requiring_port.xml 61 | 62 | Be aware that the SSH-based templates use ``--port`` to specify the SSH port, 63 | and ``--port2`` to connect to the resource you're graphing, so you might need to 64 | customize ``--port2``, not ``--port``. 65 | 66 | If you import the resulting XML file, and then edit a host to bind it to the 67 | "Percona MySQL Server HT" host template, when you create the graphs you'll be 68 | prompted to fill in a value for the port: 69 | 70 | .. image:: images/create-graphs-input-port.png 71 | 72 | Specifying a value for a port 73 | 74 | Specify a Different Graph Width or Height 75 | ----------------------------------------- 76 | 77 | The default size of the Cacti graphs is 120 pixels high by 500 pixels wide. If 78 | you would like to specify a different size, you can use the ``--graph_height`` and 79 | ``--graph_width`` options. For example:: 80 | 81 | $ pmp-cacti-template \ 82 | --script scripts/ss_get_mysql_stats.php definitions/mysql.def \ 83 | --graph_height 240 --graph_width 1000 > templates_240x1000.xml 84 | 85 | Specify a Different Name Prefix 86 | ------------------------------- 87 | 88 | The default naming convention for every item created by the templates starts 89 | with "Percona", the name of the item, and an abbreviation at the end, such as "DT" for 90 | Data Templates. This makes all the items sort together, and makes them 91 | distinctive so you don't confuse them with others that might be named similarly. 92 | If you want to specify a different prefix, you can use the ``--name_prefix`` option. 93 | For example, you might specify "Big" for templates that you want to generate at 94 | a larger size, as in the previous example. Then you'll have templates named 95 | like "Big MySQL Select Types GT". 96 | 97 | Specify a Different Polling Interval 98 | ------------------------------------ 99 | 100 | The default polling interval for most Cacti installations is 5 minutes, or 300 101 | seconds. The templates need to match the polling interval, because the RRD 102 | files are created for a specific polling interval. If you have configured Cacti 103 | to use a different interval, you can generate matching templates with the 104 | ``--poll_interval`` option, which accepts the number of seconds. 105 | 106 | Change the Default Maximum Permitted Value in RRD Files 107 | ------------------------------------------------------- 108 | 109 | The default maximum value that the RRD files will recognize as valid is used to 110 | detect garbage input and prevent spikes in graphs. By default, it is set to the 111 | size of a 64-bit unsigned integer. If you want rollover and out-of-bounds 112 | detection for 32-bit integer values, use the ``--smallint`` option. 113 | -------------------------------------------------------------------------------- /util/generate-nagios-config: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | set -u 5 | 6 | PRJ="Percona Monitoring Plugins" 7 | TEMP=$(mktemp "/tmp/${0##*/}-nagios-setup.XXXX") 8 | trap 'rm -rf "${TEMP}" >/dev/null 2>&1' EXIT 9 | read -e -p "Configuration file prefix to use [/etc/nagios/objects]: " DIR 10 | DIR="${DIR:-/etc/nagios/objects}" 11 | DIR="${DIR%/}" # Delete trailing slash. 12 | if [ ! -d "${DIR}" ]; then 13 | echo "${DIR} is not a directory" >&2 14 | exit 1 15 | fi 16 | touch "${DIR}/hosts.cfg" # Check permissions up front. 17 | 18 | CFG="${DIR}/hosts.cfg" 19 | if grep "${PRJ}" "${CFG}" >/dev/null 2>&1; then 20 | : TODO 21 | # TODO: check whether we've already done this step, and prompt whether to 22 | # skip it or not. 23 | fi 24 | cat <<-EOF >> "${CFG}" 25 | # #################################################################### 26 | # ${PRJ} Host Definitions 27 | # #################################################################### 28 | EOF 29 | echo -e "\033[34m # ##################################################\033[0m" 30 | echo -e "\033[34m # Creating\033[31m host\033[34m definitions\033[0m" 31 | echo -e "\033[34m # ##################################################\033[0m" 32 | while read -e -p "Enter a hostname, or blank if done: " host; do 33 | if [ -z "$host" ]; then 34 | break; 35 | fi 36 | read -e -p " Enter the IP or DNS address, or blank to use $host: " ip 37 | read -e -p " Enter the list of hostgroups, or blank for none: " hostgroups 38 | echo >> "${CFG}" 39 | cat <<-EOF >> "${CFG}" 40 | define host{ 41 | use linux-server 42 | host_name ${host} 43 | alias ${host} 44 | address ${ip:-${host}} 45 | ${hostgroups:+hostgroups ${hostgroups// /,}} 46 | } 47 | EOF 48 | done 49 | 50 | CFG="${DIR}/hostgroups.cfg" 51 | cat <<-EOF >> "${CFG}" 52 | # #################################################################### 53 | # ${PRJ} Host Group Definitions 54 | # #################################################################### 55 | EOF 56 | echo -e "\033[34m # ##################################################\033[0m" 57 | echo -e "\033[34m # Creating\033[31m hostgroup\033[34m definitions\033[0m" 58 | echo -e "\033[34m # ##################################################\033[0m" 59 | while read -e -p "Enter a hostgroup name, or blank if done: " hostgroup; do 60 | if [ -z "$hostgroup" ]; then 61 | break; 62 | fi 63 | read -e -p " Enter the list of hosts, or blank for none: " hosts 64 | echo >> "${CFG}" 65 | cat <<-EOF >> "${CFG}" 66 | define hostgroup{ 67 | hostgroup_name $hostgroup 68 | alias $hostgroup 69 | ${hosts:+members ${hosts// /,}} 70 | } 71 | EOF 72 | done 73 | 74 | # Generate NRPE check commands. TODO: lib, or lib64 depending on the machine 75 | cat <<-EOF 76 | command[check_disk_all]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% --all -I shm -I boot 77 | command[check_load]=/usr/lib/nagios/plugins/check_load -w 15,10,5 -c 30,25,20 78 | command[check_zombie_procs]=/usr/lib/nagios/plugins/check_procs -w 5 -c 10 -s Z 79 | command[check_total_procs]=/usr/lib/nagios/plugins/check_procs -w 150 -c 200 80 | command[check_users]=/usr/lib/nagios/plugins/check_users -w 5 -c 10 81 | command[check_swap]=/usr/lib/nagios/plugins/check_swap -w 90% -c 50% 82 | 83 | - Add check_linux_mem check, w=95,c=99 84 | EOF 85 | 86 | # TODO 87 | exit 0 88 | 89 | # Set up the services we want to make 90 | # TODO: set this up as a macro that the makefile fills in. 91 | cat <<-EOF >> "${TEMP}" 92 | pmp-check-lvm-snapshots 93 | pmp-check-mysql-deadlocks 94 | pmp-check-mysql-deleted-files 95 | pmp-check-mysql-file-privs 96 | pmp-check-mysql-innodb 97 | pmp-check-mysql-pidfile 98 | pmp-check-mysql-processlist 99 | pmp-check-mysql-replication-delay 100 | pmp-check-mysql-replication-running 101 | pmp-check-mysql-status 102 | pmp-check-unix-memory 103 | EOF 104 | 105 | CFG="${DIR}/services.cfg" 106 | cat <<-EOF >> "${CFG}" 107 | # #################################################################### 108 | # ${PRJ} Service Definitions 109 | # #################################################################### 110 | EOF 111 | echo -e "\033[34m # ##################################################\033[0m" 112 | echo -e "\033[34m # Creating\033[31m service\033[34m definitions\033[0m" 113 | echo -e "\033[34m # ##################################################\033[0m" 114 | while read -e -p "Enter a service name, or blank if done: " service; do 115 | if [ -z "$service" ]; then 116 | break; 117 | fi 118 | read -e -p " Enter the list of hosts for $service: " hosts 119 | # TODO: can't it apply to a hostgroup too? 120 | echo >> "${CFG}" 121 | cat <<-EOF >> "${CFG}" 122 | define service{ 123 | use ${service//-/_} 124 | host_name localhost 125 | service_description ${service//-/_} 126 | check_command pmp_check_nrpe!$service 127 | } 128 | EOF 129 | done 130 | 131 | # Server configuration: 132 | # Add an NRPE check command to /etc/nagios/objects/commands.cfg. 133 | CFG="${DIR}/commands.cfg" 134 | cat <<-EOF >> "${CFG}" 135 | # #################################################################### 136 | # ${PRJ} Check-Command Definitions 137 | # #################################################################### 138 | EOF 139 | echo -e "\033[34m # ##################################################\033[0m" 140 | echo -e "\033[34m # Creating\033[31m command\033[34m definitions\033[0m" 141 | echo -e "\033[34m # ##################################################\033[0m" 142 | echo >> "${CFG}" 143 | cat <<-EOF >> "${CFG}" 144 | define command{ 145 | command_name pmp_check_nrpe 146 | command_line \$USER1\$/check_nrpe -H \$HOSTADDRESS\$ -c \$ARG1\$ 147 | } 148 | EOF 149 | --------------------------------------------------------------------------------