What is the exact configuration option to mention the port number of the 
service ?

On Friday, August 18, 2023 at 5:55:58 PM UTC+5:30 Brian Candler wrote:

> > dial tcp 127.0.0.1:3306: connect: connection refused
>
> Your mariadb is not listening on TCP port 3306 on the loopback address 
> (127.0.0.1).
>
> If you show what command you use to connect to mariadb normally (e.g. 
> using the "mysql" command line client) it should be possible to configure 
> the mysql export to talk the same way.  You would set this in whatever file 
> you give to --config.my-cnf (defaults to ~/.my.cnf)
> See https://github.com/prometheus/mysqld_exporter/
>
> On Friday, 18 August 2023 at 13:06:06 UTC+1 Y.G Kumar wrote:
>
>> Hi All,
>>
>> We have a galera mariadb 10.6 version three node cluster. When I tried 
>> installing mysql exporter  by following  the link 
>> https://computingforgeeks.com/monitoring-mysql-mariadb-with-prometheus-in-five-minutes/?expand_article=1
>>  
>> ,  I could not get the exporter to detect the mysql service  in which it is 
>> running .. These are the logs:
>> --
>> /tmp# curl -s <IP>:9104/metrics | grep mysql_up
>> ts=2023-08-18T11:22:21.544Z caller=exporter.go:152 level=error msg="Error 
>> pinging mysqld" err="dial tcp 127.0.0.1:3306: connect: connection 
>> refused"
>> # HELP mysql_up Whether the MySQL server is up.
>> # TYPE mysql_up gauge
>> mysql_up 0
>> ---
>>
>> But the mariadb service is running on this node:
>> ---
>> ● mariadb.service - MariaDB 10.6.10 database server
>>      Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor 
>> preset: enabled)
>>     Drop-In: /etc/systemd/system/mariadb.service.d
>>              └─migrated-from-my.cnf-settings.conf, override.conf
>>      Active: active (running) since Wed 2023-05-10 23:10:13 UTC; 3 months 
>> 8 days ago
>>        Docs: man:mariadbd(8)
>>              https://mariadb.com/kb/en/library/systemd/
>>    Main PID: 2540463 (mariadbd)
>>      Status: "Taking your SQL requests now..."
>>       Tasks: 1587 (limit: 618903)
>>         CPU: 2w 5d 9h 34min 28.076s
>>      CGroup: /galera.slice/mariadb.service
>>              └─2540463 /usr/sbin/mariadbd 
>> --wsrep_start_position=d635b506-3dd8-11e8-989e-7aec6efd1673:2862939478
>> ---
>>
>> Can anyone help me where the fault is ?  I have given enough privileges 
>> for the 'mysqld_exporter' user as well.
>>
>> Thanks
>> Kumar
>>
>>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/8b1bad37-c5a8-4d5b-a004-8137818e4fbfn%40googlegroups.com.

Reply via email to