You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
3.0 KiB

[units(2)]
args=field,units
definition = eval $field$ = $field$ + " $units$"
[unitize]
definition = `units(sys_avg_latency,"ms")` | `units(sys_read_latency,"ms")` | `units(sys_write_latency,"ms")` | `units(cpu_busy_percent,"%")` | `units(sys_avg_latency_average,"ms")` | `units(read_ops_rate,"/s")` | `units(cifs_ops_rate,"/sec")` | `units(fcp_ops_rate,"/s")` | `units(http_ops_rate,"/s")` | `units(iscsi_ops_rate,"/s")` | `units(nfs_ops_rate,"/s")` | `units(total_ops_rate,"/s")` | `units(write_ops_rate,"/s")` | `units(disk_data_read_rate,"KB/s")` | `units(disk_data_written_rate,"KB/s")` | `units(total_processor_busy_percent,"%")` | `units(net_data_recv_rate,"KB/s")` | `units(net_data_sent_rate,"KB/s")` | `units(percentage_used,"%")` | `units(snapshot_percent_reserved,"%")` | `units(gb_free,"GB")` | `units(gb_total,"GB")` | `units(gb_used,"GB")` | `units(percent_used,"%")`
[SystemHostname(1)]
args = name
definition = `ontap-index` (source="system-get-info" OR source="system-get-node-info-iter" OR source="cluster-identity-get") (host="$name$" OR system-name="$name$" OR cluster-name="$name$") | head 1 | table host
[BytesToGigaBytes(1)]
args = bytes
definition = tostring(round(($bytes$)/(1024*1024*1024), 2))
[CapacityByHost]
definition = `ontap-index` sourcetype=ontap:volume (source="volume-list-info-iter-start" OR source="volume-get-iter") | `CoalesceVolumeFields` | eval gb_used=`BytesToGigaBytes(sz_used)` | eval gb_free=`BytesToGigaBytes(sz_free)` | eval gb_total=`BytesToGigaBytes(sz_total)` | stats first(*) as * by host, name | table host, gb_used, gb_free, gb_total | stats sum(*) as * by host | eval percent_used=round(100*gb_used/gb_total,1)
[NormalizeName(3)]
args = name_eval, name_7m, name_cm
definition = eval $name_eval$=if(isnull($name_7m$), $name_cm$, $name_7m$)
[CoalesceVolumeFields]
definition = `NormalizeName("sz_free", $size-available$, $volume-space-attributes.size-available$)` | `NormalizeName("sz_used", $size-used$, $volume-space-attributes.size-used$)` | `NormalizeName("sz_total", $size-total$, $volume-space-attributes.size-total$)` | `NormalizeName("snapshot-percent-reserved", $snapshot-percent-reserved$, $volume-space-attributes.percentage-snapshot-reserve$)` | `NormalizeName("percentage-used", $percentage-used$, $volume-space-attributes.percentage-size-used$)` | `NormalizeName("containing-aggregate", $containing-aggregate$, $volume-id-attributes.containing-aggregate-name$)` | `NormalizeName("name", name, $volume-id-attributes.name$)`
[CoalesceAggrFields]
definition = `NormalizeName("sz_free", $size-available$, $aggr-space-attributes.size-available$)` | `NormalizeName("sz_used", $size-used$, $aggr-space-attributes.size-used$)` | `NormalizeName("sz_total", $size-total$, $aggr-space-attributes.size-total$)` | `NormalizeName("size-percentage-used", $size-percentage-used$, $aggr-space-attributes.percent-used-capacity$)` | `NormalizeName("volume-count", $volume-count$, $aggr-volume-count-attributes.flexvol-count$)` | `NormalizeName("name", name, $aggregate-name$)`
[ontap-index]
definition = index=ontap