#Preferred DC

1 messages · Page 1 of 1 (latest)

inner fog
#

Hello, having an issue trying to get preferred DC API collecting properly. I am able to see preferred DC’s when I run the api against a cluster, api/protocols/cifs/domains, however, I can’t get any preferred dc’s to show up when running the custom collector. This is how I have my custom rest collector set up:

name: PreferredDC
query: api/protocols/cifs/domains
object: preferred_dc

counters:
     - ^^svm.uuid => uuid
     - ^svm.name => svm
     - ^preferred_dcs.server_ip => server_ip
     - ^preferred_dcs.fqdn => fqdn

export_options:
     instance_keys:
         - uuid
         - svm
     instance_labels:
         - server_ip
         - fqdn
drifting kayak
#

hi @inner fog can you edit you post and paste the template between triple backslacks as type yaml so Discord doesn't mangle it?

Like this

name: PreferredDC
query: api/protocols/cifs/domains
object: preferred_dc
inner fog
#

@drifting kayak , thanks for the advice, I’ve fixed it!

drifting kayak
#

thanks, much easier to read now!

drifting kayak
#

Your template is close - looks like ONTAP does not return preferred_dcs when you ask for all fields via fields=* That often means that fields is more expensive to get so it's omitted by default. You can tell Harvest to include that field explicitly with hidden_fields. Give this a try and see if it works for you:

name: PreferredDC
query: api/protocols/cifs/domains
object: preferred_dc

counters:
  - ^^svm.uuid                 => uuid
  - ^svm.name                  => svm
  - ^preferred_dcs.#.server_ip => server_ip
  - ^preferred_dcs.#.fqdn      => fqdn
  - hidden_fields:
      - preferred_dcs

export_options:
  instance_keys:
    - uuid
    - svm
  instance_labels:
    - server_ip
    - fqdn
inner fog
#

Excellent! This worked as expected. Thanks @drifting kayak !!

neat hound
#

@inner fog I'm curious about this use-case. Can you post a picture of your dashboard? I would love to learn what you're doing

inner fog
#

Hi @neat hound , unfortunately my org has discord blocked so I’m posting this from my personal mobile device. We have to set preferred-dc for some clusters as they were not routing to the correct DC automatically.