项目作者: netgineer

项目描述 :
ManticoreSearch Prometheus Exporter
高级语言: Go
项目地址: git://github.com/netgineer/manticore-exporter.git
创建时间: 2021-03-12T20:18:34Z
项目社区:https://github.com/netgineer/manticore-exporter

开源协议:GNU General Public License v3.0

下载


ManticoreSearch Exporter for Prometheus

Manticore exporter for Prometheus.
Based on the sphinxsearch exporter by Maxim Pogozhiy

Build

The manticore exporter exports metrics from a manticore server for
consumption by prometheus. The server is specified as --manticore.address and --manticore.port flag
to the program (default is localhost:9306).

By default the manticore_exporter serves on port 0.0.0.0:9247 at /metrics

  1. make
  2. ./manticore_exporter

Alternatively a Dockerfile is supplied

  1. docker build -t manticore_exporter .
  2. docker run -p 9247:9247 manticore_exporter

Full

  1. docker run -d --name manticore_exporter \
  2. -p 9247:9247 manticore_exporter:latest \
  3. --manticore.address=localhost \
  4. --manticore.port=9306 \
  5. --manticore.timeout=1s \
  6. --web.listen-address=:9247 \
  7. --web.telemetry-path=/metrics

Or you can just pull from docker hub

  1. docker pull netgineer/manticore-exporter

Pre-build binaries

For pre-built binaries please take a look at the releases.

Basic Prometheus Configuration

Add a block to the scrape_configs of your prometheus.yml config file:

  1. scrape_configs:
  2. - job_name: manticore_exporter
  3. static_configs:
  4. - targets: ['<<MANTICORE-EXPORTER-HOSTNAME>>:9247']

and adjust the host name accordingly.

Collectors

The exporter collects a number of statistics from the server:

https://manual.manticoresearch.com/Profiling_and_monitoring/Node_status#SHOW-STATUS

https://manual.manticoresearch.com/Profiling_and_monitoring/Index_settings_and_status/SHOW_INDEX_STATUS#SHOW-INDEX-STATUS

Cluster metrics

Node states and status are converted from strings to numerical values according to the table

manticore exporter
closed 0
destroyed 1
joining 2
donor 3
synced 4
primary 0
non-primary 1