nodeinfo

command module
v1.3.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

README

nodeinfo

GoDoc Build Status Coverage Status Go Report Card

This collects data about the hardware, software, and configs on nodes on the M-Lab platform. Every hour (in expectation, with some randomization) the output of lspci, lshw, ifconfig, and others is written to disk. This allows us to track the configuration of fleet nodes over time.

Available as a container in measurementlab/nodeinfo on Docker Hub.

design

As simple as possible. This system is called nodeinfo. Every command produces its own type of data, and so is it own datatype. These two facts, together with M-Lab's unified naming scheme for data, and the best practices for Pusher mean that the directory structure for output is fully determined.

This program calls a series of other programs, and directs the output of each call to the appropriate output file. The set of programs to call is currently hard-coded in the binary. If any of the commands run unsuccessfully, this crashes. Every command is rerun every hour on average, with some randomness. The inter-run times are drawn from the exponential distribution to try and make sure the resulting series of measurements has the PASTA property.

example config file

[
  {
    "Datatype": "lshw",
    "Filename": "lshw.json",
    "Cmd":      ["lshw", "-json"]
  },
  {
    "Datatype": "lspci",
    "Filename": "lspci.txt",
    "Cmd":      ["lspci", "-mm", "-vv", "-k", "-nn"]
  },
  {
    "Datatype": "lsusb",
    "Filename": "lsusb.txt",
    "Cmd":      ["lsusb", "-v"]
  },
  {
    "Datatype": "ip-address",
    "Filename": "ip-address.txt",
    "Cmd":      ["ip", "address", "show"]
  },
  {
    "Datatype": "ip-route-4",
    "Filename": "ip-route-4.txt",
    "Cmd":      ["ip", "-4", "route", "show"]
  },
  {
    "Datatype": "ip-route-6",
    "Filename": "ip-route-6.txt",
    "Cmd":      ["ip", "-6", "route", "show"]
  },
  {
    "Datatype": "uname",
    "Filename": "uname.txt",
    "Cmd":      ["uname", "-a"]
  },
  {
    "Datatype": "os-release",
    "Filename": "os-release.txt",
    "Cmd":      ["cat", "/etc/os-release"]
  },
  {
    "Datatype": "bios_version",
    "Filename": "bios_version.txt",
    "Cmd":      ["cat", "/sys/class/dmi/id/bios_version"]
  },
  {
    "Datatype": "chassis_serial",
    "Filename": "chassis_serial.txt",
    "Cmd":      ["cat", "/sys/class/dmi/id/chassis_serial"]
  }
]

Documentation

Overview

nodeinfo is a utility program for gathering all hw/sw/config data from a node that may be operationally relevant. It is intended to produce lots of small files, each with the output of "ifconfig" or "lshw" or another command like that. The hope is that by doing this, we will be able to track over time what hardware was installed, what software versions were running, and how the network was configured on every node in the M-Lab fleet.

nodeinfo reads the list of commands and datatypes in from a config file. It rereads the config file every time it runs, to allow that file to be deployed as a ConfigMap in kubernetes.

Directories

Path Synopsis
Package api defines the datatype generated by this tool.
Package api defines the datatype generated by this tool.
Package config implements all configuration-related logic for this repo.
Package config implements all configuration-related logic for this repo.
Package data provides all the methods needed for collecting and saving node data to disk.
Package data provides all the methods needed for collecting and saving node data to disk.
Package metrics implements all monitoring-related Prometheus metrics for this repo.
Package metrics implements all monitoring-related Prometheus metrics for this repo.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL