Skip to content

Commit 52c564b

Browse files
MB-53077 Merge cheshire-cat into neo
Mad-Hatter: - MB-53077 Add support for memory threshold alert Change-Id: I7232b2ab3a128da881c18cf324c0280e6e0bceb8
2 parents 4f700f5 + d77d47c commit 52c564b

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

cbmgr.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2256,6 +2256,8 @@ def __init__(self):
22562256
"node")
22572257
group.add_argument("--alert-disk-analyzer", dest="alert_disk_analyzer", action="store_true",
22582258
help="Alert when the disk analyzer gets stuck")
2259+
group.add_argument("--alert-memory-threshold", dest="alert_memory_threshold",
2260+
action="store_true", help="Alert when system memory usage exceeds threshold")
22592261

22602262
@rest_initialiser(cluster_init_check=True, version_check=True)
22612263
def execute(self, opts):
@@ -2302,6 +2304,8 @@ def execute(self, opts):
23022304
alerts.append('time_out_of_sync')
23032305
if opts.alert_disk_analyzer:
23042306
alerts.append('disk_usage_analyzer_stuck')
2307+
if opts.alert_memory_threshold:
2308+
alerts.append('memory_threshold')
23052309

23062310
enabled = "true"
23072311
if opts.enabled == "0":

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ _couchbase-cli setting-alert_ [--cluster <url>] [--username <user>] [--password
2424
[--alert-meta-overhead] [--alert-meta-oom] [--alert-write-failed]
2525
[--alert-audit-msg-dropped] [--alert-indexer-max-ram]
2626
[--alert-timestamp-drift-exceeded] [--alert-node-time] [--alert-disk-analyzer]
27+
[--alert-memory-threshold]
2728

2829
== DESCRIPTION
2930

@@ -137,6 +138,10 @@ include::{partialsdir}/cbcli/part-common-options.adoc[]
137138
Specifies that an email alert should be sent if the disk analyzer process
138139
gets stuck and cannot fetch disk usage data.
139140

141+
--alert-memory-threshold::
142+
Specifies that an email alert should be sent when any node's system memory
143+
usage exceeds a threshold
144+
140145
include::{partialsdir}/cbcli/part-host-formats.adoc[]
141146

142147
include::{partialsdir}/cbcli/part-certificate-authentication.adoc[]
@@ -167,7 +172,7 @@ following command below:
167172
--alert-ip-changed --alert-disk-space --alert-meta-overhead \
168173
--alert-meta-oom --alert-write-failed --alert-audit-msg-dropped \
169174
--alert-indexer-max-ram --alert-timestamp-drift-exceeded \
170-
--alert-node-time --alert-disk-analyzer
175+
--alert-node-time --alert-disk-analyzer --alert-memory-threshold
171176

172177
To disable email alerts run the following command:
173178

0 commit comments

Comments
 (0)