Have you tried it? With curl?

If all servers have the same user/password, then I think just
curl nodeA:9104/probe?target=nodeB:3306
should work, using the credentials from the [client] section of my.cnf.

If they have different usernames/passwords, then as the documentation says, 
you can add additional sections to my.cnf:

 [client]
user=mysqld_exporter
password=StrongPassword
 [client.secret]
user=mysqld_exporter
password=VeryStrongPassword

and call /probe?target=nodeB:3306&auth_module=client.secret

If you don't provide auth_module then the "[client]" section will be used, 
as the documentation I linked to before says: Will match value to child in 
config file. Default value is `client`

Of course, you will have to arrange that nodes B and C accept mysql 
connections from node A. You can test this using the 'mysql' command line 
tool on node A, to see if you can establish connections to B/C.

On Tuesday, 5 September 2023 at 13:42:41 UTC+1 Y.G Kumar wrote:

> Brian,
>
> This is what I am trying to achieve. I have a three node galera mysql 
> cluster on three nodes A, B and C with respective IPs.
> As of now, I have installed mysql exporter in all the above three nodes 
> and trying to access it using haproxy external IP using the above three 
> nodes as backends.  It is working fine. 
>
> Now , I  want to keep the mysql exporter only on node A and remove it on 
> nodes B and C and start the  multi target approach from node A only. So in 
> the /etc/.mysqld_exporter.cnf   file , how do I mention each section of the 
> other two nodes ?  This is my present file content in each of the nodes 
> above:
> ----
> [client]
> user=mysqld_exporter
> password=StrongPassword
> ---
>
> Please suggest..
>
> Appreciate your time.
>
> Good day
>
>
> On Tuesday, August 29, 2023 at 12:46:50 PM UTC+5:30 Brian Candler wrote:
>
>> On Tuesday, 29 August 2023 at 07:34:58 UTC+1 Y.G Kumar wrote:
>>
>> Please help ...
>>
>>
>> Please start by reading the documentation at the link I posted earlier in 
>> this thread:
>> https://github.com/prometheus/mysqld_exporter/#multi-target-support
>>
>> Then if you are unable to make this work, you can post a specific 
>> question <http://www.catb.org/~esr/faqs/smart-questions.html#beprecise>: 
>> show exactly what you configured, what you expected to happen, and what 
>> actually happened (with any logs or error messages).
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/f7cc5d50-e6de-4ed5-9e45-775f8f55411en%40googlegroups.com.

Reply via email to