Add support for metrics collection (mysql-root interface)

Bug #1938865 reported by Alvaro Uria
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL InnoDB Cluster Charm
Fix Released
Wishlist
Robert Gildein

Bug Description

* charm-telegraf [1] supports a mysql plugin through the mysql-root interface.
* charm-percona-cluster has a "db-admin" endpoint that uses the mysql-root interface to configure a user for the telegraf mysql plugin
* This charm (charm-mysql-innodb-cluster) should support a similar endpoint (db-admin) so telegraf can collect metrics from each mysql server.

Note: the mysql-root interface collects the "host" attribute (see [2]), which in the case of charm-percona-cluster defaults to the VIP configured (so all 3 telegraf subordinates collect metrics from a single mysql instance). For charm-mysql-innodb-cluster, the "host" attribute should be each of the "private-address" values, so telegraf will collect information about each of the instances (1x RW mode, 2x RO mode).

The Juju configuration mode would be:
# makes telegraf a subordinate, with default plugins enabled
juju relate mysql-innodb-cluster telegraf:juju-info
# enables the mysql plugin
juju relate mysql-innodb-cluster:db-admin telegraf:mysql
# exposes the 0.0.0.0:9103/metrics service in telegraf
juju relate prometheus:target telegraf
# unrelated to this bug: share a mysql dashboard with Grafana,
# so the collected metrics by prometheus are displayed
juju relate grafana:dashboards telegraf

1. https://launchpad.net/charm-telegraf/
2. https://gist.github.com/auria/c9f23772ce2ddb5797d82204d9fabd59

Alvaro Uria (aluria)
tags: added: canonical-bootstack
tags: added: canonical-bootstack-doc
Revision history for this message
Liam Young (gnuoy) wrote :

Sounds like a good addition to the charm, thanks. As a side-note I think you were suggesting using private-address to illustrate your point, but the implementer should remember that private-address should not be used as its deprecated and unreliable.

Changed in charm-mysql-innodb-cluster:
status: New → Confirmed
importance: Undecided → Wishlist
Changed in charm-mysql-innodb-cluster:
assignee: nobody → Robert Gildein (rgildein)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-mysql-innodb-cluster (master)
Revision history for this message
Robert Gildein (rgildein) wrote (last edit ):

After discussing in the proposed change, we decided to use the new
interface instead of `mysql-root`, because the `mysql-root` was meant
to be used in different type of situation.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-mysql-innodb-cluster (master)

Reviewed: https://review.opendev.org/c/openstack/charm-mysql-innodb-cluster/+/817081
Committed: https://opendev.org/openstack/charm-mysql-innodb-cluster/commit/d8d1dc0527046cc3dd41f4394575f14e9675f230
Submitter: "Zuul (22348)"
Branch: master

commit d8d1dc0527046cc3dd41f4394575f14e9675f230
Author: Robert Gildein <email address hidden>
Date: Tue Nov 9 19:31:05 2021 +0100

    Add db-monitor relation w/ mysql-monitor interface

    The db-monitor relation provides to relate charm-telegraf via the
    mysql-monitor interface, which provides mysql plugin for collecting
    metrics.

    Closes-Bug: #1938865
    Change-Id: I2d0351263ecf3e79861512376f41974f2f7fc304

Changed in charm-mysql-innodb-cluster:
status: In Progress → Fix Committed
Changed in charm-mysql-innodb-cluster:
milestone: none → 22.04
Changed in charm-mysql-innodb-cluster:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-mysql-innodb-cluster (stable/focal)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on charm-mysql-innodb-cluster (stable/focal)

Change abandoned by "Seyeong Kim <email address hidden>" on branch: stable/focal
Review: https://review.opendev.org/c/openstack/charm-mysql-innodb-cluster/+/875616
Reason: deprecated stable/focal

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.