Skip to content

Commit

Permalink
rename repository to snmp-export
Browse files Browse the repository at this point in the history
  • Loading branch information
jelmd committed Jun 26, 2022
1 parent 8313414 commit 0a4b398
Show file tree
Hide file tree
Showing 19 changed files with 21 additions and 165 deletions.
136 changes: 0 additions & 136 deletions .circleci/config.yml

This file was deleted.

7 changes: 0 additions & 7 deletions .dockerignore

This file was deleted.

4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
following template.
If you include CLI output, please run those programs with additional parameters:
snmp_exporter: `-log.level=debug`
snmp-export: `-L debug`
snmpbulkget etc: `-On`
-->

### Host operating system: output of `uname -a`

### snmp_exporter version: output of `snmp_exporter -version`
### snmp-export version: output of `snmp-export -V`
<!-- If building from source, run `make` first. -->

### What device/snmpwalk OID are you using?
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ _testmain.go

*.exe
dependencies-stamp
/snmp_exporter
/snmp-export
/.build
/.release
/.tarballs
Expand Down
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
SHELL := $(shell [ -x /bin/ksh93 ] && echo '/bin/ksh93' || echo '/bin/bash' )

VERSION := 2.0.0
PKG_PREFIX := github.com/prometheus/snmp_exporter
PATCH ?= patch

# If you have your libnetsnmp.so in a non-standard directory, you may set the
Expand Down Expand Up @@ -92,7 +91,7 @@ clean-mibs:
rm -rf $(MIBDIR) generator/mibs

clean: clean-mibs
rm -rf bin snmp_exporter generator/generator
rm -rf bin snmp-export generator/generator

realclean: clean
go clean
Expand Down
2 changes: 1 addition & 1 deletion collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
"github.com/prometheus/client_golang/prometheus"
"gopkg.in/alecthomas/kingpin.v2"

"github.com/prometheus/snmp_exporter/config"
"github.com/jelmd/snmp-export/config"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion collector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/prometheus/client_model/go"
kingpin "gopkg.in/alecthomas/kingpin.v2"

"github.com/prometheus/snmp_exporter/config"
"github.com/jelmd/snmp-export/config"
)

func TestPduToSample(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ var (
}
)

// Config for the snmp_exporter.
// Config for snmp-export.
type Config map[string]*Module

type WalkParams struct {
Expand Down
2 changes: 1 addition & 1 deletion generator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ unit1SensorSetHigh:
Again, the 2nd regex pair is important, otherwise no match would happen for values != 0 and thus no new metric created (and the original gets dropped as usual).

#### remap
This optional setting allows one to replace a metric's value using a map (instead of a bunch of regex pairs). After the optional regex\_extracts got applied, the value gets converted into its string representation and used as key for the lookup within the map. On match the value of the entry found becomes the metric's value. However, for `counter`, `gauge`, `Float`, `Double`, `DateAndTime` and `EnumAs*` a new value gets parsed as Float64 first - only if convertion succeeds, the new value will be set (otherwise the metric value is kept as is). If the result of a map lookup is `@drop@` the related metric gets dropped. For `Bits` no remapping gets applied (create an issue on [github](https://github.com/jelmd/snmp_exporter/issues), if you really need it).
This optional setting allows one to replace a metric's value using a map (instead of a bunch of regex pairs). After the optional regex\_extracts got applied, the value gets converted into its string representation and used as key for the lookup within the map. On match the value of the entry found becomes the metric's value. However, for `counter`, `gauge`, `Float`, `Double`, `DateAndTime` and `EnumAs*` a new value gets parsed as Float64 first - only if convertion succeeds, the new value will be set (otherwise the metric value is kept as is). If the result of a map lookup is `@drop@` the related metric gets dropped. For `Bits` no remapping gets applied (create an issue on [github](https://github.com/jelmd/snmp-export/issues), if you really need it).


#### rename
Expand Down
2 changes: 1 addition & 1 deletion generator/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package main
import (
"fmt"

"github.com/prometheus/snmp_exporter/config"
"github.com/jelmd/snmp-export/config"
)

// The generator config.
Expand Down
2 changes: 1 addition & 1 deletion generator/generator.apc.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This is a configuration file for the
# https://github.com/jelmd/snmp_exporter/tree/main/generator
# https://github.com/jelmd/snmp-export/tree/main/generator
# (C) 2022 by Jens Elkner ([email protected])
#
# To translate it into a YAML spec conforming file, you need to pass it through
Expand Down
2 changes: 1 addition & 1 deletion generator/generator.cisco.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This is a configuration file for the
# https://github.com/jelmd/snmp_exporter/tree/main/generator
# https://github.com/jelmd/snmp-export/tree/main/generator
# (C) 2022 by Jens Elkner ([email protected])

# To translate it into a YAML spec conforming file, you need to pass it through
Expand Down
2 changes: 1 addition & 1 deletion generator/generator.printer.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This is a configuration file for the
# https://github.com/jelmd/snmp_exporter/tree/main/generator
# https://github.com/jelmd/snmp-export/tree/main/generator
# (C) 2022 by Jens Elkner ([email protected])
#
# To translate it into a YAML spec conforming file, you need to pass it through
Expand Down
2 changes: 1 addition & 1 deletion generator/generator.rittal.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This is a configuration file for the
# https://github.com/jelmd/snmp_exporter/tree/main/generator
# https://github.com/jelmd/snmp-export/tree/main/generator
# (C) 2022 by Jens Elkner ([email protected])

# To translate it into a YAML spec conforming file, you need to pass it through
Expand Down
4 changes: 2 additions & 2 deletions generator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"gopkg.in/alecthomas/kingpin.v2"
yaml "gopkg.in/yaml.v3"

"github.com/prometheus/snmp_exporter/config"
"github.com/jelmd/snmp-export/config"
)

// Version must be set via -ldflags '-X'
Expand Down Expand Up @@ -61,7 +61,7 @@ func annotateOIDs(node *yaml.Node, nameToNode map[string]*Node) {
}
}

// Generate a snmp_exporter config and write it out.
// Generate a snmp-export config and write it out.
func generateConfig(nodes *Node, nameToNode map[string]*Node, logger log.Logger) error {
outputPath, err := filepath.Abs(*outputPath)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion generator/tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"github.com/go-kit/log"
"github.com/go-kit/log/level"

"github.com/prometheus/snmp_exporter/config"
"github.com/jelmd/snmp-export/config"
)

// These types have one following the other.
Expand Down
2 changes: 1 addition & 1 deletion generator/tree_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"testing"

"github.com/go-kit/log"
"github.com/prometheus/snmp_exporter/config"
"github.com/jelmd/snmp-export/config"
yaml "gopkg.in/yaml.v2"
)

Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module github.com/prometheus/snmp_exporter
module github.com/jelmd/snmp-export

require (
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect
github.com/go-kit/kit v0.12.0
github.com/go-kit/log v0.2.1 // indirect
github.com/go-kit/kit v0.12.0 // indirect
github.com/go-kit/log v0.2.1
github.com/gosnmp/gosnmp v1.35.0
github.com/prometheus/client_golang v1.12.1
github.com/prometheus/client_model v0.2.0
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
"gopkg.in/alecthomas/kingpin.v2"
yaml "gopkg.in/yaml.v2"

"github.com/prometheus/snmp_exporter/config"
"github.com/jelmd/snmp-export/config"
)

// Version must be set via -ldflags '-X'
Expand Down

0 comments on commit 0a4b398

Please sign in to comment.