Merge ~xavpaice/charm-nrpe:lp-1659728 into ~nrpe-charmers/charm-nrpe:master

Proposed by Xav Paice
Status: Rejected
Rejected by: Paul Gear
Proposed branch: ~xavpaice/charm-nrpe:lp-1659728
Merge into: ~nrpe-charmers/charm-nrpe:master
Diff against target: 15 lines (+5/-0)
1 file modified
files/plugins/check_conntrack.sh (+5/-0)
Reviewer Review Type Date Requested Status
NRPE charm developers Pending
Review via email: mp+317732@code.launchpad.net

Description of the change

return OK if nf_conntrack_max not present

Fixes: 1659728

To post a comment you must log in.
Revision history for this message
Paul Gear (paulgear) wrote :

Unmerged commits

740159c... by Xav Paice

[xavpaice] return OK if nf_conntrack_max not present

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/files/plugins/check_conntrack.sh b/files/plugins/check_conntrack.sh
2index 0cfaf28..5aa1601 100755
3--- a/files/plugins/check_conntrack.sh
4+++ b/files/plugins/check_conntrack.sh
5@@ -20,6 +20,11 @@ if ! lsmod | grep -q conntrack; then
6 exit $STATE_OK
7 fi
8
9+if ! [ -f /proc/sys/net/netfilter/nf_conntrack_max ] ; then
10+ echo "OK: no conntrack max present"
11+ exit $STATE_OK
12+fi
13+
14 max=$(sysctl net.netfilter.nf_conntrack_max | awk '{ print $3 }')
15 current=$(sysctl net.netfilter.nf_conntrack_count | awk '{ print $3 }')
16

Subscribers

People subscribed via source and target branches