Sending metrics directly from Ceph to Influx
(no telegram plugin is required)
After this sad bug in telegram (some Ceph metrics are missed for newer version of Ceph) I was delighted to find that Ceph (ceph-mgr to be precise) can send metrics directly into influx. I’m giving instructions for Luminous.
Configuration
There is one big WTF issue in this setup: it has a hidden dependency. If this dependency is not installed, no data will be send. It’s a python-influxdb
. Install it before doing anything else on all mgr
hosts.
After you’ve setup this dependency, enable influx module.
ceph mgr module enable influx
Restart all mgr services (if you have a normal installation, it’s at least three of them).
And provide a configuration to it:
ceph influx config-set {{item}} {{value}}
options list:
— username
— interval
— database
— hostname
— ssl
— verify_ssl
— password
— port
The ‘influx’ command will appear only and only if you have enabled influx module and this module can import influxdb client. If it can’t, it silently fails. Moreover, you must to restart all ceph-mgr instances after you’ve enabled the module.
After you’ve configured everything you can check if it works:
ceph influx send
You should get confirmation and two measurements should appear in influx:
ceph_daemon_stats
ceph_pool_stats
ceph_daemon_stats has per-daemon information. Depending on a daemon type it would be osd-related or mon related info (mgr is there too, and mds, etc).
ceph_pool_stats has pool-related stats.
Those are more than enough for most purposes of having ceph metrics. The single exception I find is a ceph health report which I gather as a normal metric, because it so nice to show on dashboards…