Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ title: SNClient
linkTitle: SNClient
weight: 400
tags:
- nsclient
- snclient
- nsclient
- naemon
- prometheus
- windows
- linux
- osx
- macos
---

[![CICD Pipeline](https://github.com/Consol-Monitoring/snclient/actions/workflows/builds.yml/badge.svg?branch=main)](https://github.com/Consol-Monitoring/snclient/actions/workflows/builds.yml)
Expand Down
3 changes: 2 additions & 1 deletion docs/checks/commands/check_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ these can be used in filters and thresholds (along with the default attributes):
| implemented | check is available on current platform: 0 / 1 |
| windows | check is available on Windows: 0 / 1 |
| linux | check is available on Linux: 0 / 1 |
| osx | check is available on macOS: 0 / 1 |
| macos | check is available on macOS: 0 / 1 |
| osx | alias for macos: 0 / 1 |
| freebsd | check is available on FreeBSD: 0 / 1 |
| alias | check is an alias: 0 / 1 |
| script | check is a (wrapped) script: 0 / 1 |
Expand Down
2 changes: 1 addition & 1 deletion docs/prometheus/node.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ weight: 340
tags:
- prometheus
- linux
- osx
- macos
- node_exporter
- exporter
---
Expand Down
8 changes: 5 additions & 3 deletions pkg/snclient/check_index.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ func (l *CheckIndex) Build() *CheckData {
{name: "implemented", description: "check is available on current platform: 0 / 1"},
{name: "windows", description: "check is available on Windows: 0 / 1"},
{name: "linux", description: "check is available on Linux: 0 / 1"},
{name: "osx", description: "check is available on macOS: 0 / 1"},
{name: "macos", description: "check is available on macOS: 0 / 1"},
{name: "osx", description: "alias for macos: 0 / 1"},
{name: "freebsd", description: "check is available on FreeBSD: 0 / 1"},
{name: "alias", description: "check is an alias: 0 / 1"},
{name: "script", description: "check is a (wrapped) script: 0 / 1"},
Expand Down Expand Up @@ -73,7 +74,7 @@ func (l *CheckIndex) Check(_ context.Context, snc *Agent, check *CheckData, _ []
"implemented": "0",
"windows": "0",
"linux": "0",
"osx": "0",
"macos": "0",
"freebsd": "0",
"alias": "0",
"script": "0",
Expand All @@ -95,10 +96,11 @@ func (l *CheckIndex) Check(_ context.Context, snc *Agent, check *CheckData, _ []
entry["implemented"] = bool2Str[chk.isImplemented(runtime.GOOS)]
entry["windows"] = bool2Str[chk.isImplemented("windows")]
entry["linux"] = bool2Str[chk.isImplemented("linux")]
entry["osx"] = bool2Str[chk.isImplemented("darwin")]
entry["macos"] = bool2Str[chk.isImplemented("darwin")]
entry["freebsd"] = bool2Str[chk.isImplemented("freebsd")]
}

entry["osx"] = entry["macos"]
check.listData = append(check.listData, entry)
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/snclient/check_ntp_offset.go
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ func (l *CheckNTPOffset) addOSX(ctx context.Context, check *CheckData, force boo
return fmt.Errorf("this is a macOS command")
}

entry := l.defaultEntry("osx")
entry := l.defaultEntry("macos")

reBrackets := regexp.MustCompile(`\((.*)\)\s*$`)
output, server, err := l.getOSXData(ctx)
Expand Down
Loading