![]() ![]() See the prometheus-mysql-exporter chart README for more details on how to configure the chart. ![]() > helm install braedon/prometheus-mysql-exporter -name \ -set rver = \ -set image.tag = HelmĪ Helm chart is available from the Helm repo at. If you don't want to mount the query config file in at run time, you could extend an existing image with your own Dockerfile that copies the config file in at build time. > sudo docker run -rm -name exporter \ -v :/usr/src/app/exporter.cfg \ -p :9207 \ braedon/prometheus-mysql-exporter: -s For example, you will 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 9207 to a port on the host. Dockerĭocker images for released versions can be found on Docker Hub (note that no latest version is provided): > sudo docker pull braedon/prometheus-mysql-exporter: See the provided exporter.cfg file for query configuration examples and explanation. The full resolution order for a given option is: CLI > Environment > Configuration file > Default. CLI options and environment variables take precedence over configuration files.ĬLI options, environment variables, and configuration files all override any default options. The format of the file should be Configobj's unrepre mode, so instead of -mysql-user fred you could use a configuration file config_file with mysql-user="fred" in it, and pass -config config_file. CLI options take precidence over environment variables.Ĭommand line options can also be set from a configuration file, by passing -config FILE. MYSQL_EXPORTER_MYSQL_USER=fred is equivalent to -mysql-user fred. The environment variable names are prefixed with MYSQL_EXPORTER, e.g. Note that all options can be set via environment variables. Run with the -h flag to see details on all the available options. You can change any defaults or other settings as required by passing in options: > prometheus-mysql-exporter -p -s -u -P -z -c Once installed, you can run the exporter with the prometheus-mysql-exporter command.īy default, it will bind to port 9207, 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. To install the latest published version via Pip, run: > pip3 install prometheus-mysql-exporter ![]() The exporter requires Python 3 and Pip 3 to be installed. Source Code | Python Package | Docker Image | Helm Chart Installation
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |