#Custom metric

1 messages · Page 1 of 1 (latest)

idle aurora
#

Hello!
Can I add my own metric and harvest label?

I want to add these metrics for one storage system, where the labels have the same value, but the meaning of the labels differs.
Cluster_new_status (Location = OST, vcenter = X)
Cluster_new_status (Location = Nord, vcenter = y)

grave dove
idle aurora
#

is it global label? I want to add labels for metric (Cluster_new_status)

grave dove
#

Yes it is global and it will apply to all metrics.

idle aurora
#

Of course I can open a new question. Is it possible to add a custom metric?

grave dove
#

We can add custom metrics to Harvest templates using plugins (https://netapp.github.io/harvest/24.02/plugins/). In your example, if these labels are coming from ONTAP, we can add them to custom_new_status. However, if they are static labels, then currently there is no support for adding them to a specific metric.

idle aurora
#

Can you give me an example according to my conditions? I don't quite understand how to implement this

grave dove
#

Are these are static labels which can change per cluster?

idle aurora
#

These are static labels, but I need one metric so that I can apply two different label values.An example picture from another exporter. That is, the metric is the same, the labels are the same, but the label values ​​are different

grave dove
#

Understood.In your example of cluster_new_status, the Location and vCenter will vary per poller. We currently don't have support to make such changes for a specific metric. It is only available at a global level, which is still per poller level but applies to all metrics of that poller. So, essentially, all metrics of that poller will have these labels, but these labels can change for different pollers.

idle aurora
grave dove
#

It is not possible currently. We'll need to implement such feature in Harvest.

pure gate