This allows you to test out changes without having to re-install. The exporter can be installed in "editable" mode, using pip's `-e` flag. If you don't want to mount the query config file in at run time, you could modify the Dockerfile to copy it in when building the image. prometheus alertmanager blackboxexporter consulexporter graphiteexporter memcachedexporter mysqldexporter nodeexporter promlens. For example, you could change where the query config file is read from using `-c`. You can change other options in the same way as `-s`. You will also need to use this to configure the MySQL server using `-s`. Any options placed after the image name (`prometheus-mysql-exporter`) will be passed to the process inside the container. To run a container successfully, you will need to mount a query config file to `/usr/src/app/exporter.cfg` and map container port 8080 to a port on the host. > sudo docker build -t prometheus-mysql-exporter. Run the following in the root project directory: You can build a docker image using the provided Dockerfile. See the provided `exporter.cfg` file for query configuration examples and explanation. Run with the `-h` flag to see details on all the available options. > prometheus-mysql-exporter -p -s -u -P -c -d You can set the database(s) and change any defaults as required by passing in options: There is no default database to run the queries on, so you must specify at least one. Once installed, you can run the exporter with the `prometheus-mysql-exporter` command.īy default, it will bind to port 8080, query MySQL on `localhost:3306` using the `root` user (with no password) and run queries configured in a file `exporter.cfg` in the working directory. Note that you may need to add the start script location (see pip output) to your `PATH`. download dependencies, create start script): Run the following in the root project directory to install (i.e. You will need Python 3, pip 3, and libmysqlclient-dev installed to run the exporter. This Prometheus exporter periodically runs configured queries against a MySQL database and exports the results as Prometheus gauge metrics.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |