4af59c5c7d
This commit adds code in GO language to expose Physical Function interface device info and statistics (metrics) of a node using REST API service. NIC Statistics provided by Netlink. Following APIs are implemented: /metrics -- all statistics in OpenMetrics format /metrics/device/{DeviceName} -- particular device statistics in OpenMetrics format /metrics/pci-addr/{PciAddr} -- particular pci-address statistics in OpenMetrics format /json/metrics -- all metrics in json format /json/metrics/device/{DeviceName} -- particular device statistics in json format /json/metrics/pci-addr/{PciAddr} -- particular pci-address statistics in json format Test Plan: PASS: GO linting PASS: Unit test PASS: Api test. PASS: Docker image build process defined here [1] PASS: Created container image of this app, pushed to local registry and deployed on AIO-SX lab using sample deployment file. Then tested the APIs and validated the results. Story: 2010918 Task: 48794 [1]https://docs.starlingx.io/developer_resources/build_docker_image.html Change-Id: I5229b338b9e9afff3b02fe2389cfcd0c4e0590f6 Signed-off-by: AbhishekJ <abhishek.jaiswal@windriver.com>
1 line
20 B
PHP
1 line
20 B
PHP
metrics-exporter-api |