Git Product home page Git Product logo

ctdb_exporter's Introduction

ctdb_exporter

Prometheus exporter for CTDB

Usage

Usage of ./ctdb_exporter:
-web.listen-address string
The address to listen on for HTTP requests. (default ":9725")
-web.endpoint
The endpoint exposing metrics. (default "/metrics")
-ctdb.bin-path
The complete path to ctdb binary. (default "/usr/bin/ctdb")
-ctdb.sudo
Prefix ctdb commands with sudo. (default true)

Requirements

  • CTDB
  • sudo (optional)

Sudo

This tool is most likely going to need sudo as default CTDB configuration locks ctdb.socket access to root only. Assuming you are running the exporter with the user prometheus, the easiest way to handle this would be creating a /etc/sudoers.d/ctdb_exporter file containing :

prometheus ALL=(ALL) NOPASSWD: /usr/bin/ctdb pnn,/usr/bin/ctdb recmaster,/usr/bin/ctdb status -Y,/usr/bin/ctdb statistics -Y

Prometheus configuration

Minimal Prometheus scrape configuration :

scrape_configs:
  - job_name: "ctdb"
    static_configs:
      - targets:
        - samba-01.example.com:9725
        - samba-02.example.com:9725

Exposed metrics

ctdb_up will return 0 on scrape errors.

The results of ctdb status -Y on master node and ctdb statistics -Y on all nodes will be returned as gauges.

Example metrics :

ctdb_up 1
...
ctdb_banned{id="1",ip="0.0.0.1"} 0
ctdb_banned{id="2",ip="0.0.0.2"} 0
ctdb_disconnected{id="1",ip="0.0.0.1"} 0
ctdb_disconnected{id="2",ip="0.0.0.2"} 0
...
ctdb_num_clients{id="1"} 12
ctdb_num_clients{id="2"} 21

ctdb_exporter's People

Contributors

jf-guillou avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

s21109

ctdb_exporter's Issues

Only one ctdb metric output

Hello,
When I run the exporter on the CTDB node, there is only one metric related: "ctdb_up 1", all of the others seems not for ctdb, below is the metrics output :

=========quota==========================
"# HELP ctdb_up Is CTDB running
“# TYPE ctdb_up gauge
ctdb_up 1
”# HELP go_gc_duration_seconds A summary of the pause duration of garbage collection cycles.
"# TYPE go_gc_duration_seconds summary
go_gc_duration_seconds{quantile="0"} 0
go_gc_duration_seconds{quantile="0.25"} 0
go_gc_duration_seconds{quantile="0.5"} 0
go_gc_duration_seconds{quantile="0.75"} 0
go_gc_duration_seconds{quantile="1"} 0
go_gc_duration_seconds_sum 0
go_gc_duration_seconds_count 0
"# HELP go_goroutines Number of goroutines that currently exist.
"# TYPE go_goroutines gauge
go_goroutines 11
"# HELP go_info Information about the Go environment.
"# TYPE go_info gauge
go_info{version="go1.14"} 1
"# HELP go_memstats_alloc_bytes Number of bytes allocated and still in use.
"# TYPE go_memstats_alloc_bytes gauge
go_memstats_alloc_bytes 487912

"# HELP go_memstats_frees_total Total number of frees.
"# TYPE go_memstats_frees_total counter
go_memstats_frees_total 93
.
.
.
.
”# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.“
"# TYPE promhttp_metric_handler_requests_total counter
promhttp_metric_handler_requests_total{code="200"} 0
promhttp_metric_handler_requests_total{code="500"} 0
promhttp_metric_handler_requests_total{code="503"} 0
===============unquote========================

There are no metrics like "ctdb_banned" or "ctdb_num_clients"

Did I miss anything to do?
Thanks in advance!
Dan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.