Code Monkey home page Code Monkey logo

ceph_exporter's Introduction

Prometheus Ceph Exporter

Export metrics from your Ceph clusters to your Prometheus monitoring system.

Prerequisites

You'll need a working Ceph cluster, and a working Prometheus server. Setup and installation of those is left as an exercise to the reader.

The server that you run this exporter needs to be configured to access the Ceph cluster as a client. If you can run ceph status and get a reasonable response you are good to go. It does not need to be run on a server that is running other Ceph services, although there is nothing preventing that. The server running the exporter service will also need to be accessible from the Prometheus server.

The exporter service is developed and tested using Python 3. Running the service with Python 2 is untested.

Installation

virtualenv --python=/usr/bin/python3 /opt/ceph_exporter
/opt/ceph_exporter/bin/pip install git+https://github.com/jcollie/ceph_exporter.git
cp /opt/ceph_exporter/etc/ceph_exporter.service /etc/systemd/system
systemctl daemon-reload
systemctl enable ceph_exporter
systemctl start ceph_exporter

Configuration

Exporter

The Ceph exporter is configured using command line options:

usage: ceph_exporter.py [-h] [--config CONFIG] [--name NAME]
                        [--keyring KEYRING] [--endpoint ENDPOINT]
                        [--executable EXECUTABLE]

optional arguments:
  -h, --help            show this help message and exit
  --config CONFIG       Ceph config file location, default is
                        `/etc/ceph/ceph.conf`
  --name NAME           Ceph client name used to authenticate to the Ceph
                        cluster, default is `client.admin`
  --keyring KEYRING     Name of the file that contains key for authentication
                        with the Ceph cluster, default is
                        `/etc/ceph/ceph.client.admin.keyring`
  --endpoint ENDPOINT   Twisted server endpoint specifier, default is
                        `tcp:9192`
  --executable EXECUTABLE
                        Path to the Ceph command line client executable,
                        default is `/usr/bin/ceph`

Twisted server endpoint specifiers are described here.

Multiple Ceph clusters could be monitored by copying the systemd service file to a new name and pointing the exporter to different configuration files.

Prometheus

Add a job to your Promethus configuration that looks like the following:

scrape_configs:
  - job_name: 'ceph'
    scrape_interval: 30s
    scrape_timeout: 10s
    target_groups:
      - targets:
        - 'localhost:9192'

ceph_exporter's People

Contributors

jcollie avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

ceph_exporter's Issues

Install Ceph_exporter

Dear sir !
I'm a newbie. I want to know how install ceph_exporter. Please help me !

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.