#template for export policy /rule ?

1 messages · Page 1 of 1 (latest)

lavish belfry
#

i m trying to build dashboard for team to what we have exported for volume

#

i tried with this , (first doing it 🙂
name: ExportRule
query: api/protocols/nfs/export-policies
object: export_rule

counters:

  • ^^uuid => uuid
  • ^svm.name => svm
  • ^name => name
  • ^rules.index => index
  • ^rules.clients.match => clients
  • ^rules.clients.protocols => protocols
  • ^rules.clients.ro_rule => ro_rule
  • ^rules.clients.rw_rule => rw_rule
  • ^rules.clients.superuser => superuser

export_options:
instance_keys:
- id
instance_labels:
- svm
- name
- clients
- protocols
- gateway
- ro_rule
- rw_rule
- superuser

nimble folio
#

hi @lavish belfry that template is close. Try this
`name: ExportRule
query: api/protocols/nfs/export-policies
object: export_rule

counters:

  • ^^id => id
  • ^svm.name => svm
  • ^name => name
  • ^rules.index => index
  • ^rules.clients.match => clients
  • ^rules.clients.protocols => protocols
  • ^rules.clients.ro_rule => ro_rule
  • ^rules.clients.rw_rule => rw_rule
  • ^rules.clients.superuser => superuser

export_options:
instance_keys:
- id
instance_labels:
- svm
- name
- clients
- protocols
- gateway
- ro_rule
- rw_rule
- superuser`

lavish belfry
#

Thank you @nimble folio got the policy name but still does not show rule

#

i guess need to change rules.client to rules.protocols

nimble folio
#

checking

#

ah! I see this api is returning those rules as an array of rules which is not handled via template syntax. There are few other cases like this that we've handled via plugins. I don't think you'll be able to get the rules without a plugin until we add support for array handling

lavish belfry
#

@nimble folio ahh i see , Thank you for help , i will do this via powershell for now

nimble folio
#

glad you have a workaround - we'll add this

nimble folio
nimble folio
#

@lavish belfry if you make progress on this and want us to match your export format, please share what you have and we'll do our best to match. For example, since a rule contains an array of clients, there are a couple od different ways we could represent that relationship:

a) join those four clients into a single label that is comma-separated like this: clients="10.65.180.65,10.65.176.223,0.0.0.0/0,192.168.1.10"
b) publish four metrics, each with a different client from the list above

I assume you want something similar to export-policy rule show which would be #b instead of a

lavish belfry
#

@nimble folio Yes B options is correct , this also help to find if per client export rule 🙂

lavish belfry
#

Get-NcNfsExport does not work well, i have pass -path for each vol which is not good idea , 😦 powershell is not option
Multiple values are not supported for 'nosuid' option any alternet on this

nimble folio
#

We should have something for you to try soon. We'll ping you

nimble folio
lavish belfry
#

@nimble folio Thank you , it's working

nimble folio
#

great!

lavish belfry
#

@nimble folio now i m trying find uniq 🙂 per vol per host 🙂

#

instant 🙂