atc0005 / check-path

Go-based tooling to check/verify filesystem paths as part of a Nagios service check
MIT License
3 stars 0 forks source link

Add support for "present" and "missing" (or equivalent meaning) modifiers #5

Open atc0005 opened 4 years ago

atc0005 commented 4 years ago

The current design that I'm going to polish up for a v0.1.0 release is based on dual yes/no flags for an attribute. This means for a size check we have a warning threshold and a critical threshold. This makes sense.

However, for an existence check I also provided two flags, one to signify that a match is a WARNING state, another to signify that a CRITICAL state has been reached. That's not too bad, but now I'm ready to work in support for asserting the presence (or lack) of permissions for owner, group or other.

If I go with the existing design, this would mean 9 flags for signifying that a value should be present, and another 9 flags for signifying that a value should not be present. This is a bit much and likely not something that a sysadmin wants to have to spell out with 20+ flags per Nagios command definition.

Instead, we can have a base set of attribute flags and set of modifiers like so:

Current thinking:

Because the modifiers would only apply to existence checks we wouldn't need (or allow) more than one.

atc0005 commented 4 years ago

The modifiers would apply to flags like these: