The error is very clear: you are generating multiple metrics with the same 
label name and exact set of labels.  Therefore, you will need to add extra 
labels to your metrics to make them unique.

The first error, for example, shows that you have generated this metric 
twice:

mysql_info_schema_auto_increment_column{column="id" 
schema="product_catalog" table="service_area_matrix_gvpn"} XXX
mysql_info_schema_auto_increment_column{column="id" 
schema="product_catalog" table="service_area_matrix_gvpn"} 1

Therefore there's something wrong in your configuration, either of 
mysqld_exporter itself or the prometheus scrape job.

If you're talking to multiple databases then normally the "instance" label 
would distinguish them.  Check how your scrape config compares to the 
example given 
at https://github.com/prometheus/mysqld_exporter#multi-target-support

    - job_name: mysql # To get metrics about the mysql exporter’s targets
      params:
        # Not required. Will match value to child in config file. Default 
value is `client`.
        auth_module: client.servers
      static_configs:
        - targets:
          # All mysql hostnames to monitor.
          - server1:3306
          - server2:3306
      relabel_configs:
        - source_labels: [__address__]
          target_label: __param_target

*        - source_labels: [__param_target]          target_label: instance*
        - target_label: __address__
          # The mysqld_exporter host:port
          replacement: localhost:9104

If you haven't set the 'instance' label (see the highlighted lines) then 
you'll get this problem, because both metrics will have 
instance="localhost:9104"

On Friday, 25 November 2022 at 06:37:06 UTC [email protected] wrote:

>
> hi All,
>
> I am getting mysqld exporter error and find error detail .
>
>
> An error has occurred while serving metrics:
>
> 12 error(s) occurred:
> * [from Gatherer #2] collected metric 
> "mysql_info_schema_auto_increment_column" { label:<name:"column" value:"id" 
> > label:<name:"schema" value:"product_catalog" > label:<name:"table" 
> value:"service_area_matrix_gvpn" > gauge:<value:1 > } was collected before 
> with the same name and label values
> * [from Gatherer #2] collected metric 
> "mysql_info_schema_auto_increment_column_max" { label:<name:"column" 
> value:"id" > label:<name:"schema" value:"product_catalog" > 
> label:<name:"table" value:"service_area_matrix_gvpn" > 
> gauge:<value:2.147483647e+09 > } was collected before with the same name 
> and label values
> * [from Gatherer #2] collected metric 
> "mysql_info_schema_auto_increment_column" { label:<name:"column" value:"id" 
> > label:<name:"schema" value:"product_catalog" > label:<name:"table" 
> value:"service_area_matrix_GVPN" > gauge:<value:255 > } was collected 
> before with the same name and label values
>
>
> Thanks,
> Prashant 
>

-- 
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/a6043b18-bfa2-4490-83b4-53fca992c9bfn%40googlegroups.com.

Reply via email to