diff --git a/.gitignore b/.gitignore index 4a60032..6d65677 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -nagopher-checks +nagocheck dist/ # Created by .ignore support plugin (hsz.mobi) diff --git a/.goreleaser.yml b/.goreleaser.yml index ebc21bf..761a24c 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,6 +1,6 @@ builds: - main: ./ - binary: nagopher-checks + binary: nagocheck flags: -a -tags netgo ldflags: -s -w -X main.BuildVersion={{.Version}} -X main.BuildCommit={{.Commit}} -X main.BuildDate={{.Date}} @@ -26,7 +26,7 @@ archive: nfpm: vendor: Pascal Mathis maintainer: Pascal Mathis - homepage: https://github.com/snapserv/nagopher-checks + homepage: https://github.com/snapserv/nagocheck description: Reliable and lightweight Nagios plugins written in Go license: GPL-3.0 bindir: /usr/bin diff --git a/.idea/copyright/GPL_3_0.xml b/.idea/copyright/GPL_3_0.xml index 969430d..ffbdc9c 100644 --- a/.idea/copyright/GPL_3_0.xml +++ b/.idea/copyright/GPL_3_0.xml @@ -1,6 +1,6 @@ \ No newline at end of file diff --git a/.idea/markdown-exported-files.xml b/.idea/markdown-exported-files.xml new file mode 100644 index 0000000..5d1f129 --- /dev/null +++ b/.idea/markdown-exported-files.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..28a804d --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml index c624aad..c126c9b 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -2,7 +2,8 @@ - + + - + \ No newline at end of file diff --git a/.idea/nagocheck.iml b/.idea/nagocheck.iml new file mode 100644 index 0000000..c956989 --- /dev/null +++ b/.idea/nagocheck.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/Makefile b/Makefile index 0461f96..11475a9 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ GORELEASER = goreleaser BUILD_DATE := $(shell date +'%Y-%m-%d_%H:%M:%S') BUILD_COMMIT := $(shell git show -q --format='%H' HEAD) -PACKAGE = nagopher-checks +PACKAGE = nagocheck TARGET = $(CURDIR)/$(PACKAGE) PKGS = $(shell $(GO) list ./... | grep -v "$(PACKAGE)/shared") diff --git a/README.md b/README.md index 7be4844..8786b00 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# nagopher-checks +# nagocheck -[![Project Release](https://img.shields.io/github/release/snapserv/nagopher-checks.svg)](https://github.com/snapserv/nagopher-checks/releases/latest) -[![Project License](https://img.shields.io/badge/license-GPL--3.0-blue.svg)](https://github.com/snapserv/nagopher-checks/LICENSE.txt) +[![Project Release](https://img.shields.io/github/release/snapserv/nagocheck.svg)](https://github.com/snapserv/nagocheck/releases/latest) +[![Project License](https://img.shields.io/badge/license-GPL--3.0-blue.svg)](https://github.com/snapserv/nagocheck/LICENSE.txt) [![Go Version Compatibility](https://img.shields.io/badge/go_version-1.9_--_1.10-brightgreen.svg)](https://golang.org/) -[![Travis CI Build Status](https://img.shields.io/travis/snapserv/nagopher-checks/master.svg)](https://travis-ci.org/snapserv/nagopher-checks) -[![Coveralls Coverage Status](https://img.shields.io/coveralls/github/snapserv/nagopher-checks/master.svg)](https://coveralls.io/github/snapserv/nagopher-checks?branch=master) +[![Travis CI Build Status](https://img.shields.io/travis/snapserv/nagocheck/master.svg)](https://travis-ci.org/snapserv/nagocheck) +[![Coveralls Coverage Status](https://img.shields.io/coveralls/github/snapserv/nagocheck/master.svg)](https://coveralls.io/github/snapserv/nagocheck?branch=master) [![Project Copyright](http://img.shields.io/badge/copyright-Pascal_Mathis-lightgrey.svg)](https://www.pascalmathis.com/) ### Table of Contents diff --git a/commands.conf b/commands.conf index ffce3f9..b0287dd 100644 --- a/commands.conf +++ b/commands.conf @@ -1,4 +1,4 @@ -const nc_binary = "/usr/bin/nagopher-checks" +const nc_binary = "/usr/bin/nagocheck" const nc_base_args = { "--verbose" = { set_if = "$nc_verbose$" diff --git a/main.go b/main.go index 3fd99f3..0b44f32 100644 --- a/main.go +++ b/main.go @@ -1,5 +1,5 @@ /* - * nagopher-checks - Reliable and lightweight Nagios plugins written in Go + * nagocheck - Reliable and lightweight Nagios plugins written in Go * Copyright (C) 2018 Pascal Mathis * * This program is free software: you can redistribute it and/or modify @@ -20,9 +20,9 @@ package main import ( "fmt" - "github.com/snapserv/nagopher-checks/mod-frrouting" - "github.com/snapserv/nagopher-checks/mod-system" - "github.com/snapserv/nagopher-checks/shared" + "github.com/snapserv/nagocheck/mod-frrouting" + "github.com/snapserv/nagocheck/mod-system" + "github.com/snapserv/nagocheck/shared" "gopkg.in/alecthomas/kingpin.v2" "runtime" "strings" @@ -53,7 +53,7 @@ func main() { } } - kingpin.Version(fmt.Sprintf("nagopher-checks, version %s (commit: %s)\nbuild date: %s, runtime: %s", + kingpin.Version(fmt.Sprintf("nagocheck, version %s (commit: %s)\nbuild date: %s, runtime: %s", BuildVersion, BuildCommit, BuildDate, runtime.Version())) kingpin.CommandLine.HelpFlag.Short('h') kingpin.CommandLine.VersionFlag.Short('V') diff --git a/mod-frrouting/bgp_neighbor.go b/mod-frrouting/bgp_neighbor.go index b020c2d..8e502bd 100644 --- a/mod-frrouting/bgp_neighbor.go +++ b/mod-frrouting/bgp_neighbor.go @@ -1,5 +1,5 @@ /* - * nagopher-checks - Reliable and lightweight Nagios plugins written in Go + * nagocheck - Reliable and lightweight Nagios plugins written in Go * Copyright (C) 2018 Pascal Mathis * * This program is free software: you can redistribute it and/or modify @@ -22,8 +22,8 @@ import ( "encoding/json" "fmt" "github.com/snapserv/nagopher" - "github.com/snapserv/nagopher-checks/mod-frrouting/goffr" - "github.com/snapserv/nagopher-checks/shared" + "github.com/snapserv/nagocheck/mod-frrouting/goffr" + "github.com/snapserv/nagocheck/shared" "math" "net" "strings" diff --git a/mod-frrouting/goffr/goffr.go b/mod-frrouting/goffr/goffr.go index d7ce188..5467c8f 100644 --- a/mod-frrouting/goffr/goffr.go +++ b/mod-frrouting/goffr/goffr.go @@ -1,5 +1,5 @@ /* - * nagopher-checks - Reliable and lightweight Nagios plugins written in Go + * nagocheck - Reliable and lightweight Nagios plugins written in Go * Copyright (C) 2018 Pascal Mathis * * This program is free software: you can redistribute it and/or modify diff --git a/mod-frrouting/init.go b/mod-frrouting/init.go index c4edbec..67dc39c 100644 --- a/mod-frrouting/init.go +++ b/mod-frrouting/init.go @@ -1,5 +1,5 @@ /* - * nagopher-checks - Reliable and lightweight Nagios plugins written in Go + * nagocheck - Reliable and lightweight Nagios plugins written in Go * Copyright (C) 2018 Pascal Mathis * * This program is free software: you can redistribute it and/or modify @@ -19,8 +19,8 @@ package modfrrouting import ( - "github.com/snapserv/nagopher-checks/mod-frrouting/goffr" - "github.com/snapserv/nagopher-checks/shared" + "github.com/snapserv/nagocheck/mod-frrouting/goffr" + "github.com/snapserv/nagocheck/shared" ) type frroutingModule struct { diff --git a/mod-system/init.go b/mod-system/init.go index 675d334..3d08b43 100644 --- a/mod-system/init.go +++ b/mod-system/init.go @@ -1,5 +1,5 @@ /* - * nagopher-checks - Reliable and lightweight Nagios plugins written in Go + * nagocheck - Reliable and lightweight Nagios plugins written in Go * Copyright (C) 2018 Pascal Mathis * * This program is free software: you can redistribute it and/or modify @@ -18,7 +18,7 @@ package modsystem -import "github.com/snapserv/nagopher-checks/shared" +import "github.com/snapserv/nagocheck/shared" type systemModule struct { *shared.BaseModule diff --git a/mod-system/interface.go b/mod-system/interface.go index 172d9af..aee97fb 100644 --- a/mod-system/interface.go +++ b/mod-system/interface.go @@ -1,5 +1,5 @@ /* - * nagopher-checks - Reliable and lightweight Nagios plugins written in Go + * nagocheck - Reliable and lightweight Nagios plugins written in Go * Copyright (C) 2018 Pascal Mathis * * This program is free software: you can redistribute it and/or modify @@ -21,7 +21,7 @@ package modsystem import ( "fmt" "github.com/snapserv/nagopher" - "github.com/snapserv/nagopher-checks/shared" + "github.com/snapserv/nagocheck/shared" "math" ) diff --git a/mod-system/interface_linux.go b/mod-system/interface_linux.go index ce54ce8..9762f3a 100644 --- a/mod-system/interface_linux.go +++ b/mod-system/interface_linux.go @@ -1,5 +1,5 @@ /* - * nagopher-checks - Reliable and lightweight Nagios plugins written in Go + * nagocheck - Reliable and lightweight Nagios plugins written in Go * Copyright (C) 2018 Pascal Mathis * * This program is free software: you can redistribute it and/or modify diff --git a/mod-system/load.go b/mod-system/load.go index ec03e64..8d72bb5 100644 --- a/mod-system/load.go +++ b/mod-system/load.go @@ -1,5 +1,5 @@ /* - * nagopher-checks - Reliable and lightweight Nagios plugins written in Go + * nagocheck - Reliable and lightweight Nagios plugins written in Go * Copyright (C) 2018 Pascal Mathis * * This program is free software: you can redistribute it and/or modify @@ -21,7 +21,7 @@ package modsystem import ( "fmt" "github.com/snapserv/nagopher" - "github.com/snapserv/nagopher-checks/shared" + "github.com/snapserv/nagocheck/shared" "math" "runtime" ) diff --git a/mod-system/load_linux.go b/mod-system/load_linux.go index fe4bd8f..3c450e1 100644 --- a/mod-system/load_linux.go +++ b/mod-system/load_linux.go @@ -1,5 +1,5 @@ /* - * nagopher-checks - Reliable and lightweight Nagios plugins written in Go + * nagocheck - Reliable and lightweight Nagios plugins written in Go * Copyright (C) 2018 Pascal Mathis * * This program is free software: you can redistribute it and/or modify diff --git a/mod-system/memory.go b/mod-system/memory.go index cad90b8..b08b3ae 100644 --- a/mod-system/memory.go +++ b/mod-system/memory.go @@ -1,5 +1,5 @@ /* - * nagopher-checks - Reliable and lightweight Nagios plugins written in Go + * nagocheck - Reliable and lightweight Nagios plugins written in Go * Copyright (C) 2018 Pascal Mathis * * This program is free software: you can redistribute it and/or modify @@ -21,7 +21,7 @@ package modsystem import ( "fmt" "github.com/snapserv/nagopher" - "github.com/snapserv/nagopher-checks/shared" + "github.com/snapserv/nagocheck/shared" "math" ) diff --git a/mod-system/memory_linux.go b/mod-system/memory_linux.go index 41f4053..91d4655 100644 --- a/mod-system/memory_linux.go +++ b/mod-system/memory_linux.go @@ -1,5 +1,5 @@ /* - * nagopher-checks - Reliable and lightweight Nagios plugins written in Go + * nagocheck - Reliable and lightweight Nagios plugins written in Go * Copyright (C) 2018 Pascal Mathis * * This program is free software: you can redistribute it and/or modify @@ -20,7 +20,7 @@ package modsystem import ( "fmt" - "github.com/snapserv/nagopher-checks/shared" + "github.com/snapserv/nagocheck/shared" "io/ioutil" "regexp" "strconv" diff --git a/shared/module.go b/shared/module.go index 91e7d75..7bc5a8c 100644 --- a/shared/module.go +++ b/shared/module.go @@ -1,5 +1,5 @@ /* - * nagopher-checks - Reliable and lightweight Nagios plugins written in Go + * nagocheck - Reliable and lightweight Nagios plugins written in Go * Copyright (C) 2018 Pascal Mathis * * This program is free software: you can redistribute it and/or modify diff --git a/shared/plugin.go b/shared/plugin.go index 1beaae8..bb122c3 100644 --- a/shared/plugin.go +++ b/shared/plugin.go @@ -1,5 +1,5 @@ /* - * nagopher-checks - Reliable and lightweight Nagios plugins written in Go + * nagocheck - Reliable and lightweight Nagios plugins written in Go * Copyright (C) 2018 Pascal Mathis * * This program is free software: you can redistribute it and/or modify @@ -95,8 +95,8 @@ func (p *BasePlugin) ExecuteCheck(check *nagopher.Check) { // chosen wisely) and a persistent store, which is also named by the unique key passed. This is especially useful when // used with contexts like 'DeltaContext', which compare the current measurement against a previously measurement. func (p *BasePlugin) ExecutePersistentCheck(check *nagopher.Check, uniqueKey string, store interface{}) { - // Prefix unique key with 'nagopher-checks.' - uniqueKey = "nagopher-checks." + uniqueKey + // Prefix unique key with 'nagocheck.' + uniqueKey = "nagocheck." + uniqueKey // Attempt to grab flock on unique key fileLock := p.createFlock(uniqueKey) diff --git a/shared/store.go b/shared/store.go index 86425a6..c173e6c 100644 --- a/shared/store.go +++ b/shared/store.go @@ -1,5 +1,5 @@ /* - * nagopher-checks - Reliable and lightweight Nagios plugins written in Go + * nagocheck - Reliable and lightweight Nagios plugins written in Go * Copyright (C) 2018 Pascal Mathis * * This program is free software: you can redistribute it and/or modify diff --git a/shared/utils.go b/shared/utils.go index e75ee95..c21aa26 100644 --- a/shared/utils.go +++ b/shared/utils.go @@ -1,5 +1,5 @@ /* - * nagopher-checks - Reliable and lightweight Nagios plugins written in Go + * nagocheck - Reliable and lightweight Nagios plugins written in Go * Copyright (C) 2018 Pascal Mathis * * This program is free software: you can redistribute it and/or modify diff --git a/shared/values.go b/shared/values.go index 40e3efd..d3d6490 100644 --- a/shared/values.go +++ b/shared/values.go @@ -1,5 +1,5 @@ /* - * nagopher-checks - Reliable and lightweight Nagios plugins written in Go + * nagocheck - Reliable and lightweight Nagios plugins written in Go * Copyright (C) 2018 Pascal Mathis * * This program is free software: you can redistribute it and/or modify