Sign inSign up

brunoleon/maxctrl_exporter

By brunoleon

•Updated over 6 years ago

Image
0

3.6K

brunoleon/maxctrl_exporter repository overview

⁠MaxScale Exporter

The Exporter exports the MaxScale metrics for Prometheus:

  • Server connections
  • Service session count
  • MaxScale instance status
  • Event statistics per started thread

⁠MaxScale requirements

The exporter uses exclusively MaxScale REST API⁠

⁠Installation

  1. Install Golang⁠
  2. Install dep⁠
  3. Create a new folder in your $GOPATH: mkdir -p $GOPATH/src/github.com/
  4. Navigate to that folder: $GOPATH/src/github.com
  5. Clone the repository: git clone https://github.com/Vetal1977/maxctrl_exporter.git

⁠Build

⁠Manually
  1. Change to the project root directory
  2. Run dep ensure --update to update the dependencies
  3. Run go build to build the binary for your platform
  4. Build Linux binary: GOOS=linux GOARCH=amd64 go build -o bin/linux/maxctrl_exporter
⁠With Makefile
  1. Run make build

⁠Run and test locally

We have prepared a Docker-compose file for a local try. Upon start, you get running MySQL, MaxScale and Exporter containers. Note that the Exported does not use command line arguments rather relies on environment variables:

  • MAXSCALE_ADDRESS. URL of MaxScale server, default is 127.0.0.1
  • MAXSCALE_PORT. Exposed MaxScale server port, default is 8989
  • MAXSCALE_USERNAME. MaxScale user name for connection to underlying MySQL database
  • MAXSCALE_PASSWORD. MaxScale user password for connection to underlying MySQL database
  • MAXSCALE_EXPORTER_PORT. Port that the Exporter expose to provide metrics for Prometheus
⁠Run
  1. cd maxscale_docker
  2. docker-compose up -d
  3. docker-compose down when you are finished
⁠Test
  1. The REST API of MaxScale is accessible at localhost:8989. E.g. http://localhost:8989/v1/servers⁠
  2. The Exporter of MaxScale is accessible at localhost:8093. E.g. http://localhost:8093/metrics⁠

Tag summary

Content type

Image

Digest

Size

372.4 MB

Last updated

over 6 years ago

docker pull brunoleon/maxctrl_exporter