#New Prometheus label to track update progress

1 messages · Page 1 of 1 (latest)

still dew
#

We want to retrieve ONTAP update progress via Private CLI to use in alert expressions to cut down on noise due to ONTAP upgrades. How would I create a custom object template to collect ndu-phase, and phase-status and have it be included as a label at the cluster level?

#

I'm using K8s to deploy so this is what I was thinking so far however I'm not confident this would work as I don't have anything uniquely identifing a cluster here

   name:                         ImageUpgrade
   query:                        api/private/cli/cluster/image/show-update-progress
   object:                       image_upgrade

   counters:
     - ^^ndu_phase => update_phase
     - ^^phase_status => upgrade_status
     - filter:
       - ndu_phase=ontap-updates

   export_options:
     instance_labels:
       - upgrade_status```
kind crest
#

@still dew If ndu_phase and phase_status do not form a unique key, Harvest will log an error. I have tried the following template, which produces the metrics shown below.

For the clusters I have tested, I received only one record.

name:                         ImageUpgrade
query:                        api/private/cli/cluster/image/show-update-progress
object:                       image_upgrade

counters:
  - ^^ndu_phase                      => update_phase
  - ^^phase_status                   => upgrade_status
  - filter:
      - ndu_phase=ontap-updates

export_options:
  instance_keys:
    - update_phase
  instance_labels:
    - upgrade_status
kind crest
#

@still dew There is another public API that provides update progress but at the node level: api/cluster/software?fields=update_details. This API might also be useful. However, it returns data in an array structure, which would likely require us to develop a Go plugin to parse the information. If this is something you are interested in, please open a feature request at https://github.com/NetApp/harvest/issues.

still dew
#

Yes absolutely! We in ANF want a reliable way to track update progress across clusters since we have a large fleet. I will definitely put in a feature request 🙂

kind crest
#

Thanks!

copper osprey
#

@still dew Are you interested to have the detail of validation_results and status_details from the public api api/cluster/software ?