Skip to content

Commit d6cd125

Browse files
committed
Remove one-line output for nodes
1 parent 3296cc2 commit d6cd125

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ Nagios-style checks against Kubernetes API. Designed for usage with Nagios, Icin
3131
- Unbound Persistent Volumes in unboundpvs mode; default is 5
3232
- Job failed count in jobs mode; default is 2
3333
- Pvc storage utilization; default is 90%
34-
-b Brief mode (more suitable for Zabbix)
3534
-M EXIT_CODE Exit code when resource is missing; default is 2 (CRITICAL)
3635
-h Show this help and exit
3736

@@ -112,7 +111,7 @@ Check utilization if pvc (if consumes more than %):
112111
CRITICAL. Very high storage utilization on pvc prometheus-data: 93% (86106636288/157459890176 Bytes)
113112

114113

115-
## Brief mode
114+
## Brief mode (removed in v1.1.0)
116115

117116
All modes support the -b brief option. In this mode, a single numerical output is returned. The number is positive on success and zero or negative on error.
118117

account.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ rules:
2323
resources:
2424
- pods
2525
- nodes
26-
# - secrets
26+
- secrets
2727
- persistentvolumes
2828
verbs:
2929
- get

check_kubernetes.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,15 +164,15 @@ mode_nodes() {
164164
.status")"
165165
if [ "$ready" != True ]; then
166166
EXITCODE=2
167-
OUTPUT="ERROR. ${OUTPUT}Node $node not ready\n"
167+
OUTPUT="${OUTPUT}Node $node not ready. "
168168
fi
169169
for condition in OutOfDisk MemoryPressure DiskPressure; do
170170
state="$(echo "$data" | jq -r ".items[] | select(.metadata.name==\"$node\") | \
171171
.status.conditions[] | select(.type==\"$condition\") | \
172172
.status")"
173173
if [ "$state" = True ]; then
174174
[ $EXITCODE -lt 1 ] && EXITCODE=1
175-
OUTPUT="WARN. ${OUTPUT} $node $condition\n"
175+
OUTPUT="${OUTPUT} $node $condition. "
176176
fi
177177
done
178178
done

0 commit comments

Comments
 (0)