{"id":21657502,"url":"https://github.com/voipgrid/maxscale_exporter","last_synced_at":"2025-04-11T22:33:02.388Z","repository":{"id":56012208,"uuid":"71819410","full_name":"VoIPGRID/maxscale_exporter","owner":"VoIPGRID","description":"Maxscale Exporter for Prometheus","archived":false,"fork":false,"pushed_at":"2023-02-15T03:39:50.000Z","size":293,"stargazers_count":10,"open_issues_count":5,"forks_count":13,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T10:51:45.975Z","etag":null,"topics":["exporter","maxscale","metrics","prometheus"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/VoIPGRID.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-24T18:31:58.000Z","updated_at":"2024-03-31T10:50:18.000Z","dependencies_parsed_at":"2024-06-19T01:43:00.354Z","dependency_job_id":null,"html_url":"https://github.com/VoIPGRID/maxscale_exporter","commit_stats":null,"previous_names":["skord/maxscale_exporter","rubenhoms/maxscale_exporter"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VoIPGRID%2Fmaxscale_exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VoIPGRID%2Fmaxscale_exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VoIPGRID%2Fmaxscale_exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VoIPGRID%2Fmaxscale_exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VoIPGRID","download_url":"https://codeload.github.com/VoIPGRID/maxscale_exporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248490026,"owners_count":21112675,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["exporter","maxscale","metrics","prometheus"],"created_at":"2024-11-25T09:26:41.341Z","updated_at":"2025-04-11T22:33:02.362Z","avatar_url":"https://github.com/VoIPGRID.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Docker Pulls](https://img.shields.io/docker/pulls/VoIPGRID/maxscale_exporter.svg)](https://hub.docker.com/r/VoIPGRID/maxscale_exporter/)\n[![Docker build](https://img.shields.io/docker/cloud/build/VoIPGRID/maxscale_exporter)](https://hub.docker.com/r/VoIPGRID/maxscale_exporter/builds)\n\n## Overview\nThis exports the following MaxScale metrics for Prometheus:\n\n- Server connections\n- Service session count\n- Maxscale instance status and variables\n- Event Times (Executed \u0026 Queued histograms)\n\n### Requirements:\nYour MaxScale instance needs to have the JSON HTTP listener enabled so this can pull the stats from your MaxScale server. You can read [here](https://mariadb.com/kb/en/mariadb-enterprise/mariadb-maxscale-14/maxinfo-plugin/#configuration) how to set this up.\n\n**NOTE:** This will work with all MaxScale versions \u003c 2.4. For MaxScale versions \u003e 2.4, you should use the [maxctrl_exporter](https://github.com/Vetal1977/maxctrl_exporter). This is due to support being dropped for the MaxAdmin \u0026 MaxInfo in the newer versions.\n\n## Installation\nQuite simple: get [Go](https://golang.org/dl), set a `$GOPATH`, and run\n\n    go get github.com/VoIPGRID/maxscale_exporter\n\n## Use\nMake sure `$GOPATH/bin` is in your `$PATH`.\n\n    $ maxscale_exporter -h\n    Usage of maxscale_exporter:\n      -address string\n        \taddress to get maxscale statistics from (default \"127.0.0.1:8003\")\n      -pidfile string\n        \tthe pid file for maxscale to monitor process statistics\n      -port string\n        \tthe port that the maxscale exporter listens on (default \"9195\")\n\n## Process metrics\nThis exporter exposes two different sets of process metrics but only one of them is enabled by default.\nThe metrics of the exporter process itself are exposed in the `process` namepsace (e.g. `process_start_time_seconds`), this happens automatically and no further setup is needed.\n\nHowever if you want to expose metrics about the MaxScale process itself, you can do that by specifying the `-pidfile` flag.\nHowever this only works in Linux systems where `/proc` is available. For example you could set this up by specifying `-pidfile /run/maxscale/maxscale.pid` as a flag.\nNote that the user that runs the exporter process needs to have read access to the pidfile in order for this to work.\n\n## Testing locally\nIf you want to try out the exporter locally, a Dockerfile is provided to run a MaxScale instance with the HTTP JSON listener enabled. To test it out locally you run:\n\n```\n$ cd maxscale_docker\n$ docker build . -t maxscale_maxinfo:latest\n$ docker run -d -p 8003:8003 maxscale_maxinfo:latest\n```\nIf you then run the maxscale_exporter it should use the default settings and pull statistics from the Docker container.\n\n### Example output\n```\n# HELP maxscale_events_executed_seconds Amount of events executed\n# TYPE maxscale_events_executed_seconds histogram\nmaxscale_events_executed_seconds_bucket{le=\"0.1\"} 999041\nmaxscale_events_executed_seconds_bucket{le=\"0.2\"} 337\nmaxscale_events_executed_seconds_bucket{le=\"0.3\"} 0\nmaxscale_events_executed_seconds_bucket{le=\"0.4\"} 0\nmaxscale_events_executed_seconds_bucket{le=\"0.5\"} 0\nmaxscale_events_executed_seconds_bucket{le=\"0.6\"} 0\nmaxscale_events_executed_seconds_bucket{le=\"0.7\"} 0\nmaxscale_events_executed_seconds_bucket{le=\"0.8\"} 0\nmaxscale_events_executed_seconds_bucket{le=\"0.9\"} 0\nmaxscale_events_executed_seconds_bucket{le=\"1\"} 0\nmaxscale_events_executed_seconds_bucket{le=\"1.1\"} 0\nmaxscale_events_executed_seconds_bucket{le=\"1.2\"} 0\nmaxscale_events_executed_seconds_bucket{le=\"1.3\"} 0\nmaxscale_events_executed_seconds_bucket{le=\"1.4\"} 0\nmaxscale_events_executed_seconds_bucket{le=\"1.5\"} 0\nmaxscale_events_executed_seconds_bucket{le=\"1.6\"} 0\nmaxscale_events_executed_seconds_bucket{le=\"1.7\"} 0\nmaxscale_events_executed_seconds_bucket{le=\"1.8\"} 0\nmaxscale_events_executed_seconds_bucket{le=\"1.9\"} 0\nmaxscale_events_executed_seconds_bucket{le=\"2\"} 0\nmaxscale_events_executed_seconds_bucket{le=\"2.1\"} 0\nmaxscale_events_executed_seconds_bucket{le=\"2.2\"} 0\nmaxscale_events_executed_seconds_bucket{le=\"2.3\"} 0\nmaxscale_events_executed_seconds_bucket{le=\"2.4\"} 0\nmaxscale_events_executed_seconds_bucket{le=\"2.5\"} 0\nmaxscale_events_executed_seconds_bucket{le=\"2.6\"} 0\nmaxscale_events_executed_seconds_bucket{le=\"2.7\"} 0\nmaxscale_events_executed_seconds_bucket{le=\"2.8\"} 0\nmaxscale_events_executed_seconds_bucket{le=\"2.9\"} 0\nmaxscale_events_executed_seconds_bucket{le=\"+Inf\"} 999378\nmaxscale_events_executed_seconds_sum 99971.5\nmaxscale_events_executed_seconds_count 999378\n# HELP maxscale_events_queued_seconds Amount of events queued\n# TYPE maxscale_events_queued_seconds histogram\nmaxscale_events_queued_seconds_bucket{le=\"0.1\"} 999306\nmaxscale_events_queued_seconds_bucket{le=\"0.2\"} 73\nmaxscale_events_queued_seconds_bucket{le=\"0.3\"} 0\nmaxscale_events_queued_seconds_bucket{le=\"0.4\"} 0\nmaxscale_events_queued_seconds_bucket{le=\"0.5\"} 0\nmaxscale_events_queued_seconds_bucket{le=\"0.6\"} 0\nmaxscale_events_queued_seconds_bucket{le=\"0.7\"} 0\nmaxscale_events_queued_seconds_bucket{le=\"0.8\"} 0\nmaxscale_events_queued_seconds_bucket{le=\"0.9\"} 0\nmaxscale_events_queued_seconds_bucket{le=\"1\"} 0\nmaxscale_events_queued_seconds_bucket{le=\"1.1\"} 0\nmaxscale_events_queued_seconds_bucket{le=\"1.2\"} 0\nmaxscale_events_queued_seconds_bucket{le=\"1.3\"} 0\nmaxscale_events_queued_seconds_bucket{le=\"1.4\"} 0\nmaxscale_events_queued_seconds_bucket{le=\"1.5\"} 0\nmaxscale_events_queued_seconds_bucket{le=\"1.6\"} 0\nmaxscale_events_queued_seconds_bucket{le=\"1.7\"} 0\nmaxscale_events_queued_seconds_bucket{le=\"1.8\"} 0\nmaxscale_events_queued_seconds_bucket{le=\"1.9\"} 0\nmaxscale_events_queued_seconds_bucket{le=\"2\"} 0\nmaxscale_events_queued_seconds_bucket{le=\"2.1\"} 0\nmaxscale_events_queued_seconds_bucket{le=\"2.2\"} 0\nmaxscale_events_queued_seconds_bucket{le=\"2.3\"} 0\nmaxscale_events_queued_seconds_bucket{le=\"2.4\"} 0\nmaxscale_events_queued_seconds_bucket{le=\"2.5\"} 0\nmaxscale_events_queued_seconds_bucket{le=\"2.6\"} 0\nmaxscale_events_queued_seconds_bucket{le=\"2.7\"} 0\nmaxscale_events_queued_seconds_bucket{le=\"2.8\"} 0\nmaxscale_events_queued_seconds_bucket{le=\"2.9\"} 0\nmaxscale_events_queued_seconds_bucket{le=\"+Inf\"} 999379\nmaxscale_events_queued_seconds_sum 99945.20000000001\nmaxscale_events_queued_seconds_count 999379\n# HELP maxscale_exporter_total_scrapes Current total MaxScale scrapes\n# TYPE maxscale_exporter_total_scrapes counter\nmaxscale_exporter_total_scrapes 1\n# HELP maxscale_process_cpu_seconds_total Total user and system CPU time spent in seconds.\n# TYPE maxscale_process_cpu_seconds_total counter\nmaxscale_process_cpu_seconds_total 70.98\n# HELP maxscale_process_max_fds Maximum number of open file descriptors.\n# TYPE maxscale_process_max_fds gauge\nmaxscale_process_max_fds 65535\n# HELP maxscale_process_open_fds Number of open file descriptors.\n# TYPE maxscale_process_open_fds gauge\nmaxscale_process_open_fds 49\n# HELP maxscale_process_resident_memory_bytes Resident memory size in bytes.\n# TYPE maxscale_process_resident_memory_bytes gauge\nmaxscale_process_resident_memory_bytes 5.6098816e+07\n# HELP maxscale_process_start_time_seconds Start time of the process since unix epoch in seconds.\n# TYPE maxscale_process_start_time_seconds gauge\nmaxscale_process_start_time_seconds 1.52275537227e+09\n# HELP maxscale_process_virtual_memory_bytes Virtual memory size in bytes.\n# TYPE maxscale_process_virtual_memory_bytes gauge\nmaxscale_process_virtual_memory_bytes 5.81009408e+08\n# HELP maxscale_server_connections Amount of connections to the server\n# TYPE maxscale_server_connections gauge\nmaxscale_server_connections{address=\"1.3.3.7\",server=\"db0\"} 11\nmaxscale_server_connections{address=\"1.3.3.7\",server=\"db1\"} 6\n# HELP maxscale_server_up Is the server up\n# TYPE maxscale_server_up gauge\nmaxscale_server_up{address=\"1.3.3.7\",server=\"db0\"} 1\nmaxscale_server_up{address=\"1.3.3.8\",server=\"db1\"} 1\n# HELP maxscale_service_current_sessions Amount of sessions currently active\n# TYPE maxscale_service_current_sessions gauge\nmaxscale_service_current_sessions{name=\"CLI\",router=\"cli\"} 1\nmaxscale_service_current_sessions{name=\"MaxInfo\",router=\"maxinfo\"} 2\nmaxscale_service_current_sessions{name=\"db0\",router=\"readconnroute\"} 12\nmaxscale_service_current_sessions{name=\"db1\",router=\"readconnroute\"} 7\n# HELP maxscale_service_total_sessions Total amount of sessions\n# TYPE maxscale_service_total_sessions counter\nmaxscale_service_total_sessions{name=\"CLI\",router=\"cli\"} 5558\nmaxscale_service_total_sessions{name=\"MaxInfo\",router=\"maxinfo\"} 495\nmaxscale_service_total_sessions{name=\"db0\",router=\"readconnroute\"} 771\nmaxscale_service_total_sessions{name=\"db1\",router=\"readconnroute\"} 9\n# HELP maxscale_status_accept_events How many accept events happened\n# TYPE maxscale_status_accept_events counter\nmaxscale_status_accept_events 6830\n# HELP maxscale_status_backend_connections How many backend connections there are\n# TYPE maxscale_status_backend_connections gauge\nmaxscale_status_backend_connections 17\n# HELP maxscale_status_client_connections How many client connections there are\n# TYPE maxscale_status_client_connections gauge\nmaxscale_status_client_connections 18\n# HELP maxscale_status_connections How many connections there are\n# TYPE maxscale_status_connections gauge\nmaxscale_status_connections 39\n# HELP maxscale_status_error_events How many error events happened\n# TYPE maxscale_status_error_events counter\nmaxscale_status_error_events 0\n# HELP maxscale_status_event_queue_length How long the event queue is\n# TYPE maxscale_status_event_queue_length gauge\nmaxscale_status_event_queue_length 1\n# HELP maxscale_status_hangup_events How many hangup events happened\n# TYPE maxscale_status_hangup_events counter\nmaxscale_status_hangup_events 5817\n# HELP maxscale_status_internal_descriptors How many internal descriptors there are\n# TYPE maxscale_status_internal_descriptors gauge\nmaxscale_status_internal_descriptors 35\n# HELP maxscale_status_listeners How many listeners there are\n# TYPE maxscale_status_listeners gauge\nmaxscale_status_listeners 4\n# HELP maxscale_status_max_event_execution_time The max event execution time\n# TYPE maxscale_status_max_event_execution_time gauge\nmaxscale_status_max_event_execution_time 1\n# HELP maxscale_status_max_event_queue_length The max length of the event queue\n# TYPE maxscale_status_max_event_queue_length gauge\nmaxscale_status_max_event_queue_length 4\n# HELP maxscale_status_max_event_queue_time The max event queue time\n# TYPE maxscale_status_max_event_queue_time gauge\nmaxscale_status_max_event_queue_time 1\n# HELP maxscale_status_pending_events How many events are pending\n# TYPE maxscale_status_pending_events gauge\nmaxscale_status_pending_events 0\n# HELP maxscale_status_read_events How many read events happened\n# TYPE maxscale_status_read_events counter\nmaxscale_status_read_events 985046\n# HELP maxscale_status_threadpool_threads How many threadpool threads there are\n# TYPE maxscale_status_threadpool_threads gauge\nmaxscale_status_threadpool_threads 1\n# HELP maxscale_status_threads_connected How many threads are connected\n# TYPE maxscale_status_threads_connected gauge\nmaxscale_status_threads_connected 22\n# HELP maxscale_status_threads_created How many threads have been created\n# TYPE maxscale_status_threads_created counter\nmaxscale_status_threads_created 1\n# HELP maxscale_status_threads_running How many threads are running\n# TYPE maxscale_status_threads_running gauge\nmaxscale_status_threads_running 1\n# HELP maxscale_status_uptime How long has the server been running\n# TYPE maxscale_status_uptime counter\nmaxscale_status_uptime 79379\n# HELP maxscale_status_uptime_since_flush_status How long the server has been up since flush status\n# TYPE maxscale_status_uptime_since_flush_status counter\nmaxscale_status_uptime_since_flush_status 79379\n# HELP maxscale_status_write_events How many write events happened\n# TYPE maxscale_status_write_events counter\nmaxscale_status_write_events 992543\n# HELP maxscale_status_zombie_connections How many zombie connetions there are\n# TYPE maxscale_status_zombie_connections gauge\nmaxscale_status_zombie_connections 0\n# HELP maxscale_up Was the last scrape of MaxScale successful?\n# TYPE maxscale_up gauge\nmaxscale_up 1\n# HELP maxscale_variables_nbpolls MAXSCALE_NBPOLLS\n# TYPE maxscale_variables_nbpolls gauge\nmaxscale_variables_nbpolls 3\n# HELP maxscale_variables_pollsleep MAXSCALE_POLLSLEEP\n# TYPE maxscale_variables_pollsleep gauge\nmaxscale_variables_pollsleep 1000\n# HELP maxscale_variables_sessions MAXSCALE_SESSIONS\n# TYPE maxscale_variables_sessions gauge\nmaxscale_variables_sessions 22\n# HELP maxscale_variables_thread MAXSCALE_THREADS\n# TYPE maxscale_variables_thread gauge\nmaxscale_variables_thread 1\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoipgrid%2Fmaxscale_exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoipgrid%2Fmaxscale_exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoipgrid%2Fmaxscale_exporter/lists"}