Skip to content

Commit d77d47c

Browse files
MB-53077 Merge mad-hatter into cheshire-cat
Mad-Hatter: -MB-53077 Add support for memory threshold alert Change-Id: I6cca68b37f67c2e4fd8a27c926f3b67933e5a707
2 parents f997153 + 87caeda commit d77d47c

4 files changed

Lines changed: 21 additions & 2 deletions

File tree

cbmgr.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2122,6 +2122,8 @@ def __init__(self):
21222122
+ "apart")
21232123
group.add_argument("--alert-communication-issue", dest="alert_communication_issue",
21242124
action="store_true", help="Alert when nodes are experiencing communication issues")
2125+
group.add_argument("--alert-memory-threshold", dest="alert_memory_threshold",
2126+
action="store_true", help="Alert when system memory usage exceeds threshold")
21252127

21262128
@rest_initialiser(cluster_init_check=True, version_check=True)
21272129
def execute(self, opts):
@@ -2164,6 +2166,8 @@ def execute(self, opts):
21642166
alerts.append('ep_clock_cas_drift_threshold_exceeded')
21652167
if opts.alert_communication_issue:
21662168
alerts.append('communication_issue')
2169+
if opts.alert_memory_threshold:
2170+
alerts.append('memory_threshold')
21672171

21682172
enabled = "true"
21692173
if opts.enabled == "0":

docs/generated/doc/couchbase-cli/couchbase-cli-setting-alert.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,11 @@ <h2 id="_options">OPTIONS</h2>
619619
<p>Specifies that an email alert should be sent when nodes are experiencing
620620
communication issues.</p>
621621
</dd>
622+
<dt class="hdlist1">--alert-memory-threshold</dt>
623+
<dd>
624+
<p>Specifies that an email alert should be sent when any node&#8217;s system memory
625+
usage exceeds a threshold</p>
626+
</dd>
622627
</dl>
623628
</div>
624629
</div>

docs/generated/man/man1/couchbase-cli-setting-alert.1

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
.\" Title: couchbase-cli-setting-alert
33
.\" Author: Couchbase
44
.\" Generator: Asciidoctor 2.0.10
5-
.\" Date: 2021-04-22
5+
.\" Date: 2022-07-28
66
.\" Manual: Couchbase CLI Manual
77
.\" Source: Couchbase CLI 1.0.0
88
.\" Language: English
99
.\"
10-
.TH "COUCHBASE\-CLI\-SETTING\-ALERT" "1" "2021-04-22" "Couchbase CLI 1.0.0" "Couchbase CLI Manual"
10+
.TH "COUCHBASE\-CLI\-SETTING\-ALERT" "1" "2022-07-28" "Couchbase CLI 1.0.0" "Couchbase CLI Manual"
1111
.ie \n(.g .ds Aq \(aq
1212
.el .ds Aq '
1313
.ss \n[.ss] 0
@@ -213,6 +213,12 @@ machines in the cluster are more that five seconds apart.
213213
Specifies that an email alert should be sent when nodes are experiencing
214214
communication issues.
215215
.RE
216+
.sp
217+
\-\-alert\-memory\-threshold
218+
.RS 4
219+
Specifies that an email alert should be sent when any node\(cqs system memory
220+
usage exceeds a threshold
221+
.RE
216222
.SH "HOST FORMATS"
217223
.sp
218224
When specifying a host for the couchbase\-cli command the following formats are expected:

docs/modules/cli/pages/cbcli/couchbase-cli-setting-alert.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@ include::{partialsdir}/cbcli/part-common-options.adoc[]
128128
Specifies that an email alert should be sent when nodes are experiencing
129129
communication issues.
130130

131+
--alert-memory-threshold::
132+
Specifies that an email alert should be sent when any node's system memory
133+
usage exceeds a threshold
134+
131135
include::{partialsdir}/cbcli/part-host-formats.adoc[]
132136

133137
== EXAMPLES

0 commit comments

Comments
 (0)