Skip to content

New Maxscale releases 25.01, 25.10, 25.x fail to scrape counters using current maxctrl exporter #36

@amgads

Description

@amgads

Hi Vitaly:

We are at Nokia started using new Maxscale major releases 25.01.x & 25.10.x and we found after communicating with MariaDB/Maxscale development team that they changed one of the counters from the maxscale-api -- auto_failover from bool (true/false) to string to accommodate three states "true", "false", "safe". This broke exiting maxctrl_exporter which expects only a bool (true/false). We also still supporting old maxscale versions (23.08.x, 24.02.x) where this is of a bool type.
I took a stab on the solution that defines a type-struct that can accept the old way true/false (bool) and the new releases "true","false","safe" (string).

I privately built it and tested across releases to verify it's functioning correctly. I tested for releases 25.x, 24.02.x, 23.08.x and all were successful.

In the process, I found an old bug in the monitor metrics, that was hidden as well due to the fact both counters were bool. So I fixed that as well.

	auto_rejoin := 0
	if monitor.Attributes.Parameters.AutoFailover {               ===> this should have been AutoRejoin
		auto_rejoin = 1
	}

I'll go ahead and initiate a pull request to submit the code. Appreciate as usual your responsive review. We'll need to have that as part of our coming release before the end of the month.

Regards,
Amgad

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions