Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace upper default boundary for percentage with infinity instead o… #40

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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 cmd/filesystem.go
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ func init() {
IsSet: true,
Th: check.Threshold{
Lower: 2,
Upper: 100,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a bit more context on why? Intuitively I would have said a percentage - having a Latin "per cento" origin meaning "from 100" - would have 100 as upper.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is indeed true and was my original thought here. The problem is, that some Monitoring systems (Icinga) chose to ignore the standard and are unable to parse the range format (2:100), so I replaced that here with infinity which results in the range of 2: which can be parsed and is functionally equivalent.
Tl:dr: It's a hack.

Upper: check.PosInf,
},
},
},
Expand All @@ -576,7 +576,7 @@ func init() {
IsSet: true,
Th: check.Threshold{
Lower: 5,
Upper: 100,
Upper: check.PosInf,
},
},
},
Expand Down
4 changes: 2 additions & 2 deletions cmd/memory.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ func init() {
IsSet: true,
Th: check.Threshold{
Lower: 15,
Upper: 100,
Upper: check.PosInf,
},
},
},
Expand All @@ -340,7 +340,7 @@ func init() {
IsSet: true,
Th: check.Threshold{
Lower: 5,
Upper: 100,
Upper: check.PosInf,
},
},
},
Expand Down
Loading