StarlingX Node Interface Metrics Exporter App
d78c050a20
following the image tagging process on Docker Hub, The image version within the Helm repository has been updated to match the newly created tag stx.10.0-v1.0.1 Test plan: PASSED: Build process is successful with creation of debian package. PASSED: Unpack the Debian package and verify if the Helm chart tar file exists. PASSED: Using 'system application' commands in AIO-SX env app was uploaded, applied, removed, and ultimately deleted without errors. PASSED: After installation, verified App responded on http://localhost:9110. PASSED: Deleting "All" removed the associated Helm chart and all K8s resources. Depends-On: https://review.opendev.org/c/starlingx/root/+/920955 Story: 2010918 Task: 50241 Change-Id: Ife4be1fef0b2d403d192ceed456ad3f815046b99 Signed-off-by: Aman Pandae <AmanPandae.Mothukuri@windriver.com> |
||
---|---|---|
helm-charts/custom/node-interface-metrics-exporter-helm | ||
metrics-exporter-api | ||
python3-k8sapp-node-interface-metrics-exporter | ||
stx-node-interface-metrics-exporter | ||
.gitignore | ||
.gitreview | ||
.zuul.yaml | ||
bindep.txt | ||
debian_build_layer.cfg | ||
debian_iso_image.inc | ||
debian_pkg_dirs | ||
debian_stable_docker_images.inc | ||
README.md | ||
requirements.txt | ||
test-requirements.txt | ||
tox.ini |
app-node-interface-metrics-exporter
app-node-interface-metrics-exporter flux cd app
Top Level Directory Structure
├── app-node-interface-metrics-exporter # Root Folder
│ ├── debian_build_layer.cfg
│ ├── debian_iso_image.inc
│ ├── debian_pkg_dirs
│ ├── metrics-exporter-api # Go code for api server which will expose Metrics for NIC .
│ ├── python3-k8sapp-node-interface-metrics-exporter # lifecycle managemnt code to support flux apps
│ ├── README.md
│ ├── requirements.txt
│ ├── stx-node-interface-metrics-exporter # helm Package manager for the app
│ ├── test-requirements.txt
│ └── tox.ini
all command related to go code should run from
app-node-interface-metrics-exporter/metrics-exporter-api/docker/metrics-exporter-api
About metrics-exporter-api
It is Simple Http Server which reads network interface (PCI devices) and exposes following API's
- http://{hostname}:{port}/metrics -- all node metrics in OpenMetrics format
- http://{hostname}:{port}/metrics/device/{DeviceName} -- specified interface metrics identified by device name in OpenMetrics format
- http://{hostname}:{port}/metrics/pci-addr/{PciAddr} -- specified interface metrics identified by PCI address in OpenMetrics format
- http://{hostname}:{port}/json/metrics -- all node metrics in JSON format
- http://{hostname}:{port}/json/metrics/device/{DeviceName} -- specified interface metrics identified by device name in JSON format
- http://{hostname}:{port}/json/metrics/pci-addr/{PciAddr} -- specified interface metrics identified by PCI address in JSON format
Makefile Support
$ make
help: Show this help.
install_dep: install go dependency
run: run app on host machine
test: run go unit test
testcov: run go coverage test
vet: run go vet
lint: run go lint
build_linux: Build application
build_image: Build docker image
$ make run
will start go dev http server
Run time Options / params for the metrics-exporter-app usage
Options | Help |
---|---|
-log.file |
Log file name (default "node_metrics_api.log") |
-log.level |
log level. (default "info"). Valid options trace, debug, info, warning, error, fatal and panic |
-log.file |
Log file name (default "node_metrics_api.log") |
-web.listen-address |
Port to listen on for web interface. (default ":9110") |
-path.sys |
mounted path for host /sys inside container (default "/sys") |
Local / Devlopment Set UP for metrics-exporter-api
pre requisite go 1.21.0