Categorygithub.com/yzguy/netgear_cm_exporter
modulepackage
0.0.0-20231213191944-fc9cccf7496b
Repository: https://github.com/yzguy/netgear_cm_exporter.git
Documentation: pkg.go.dev

# README

Netgear Cable Modem Exporter

Prometheus exporter for NETGEAR cable modems

Supported Devices

These Netgear models have been tested and are officially supported:

  • Netgear CM1000

Installation

You can build and install the exporter locally by running:

go get github.com/yzguy/netgear_cm_exporter

Usage

Usage of ./netgear_cm_exporter:
  -config.file string
    	Path to configuration file. (default "netgear_cm_exporter.yml")
  -version
    	Print version information.

An example configuration file is provided in netgear_cm_exporter.yml showing all the possible configuration options. The values in the example are the defaults

You can also specify password via an environment variable

  • NETGEAR_MODEM_PASSWORD
modem:
  password: <your password here>

Grafana Dashboard

A sample grafana dashboard can be found in the grafana/ directory. You can import netgear_cable_modem.json into your Grafana instance to get up and running with a quick dashboard.

Grafana Dashboard Screenshot

# Functions

NewConfigFromFile reads the configuration file from the given path and returns a populated Config struct.
NewExporter returns an instance of Exporter configured with the modem's address, admin username and password.

# Structs

Config represents the yaml config file structure.
Exporter represents an instance of the Netgear cable modem exporter.
Modem represents the address of the modem and its admin credentials.
Telemetry represents the exporter's listen address and metrics URI path.