🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

opendev.org/starlingx/app-node-interface-metrics-exporter

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

opendev.org/starlingx/app-node-interface-metrics-exporter

v0.0.0-20240827132610-9f4bbb93d479
Go
Version published
Created
Source

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

OptionsHelp
-log.fileLog file name (default "node_metrics_api.log")
-log.levellog level. (default "info"). Valid options trace, debug, info, warning, error, fatal and panic
-log.fileLog file name (default "node_metrics_api.log")
-web.listen-addressPort to listen on for web interface. (default ":9110")
-path.sysmounted path for host /sys inside container (default "/sys")

Local / Devlopment Set UP for metrics-exporter-api

pre requisite go 1.21.0

Container image reference for helm

Dockerfile

Build Reference

References

StarlingX

How to add a FluxCD App to Starlingx

OpenMetrics

FAQs

Package last updated on 27 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts