|
1 | 1 | go-check
|
2 | 2 | ========
|
3 | 3 |
|
| 4 | +[](https://github.com/NETWAYS/go-check/releases) |
4 | 5 | [](https://pkg.go.dev/github.com/NETWAYS/go-check)
|
5 | 6 | [](https://github.com/NETWAYS/go-check/actions?query=workflow%3AGo)
|
| 7 | + |
6 | 8 | 
|
7 | 9 |
|
8 | 10 | go-check is a library to help with development of monitoring plugins for tools like Icinga.
|
9 | 11 |
|
10 | 12 | ## Usage
|
11 | 13 |
|
12 | 14 | ```go
|
13 |
| -import "github.com/NETWAYS/go-check" |
| 15 | +package main |
| 16 | + |
| 17 | +import ( |
| 18 | + "github.com/NETWAYS/go-check" |
| 19 | + log "github.com/sirupsen/logrus" |
| 20 | + "os" |
| 21 | +) |
| 22 | + |
| 23 | +func main() { |
| 24 | + config := check.NewConfig() |
| 25 | + config.Name = "check_test" |
| 26 | + config.Readme = `Test Plugin` |
| 27 | + config.Version = "1.0.0" |
| 28 | + |
| 29 | + _ = config.FlagSet.StringP("hostname", "H", "localhost", "Hostname to check") |
| 30 | + |
| 31 | + os.Args = []string{"check_example", "--help"} |
| 32 | + |
| 33 | + config.ParseArguments() |
| 34 | + |
| 35 | + log.Info("test") |
| 36 | +} |
14 | 37 | ```
|
15 | 38 |
|
16 |
| -<!-- TODO: add more information and usage examples --> |
| 39 | +See the [documentation on pkg.go.dev](https://pkg.go.dev/github.com/NETWAYS/go-check) for more details and examples. |
| 40 | + |
| 41 | +## Plugins |
| 42 | + |
| 43 | +A few plugins using go-check: |
| 44 | + |
| 45 | +* [check_cloud_aws](https://github.com/NETWAYS/check_cloud_aws) |
| 46 | +* [check_cloud_azure](https://github.com/NETWAYS/check_cloud_azure) |
| 47 | +* [check_cloud_gcp](https://github.com/NETWAYS/check_cloud_gcp) |
| 48 | +* [check_sentinelone](https://github.com/NETWAYS/check_sentinelone) |
| 49 | +* [check_sophos_central](https://github.com/NETWAYS/check_sophos_central) |
17 | 50 |
|
18 | 51 | ## License
|
19 | 52 |
|
20 |
| -Copyright (c) 2020 [NETWAYS GmbH ]([email protected]) |
| 53 | +Copyright (c) 2020 [NETWAYS GmbH ](mailto:[email protected]) |
21 | 54 |
|
22 | 55 | This library is distributed under the GPL-2.0 or newer license found in the [COPYING](./COPYING)
|
23 | 56 | file.
|
0 commit comments