# Prometheus metrics showing n/a for class name

**URL:** <https://forum.weaviate.io/t/prometheus-metrics-showing-n-a-for-class-name/2547>\
**Category:** Support\
**Created:** [May 30, 2024, 7:32am UTC](https://forum.weaviate.io/t/prometheus-metrics-showing-n-a-for-class-name/2547 "2024-05-30T07:32:04Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alan\_Sun](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/alan_sun/32/124_2.png) [@Alan\_Sun](https://forum.weaviate.io/u/Alan_Sun)\
**Post date:** [May 30, 2024, 7:32am UTC](https://forum.weaviate.io/t/prometheus-metrics-showing-n-a-for-class-name/2547/1 "2024-05-30T07:32:04Z")

</div>

### Description

I have successfully running my weaviate and also writing data already. Now i am trying to use Prometheus to get the monitoring stuff.  
However when i directly port-forward 2112, i can see all metrics having classname are equals to na

for example:

```auto
batch_durations_ms_count{class_name="n/a",operation="total_persistence_level",shard_name="n/a"} 10499
batch_durations_ms_bucket{class_name="n/a",operation="total_preprocessing",shard_name="n/a",le="10"} 7971
batch_durations_ms_bucket{class_name="n/a",operation="total_preprocessing",shard_name="n/a",le="50"} 8915
batch_durations_ms_bucket{class_name="n/a",operation="total_preprocessing",shard_name="n/a",le="100"} 10079
batch_durations_ms_bucket{class_name="n/a",operation="total_preprocessing",shard_name="n/a",le="500"} 10498
batch_durations_ms_bucket{class_name="n/a",operation="total_preprocessing",shard_name="n/a",le="1000"} 10499
batch_durations_ms_bucket{class_name="n/a",operation="total_preprocessing",shard_name="n/a",le="5000"} 10499
batch_durations_ms_bucket{class_name="n/a",operation="total_preprocessing",shard_name="n/a",le="+Inf"} 10499
batch_durations_ms_sum{class_name="n/a",operation="total_preprocessing",shard_name="n/a"} 214940.27587399905
batch_durations_ms_count{class_name="n/a",operation="total_preprocessing",shard_name="n/a"} 10499
batch_durations_ms_bucket{class_name="n/a",operation="total_uc_level",shard_name="n/a",le="10"} 217
batch_durations_ms_bucket{class_name="n/a",operation="total_uc_level",shard_name="n/a",le="50"} 5912
batch_durations_ms_bucket{class_name="n/a",operation="total_uc_level",shard_name="n/a",le="100"} 6874
batch_durations_ms_bucket{class_name="n/a",operation="total_uc_level",shard_name="n/a",le="500"} 8507
batch_durations_ms_bucket{class_name="n/a",operation="total_uc_level",shard_name="n/a",le="1000"} 9151
batch_durations_ms_bucket{class_name="n/a",operation="total_uc_level",shard_name="n/a",le="5000"} 10496

```

### Server Setup Information

- Weaviate Server Version: 1.25.0
- Deployment Method: k8s
- Multi Node? Number of Running Nodes: 3
- Client Language and Version: Python weaviate-client==4.5.5
- Multitenancy?: no

### Any additional Information

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [June 3, 2024, 10:21pm UTC](https://forum.weaviate.io/t/prometheus-metrics-showing-n-a-for-class-name/2547/2 "2024-06-03T22:21:46Z")

</div>

Hi @Alan_Sun !!

Have you deployed using our helm charts?

I was not able to reproduce this on a single deployment in docker.

I will need to follow up on this to try replicating the same environment.

Can you see any outstanding logs?

Thanks!

---

<div class="post-metadata">

**Author:** ![Alan\_Sun](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/alan_sun/32/124_2.png) [@Alan\_Sun](https://forum.weaviate.io/u/Alan_Sun)\
**Post date:** [June 4, 2024, 3:19am UTC](https://forum.weaviate.io/t/prometheus-metrics-showing-n-a-for-class-name/2547/3 "2024-06-04T03:19:06Z")

</div>

Hi @DudaNogueira ,  
Yes I am using your official helm chart as following:

```auto
|NAME |NAMESPACE |REVISION|UPDATED |STATUS |CHART |APP VERSION|
|---|---|---|---|---|---|---|
|ssdl-weaviate |ssdl-weaviate|34 |2024-06-03 14:25:44.220168 +0800 CST|deployed|weaviate-17.0.0 |1.25.0|

```

Of course we created our collections and inserted data into this collections by using following python code

```auto
!pip install "weaviate-client==4.*"
!pip install -U weaviate-client

```

init get client then

```auto
import weaviate.classes.config as wvcc

client.collections.create(
    name="EmilyTest1",
    properties=[
        wvcc.Property(
          name="solution_number",
          data_type=wvcc.DataType.NUMBER
        )
      ],
    replication_config=Configure.replication(
        factor=3
    ),
)

```

Then batch import

```auto
start_time = datetime.datetime.now()
with client.batch.fixed_size(batch_size=200) as batch:
    with open("embedding_3m.pkl", "rb") as f:
        loaded_data = pickle.load(f)
        # objects = ijson.items(f, "item")
        for obj_soln, obj_vector in loaded_data.items():
            properties = {
                "solution_number": obj_soln,
            }
            batch.add_object(
                collection="EmilyTest1",
                properties=properties,
                vector=obj_vector
            )

            # Calculate and display progress
            counter += 1
            if counter % interval == 0:
                print(f"Imported {counter} solutions...")

end_time = datetime.datetime.now()
delta_time = end_time - start_time
print("Time taken:", delta_time)
print(f"Finished importing {counter} solutions.")

```

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [June 7, 2024, 8:18pm UTC](https://forum.weaviate.io/t/prometheus-metrics-showing-n-a-for-class-name/2547/4 "2024-06-07T20:18:55Z")

</div>

Hi!

I believe this is only the case for the totals.

In my environment I get:

```auto
batch_durations_ms_count{class_name="Test_Batch",operation="object_storage",shard_name="2uApOMYRXmM7"} 247
....
batch_durations_ms_bucket{class_name="n/a",operation="total_persistence_level",shard_name="n/a",le="10"} 0
.....

```

So all that entries that has class\_name as “n/a” is referring to the overall.

those were my two configurations for the exposed metrics:

# Expose metrics on port 2112 for Prometheus to scrape

PROMETHEUS\_MONITORING\_ENABLED: true  
PROMETHEUS\_MONITORING\_GROUP: false

Let me know if this helps.

Thanks!

---

<div class="post-metadata">

**Author:** ![Alan\_Sun](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/alan_sun/32/124_2.png) [@Alan\_Sun](https://forum.weaviate.io/u/Alan_Sun)\
**Post date:** [June 11, 2024, 3:28am UTC](https://forum.weaviate.io/t/prometheus-metrics-showing-n-a-for-class-name/2547/5 "2024-06-11T03:28:10Z")

</div>

Hi,

Yes, i have enabled prometheus monitoring thats why i am able to see the metrics through 2112.  
But i am still not seeing class\_name even for ms\_count.  
Are you also testing with batch upload with weaviate-client 4.\* ?

```auto
batch_durations_ms_bucket{class_name="n/a",operation="total_preprocessing",shard_name="n/a",le="+Inf"} 10509
batch_durations_ms_sum{class_name="n/a",operation="total_preprocessing",shard_name="n/a"} 47322.00007900016
batch_durations_ms_count{class_name="n/a",operation="total_preprocessing",shard_name="n/a"} 10509

```

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [June 11, 2024, 7:10pm UTC](https://forum.weaviate.io/t/prometheus-metrics-showing-n-a-for-class-name/2547/6 "2024-06-11T19:10:18Z")

</div>

Can you check your values.yaml for those variables:

```auto
PROMETHEUS_MONITORING_ENABLED: true
PROMETHEUS_MONITORING_GROUP: false

```

if `PROMETHEUS_MONITORING_GROUP` is set to true, it will not expose per collection metrics.

Let me know if this helps.

Thanks!

---

<div class="post-metadata">

**Author:** ![Alan\_Sun](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/alan_sun/32/124_2.png) [@Alan\_Sun](https://forum.weaviate.io/u/Alan_Sun)\
**Post date:** [June 12, 2024, 3:08am UTC](https://forum.weaviate.io/t/prometheus-metrics-showing-n-a-for-class-name/2547/7 "2024-06-12T03:08:40Z")

</div>

Oh thanks for your tips. Looks good now.

---

<div class="post-metadata">

**Author:** ![SStalciuss](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/sstalciuss/32/3461_2.png) [@SStalciuss](https://forum.weaviate.io/u/SStalciuss)\
**Post date:** [February 6, 2025, 9:20am UTC](https://forum.weaviate.io/t/prometheus-metrics-showing-n-a-for-class-name/2547/8 "2025-02-06T09:20:38Z")

</div>

Are you planning to change grouping in a way that it would expose class data? It makes sense to group shards if multi-tenancy is enabled, but it would still be good to see per class metrics

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [February 6, 2025, 12:20pm UTC](https://forum.weaviate.io/t/prometheus-metrics-showing-n-a-for-class-name/2547/9 "2025-02-06T12:20:23Z")

</div>

hi @SStalciuss !! Welcome to our community 🤗

What metrics are you looking for?

We had recently a PR that touches this:

> <https://github.com/weaviate/weaviate/pull/6994>
>
> \### What's being changed:
> This metric is a guage metric that represents the num…ber of collections per "node". Useful to have high level view of collections for operators. Also to sanity check after any migrations.
> 
> Example:
> \`\`\`
> \# HELP weaviate\_schema\_collections Number of collections per node
> \# TYPE weaviate\_schema\_collections gauge
> weaviate\_schema\_collections{nodeID="weaviate-0"} 1
> \`\`\`
> \### Review checklist
> 
> \- \[\] Documentation has been updated, if necessary. Link to changed documentation:
> \- \[\] Chaos pipeline run or not necessary. Link to pipeline:
> \- \[\] All new code is covered by tests where it is reasonable.
> \- \[\] Performance tests have been run or not necessary.

There are probably some more metrics that could be interesting to expose.

I suggest opening a new thread so we can discuss this further 🙂

Thanks!

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [February 6, 2025, 12:20pm UTC](https://forum.weaviate.io/t/prometheus-metrics-showing-n-a-for-class-name/2547/10 "2025-02-06T12:20:26Z")

</div>


