#LIF up_time counter is not being exported as expected

1 messages · Page 1 of 1 (latest)

wild ivy
#

Hi all, I am gathering LIF up_time counter with zapiperf on ONTAP 9.12.1 and can't make it being exported. Another counters work as expected, smb2_established_sessions for instance - the configuration seems valid.
name: LIF
query: lif
object: lif

counters:
- instance_name => lif
- vserver_name => svm
- up_time => uptime

export_options:
instance_keys:
- lif
- svm

I checked with harvest zapi tool - both established sessions and up_time counter look pretty similar and i expect they to be collected, but isn't working for up_time
Cheers

unborn dome
#

@wild ivy Could you share template. Shared one seems to have lost special chars. You can email that to us as well @ ng-harvest-files@netapp.com

wild ivy
#

just sent

unborn dome
#

Thanks received.

wild ivy
#

before i have given up i tried to include up_time to lif.yaml file in zapiperf collection which is shipped with Harvest, it didn't work either. Then i have splitted the single counter to a different file

unborn dome
#

@wild ivy Can you try below template


name:                     LIF
query:                    lif
object:                   lif

counters:
  - instance_name            => lif
  - vserver_name             => svm
  - up_time                  => uptime

override:
  - up_time: raw

export_options:
  instance_keys:
    - lif
    - svm
unborn dome
wild ivy
#

i have restarted with the override option, waiting for the polling interval now

#

Yes, i confirm - it is now listed as expected

unborn dome
#

Yes override is not usually used. We used it here as ontap return type is string for up_time

#

We'll document override option.

wild ivy
#

what is the use case for the override? The exported value must be always 'raw'? and when ontap returns any other value type you must override (cast it to raw??) it with the option?

unborn dome
#

The use of override is not always necessary. Override value is not always set to raw. The possible values it can take are raw, rate, delta, percent, or string. The choice of value depends on the specific requirements of the counter we are working with. We apply an override when it's necessary to change the default behavior. For instance, in the case of the up_time counter, we had to implement an override. The reason being, the original value was returned as a string, but our requirement was to export it as counter. Therefore, we overwrote the original value as raw to meet our specific needs. raw indicated that we don't want to do any processing on this counter and export it as it is. See here for more details https://netapp.github.io/harvest/23.08/configure-zapi/#metrics_1

wild ivy
#

fantastic support! much appreciated!

#

i would also like to add that even logging=0 did not complain on metric type ignored/skipped due to this value type situation. Would be a great improvement to a debug. Or did i miss it in debug logs?

unborn dome
#

The behavior you're observing is expected and by design. Any metric of string type is automatically treated as a label for the LIF metrics.

#

for example in case of below template


name:                     LIF
query:                    lif
object:                   lif

counters:
  - current_port             => port
  - instance_name
  - instance_uuid
  - node_name                => node
  - recv_data
  - recv_errors
  - recv_packet
  - sent_data
  - sent_errors
  - sent_packet
  - vserver_name             => svm
  - up_time                  => uptime

export_options:
  instance_keys:
    - lif
    - node
    - port
    - svm
    - uptime

metrics will come like below. You can see uptime as label for metrics