Categorygithub.com/dodopizza/prometheus-shell-exporter
repository
0.0.0-20220202131316-04b6ae1bb413
Repository: https://github.com/dodopizza/prometheus-shell-exporter.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# README

Prometheus Shell Exporter

Shell Exporter can execute Powershell or Bash scripts and transform its output to Prometheus metrics.

Metrics

Shell Exporter exposes metrics based on your Powershell or Bash scripts names. Examples of scripts can be finded at metrics folder

Script nameMetric name
bash_gauge.shbash_gauge
pse_tcp_connection_metrics.ps1pse_tcp_connection_metrics
pse_tcp_dynamic_port_range_number_of_ports.ps1pse_tcp_dynamic_port_range_number_of_ports

Startup options

OptionDefault valueDescription
--f./metricsscripts directory
--port9360exporter port
--help-show help
--version-show exporter version

Installing as Windows Service

  1. Download binary
  2. Install nssm via Chocolatey
ActionCommand
installnssm install shell_exporter C:\shell-exporter.exe -f C:\scripts
removenssm remove shell_exporter confirm

Development

  1. Make branch from master
  2. Reopen repo at vscode container
  3. Make necessary changes
  4. Push it to branch and make pull-request

Makefile targets

TargetAction
buildbuild binary for linux and windows platforms
tidyremove all dependencies from the go.mod file which are not required in the source files
testrun unit tests
lintrun linting
runrun exporter locally