From 057d267ca57cd30f98d77699ef395ae34ed76f7e Mon Sep 17 00:00:00 2001 From: rahulguptajss Date: Thu, 24 Oct 2024 16:46:50 +0530 Subject: [PATCH] feat: add netport metric doc --- cmd/tools/generate/counter.go | 2 -- cmd/tools/generate/counter.yaml | 12 ++++++++++++ docs/ontap-metrics.md | 12 +++++++++++- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/cmd/tools/generate/counter.go b/cmd/tools/generate/counter.go index 20d070898..e8f1cb3cd 100644 --- a/cmd/tools/generate/counter.go +++ b/cmd/tools/generate/counter.go @@ -163,7 +163,6 @@ var ( "_labels", "volume_arw_status", "ALERTS", - "net_port_status", } // Exclude extra metrics for ZAPI @@ -173,7 +172,6 @@ var ( "security_", "svm_ldap", "ALERTS", - "net_port_status", } ) diff --git a/cmd/tools/generate/counter.yaml b/cmd/tools/generate/counter.yaml index 753469fb9..1576d0498 100644 --- a/cmd/tools/generate/counter.yaml +++ b/cmd/tools/generate/counter.yaml @@ -1927,3 +1927,15 @@ counters: Endpoint: api/support/ems/events ONTAPCounter: Harvest generated Template: conf/ems/9.6.0/ems.yaml + + - Name: net_port_status + Description: This metric indicates a value of 1 if the port state is up and a value of 0 for any other state. + APIs: + - API: REST + Endpoint: NA + ONTAPCounter: Harvest generated + Template: conf/rest/9.12.0/netport.yaml + - API: ZAPI + Endpoint: NA + ONTAPCounter: Harvest generated + Template: conf/zapi/cdot/9.8.0/netport.yaml \ No newline at end of file diff --git a/docs/ontap-metrics.md b/docs/ontap-metrics.md index 30120af3d..b84092e80 100644 --- a/docs/ontap-metrics.md +++ b/docs/ontap-metrics.md @@ -7,7 +7,7 @@ These can be generated on demand by running `bin/harvest grafana metrics`. See - More information about ONTAP REST performance counters can be found [here](https://docs.netapp.com/us-en/ontap-pcmap-9121/index.html). ``` -Creation Date : 2024-Oct-23 +Creation Date : 2024-Oct-24 ONTAP Version: 9.15.1 ``` ## Understanding the structure @@ -4046,6 +4046,16 @@ Maximum transmission unit, largest packet size on this network | ZAPI | `net-port-get-iter` | `net-port-info.mtu` | conf/zapi/cdot/9.8.0/netport.yaml | +### net_port_status + +This metric indicates a value of 1 if the port state is up and a value of 0 for any other state. + +| API | Endpoint | Metric | Template | +|--------|----------|--------|---------| +| REST | `NA` | `Harvest generated` | conf/rest/9.12.0/netport.yaml | +| ZAPI | `NA` | `Harvest generated` | conf/zapi/cdot/9.8.0/netport.yaml | + + ### netstat_bytes_recvd Number of bytes received by a TCP connection