1= couchbase-cli-setting-alert(1)
2ifndef::doctype-manpage[:doctitle: setting-alert]
3
4ifdef::doctype-manpage[]
5== NAME
6
7couchbase-cli-setting-alert -
8endif::[]
9Modifies alert settings
10
11== SYNOPSIS
12
13[verse]
14_couchbase-cli setting-alert_ [--cluster <url>] [--username <user>]
15    [--password <password>] [--enable-email-alert <num>]
16    [--email-recipients <email_list>] [--email-sender <email>]
17    [--email-user <user>] [--email-password <password>] [--email-host <host>]
18    [--email-port <port>] [--enable-email-encrypt <num>]
19    [--alert-auto-failover-node] [--alert-auto-failover-max-reached]
20    [--alert-auto-failover-node-down] [--alert-auto-failover-cluster-small]
21    [--alert-auto-failover-disable] [--alert-ip-changed] [--alert-disk-space]
22    [--alert-meta-overhead] [--alert-meta-oom] [--alert-write-failed]
23    [--alert-audit-msg-dropped] [--alert-indexer-max-ram]
24    [--alert-timestamp-drift-exceeded]
25
26== DESCRIPTION
27
28This command is used to set up email alerts on a cluster. Couchbase provides
29alerts for various issues that may arise in the cluster where it is recommended
30that the cluster administrator take action to ensure that applications continue
31to function properly. When setting up email alerts administrator can decide who
32gets alert emails and which alerts are sent.
33
34== OPTIONS
35
36include::{partialsdir}/cbcli/part-common-options.adoc[]
37
38--enable-email-alert <num>::
39  Enables email alerts on this cluster. Set this option to "1" to enable
40  alerts or "0" to disable alerts. This parameter is required.
41
42--email-recipients <email_list>::
43  A comma separated list of users to email when an alert is raised in the
44  server.
45
46--email-sender <email>::
47  If email alerts an enabled then this option will set the sender email
48  address.
49
50--email-user <user>::
51  The email server username for the sender email address. This field is
52  required if the email address provided requires authentication.
53
54--email-password <password>::
55  The email server password for the sender email address. This field is
56  required if the email address provided requires authentication.
57
58--email-host <host>::
59  The email server hostname that hosts the email address specified by the
60  --sender-email option.
61
62--email-port <port>::
63  The email server port number of the server that hosts the email address
64  specified by the --sender-email option.
65
66--enable-email-encrypt <num>::
67  Enables SSL encryption when connecting to the email server. Set this option
68  to "1" to enable encryption or "0" to disable encryption. If this option is
69  not set then encryption will be disabled.
70
71--alert-auto-failover-node::
72  Specifies that an email alert should be sent when a node is automatically
73  failed over.
74
75--alert-auto-failover-max-reached::
76  Specifies that an email alert should be sent when the maximum amount of
77  auto-failovers is reached.
78
79--alert-auto-failover-node-down::
80  Specifies that an email alert should be sent when auto-failover could not be
81  completed because another node in the cluster was already down.
82
83--alert-auto-failover-cluster-small::
84  Specifies that an email alert should be sent when auto-failover could not be
85  completed because the cluster is too small.
86
87--alert-auto-failover-disable::
88  Specifies that an email alert should be sent when auto-failover could not be
89  completed because auto-failover is disabled on this cluster.
90
91--alert-ip-changed::
92  Specifies that an email alert should be sent when the IP address on a node
93  in the cluster changes.
94
95--alert-disk-space::
96  Specifies that an email alert should be sent when the disk usage on a node
97  in the cluster reaches 90% of the available disk space.
98
99--alert-meta-overhead::
100  Specifies that an email alert should be sent when the metadata overhead on
101  the data service is more than 50%.
102
103--alert-meta-oom::
104  Specifies that an email alert should be sent when all of the memory in the
105  cache for a bucket is used by metadata. If this condition is hit the bucket
106  will be unusable until more memory is added to the bucket cache.
107
108--alert-write-failed::
109  Specifies that an email alert should be sent when writing data to disk on
110  the data service has failed.
111
112--alert-audit-msg-dropped::
113  Specifies that an email alert should be sent when writing event to audit log
114  fails.
115
116--alert-indexer-max-ram::
117  Specifies that an email alert should be sent when the memory usage for the
118  indexer service on a specific node exceeds the per node memory usage limit.
119  This warning is only shown for if the index storage type is Memory Optimized
120  Indexes (MOI).
121
122--alert-timestamp-drift-exceeded::
123  Specifies that an email alert should be sent if the clocks on two different
124  machines in the cluster are more that five seconds apart.
125
126--alert-communication-issue::
127  Specifies that an email alert should be sent when nodes are experiencing
128  communication issues.
129
130include::{partialsdir}/cbcli/part-host-formats.adoc[]
131
132== EXAMPLES
133
134To enable failover related email alerts for two users without email encryption
135run the following command below:
136
137  $ couchbase-cli setting-alert -c 192.168.1.5 --username Administrator \
138   --password password --enable-email-alert 1 --email-user admin \
139   --email-password password --email-host mail.couchbase.com --email-port 25 \
140   --email-recipients user1@couchbase.com,user2@couchbase.com \
141   --email-sender noreply@couchbase.com --enable-email-encrypt 0 \
142   --alert-auto-failover-node --alert-auto-failover-max-reached \
143   --alert-auto-failover-node-down --alert-auto-failover-cluster-small \
144
145To enable all email alerts for a single users with email encryption run the
146following command below:
147
148  $ couchbase-cli setting-alert -c 192.168.1.5 --username Administrator \
149   --password password --enable-email-alert 1 --email-user admin \
150   --email-password password --email-host mail.couchbase.com --email-port 25 \
151   --email-recipients user@couchbase.com --email-sender noreply@couchbase.com \
152   --enable-email-encrypt 1 --alert-auto-failover-node \
153   --alert-auto-failover-max-reached --alert-auto-failover-node-down \
154   --alert-auto-failover-cluster-small --alert-auto-failover-disable \
155   --alert-ip-changed --alert-disk-space --alert-meta-overhead \
156   --alert-meta-oom --alert-write-failed --alert-audit-msg-dropped \
157   --alert-indexer-max-ram --alert-timestamp-drift-exceeded \
158
159To disable email alerts run the following command:
160
161  $ couchbase-cli setting-alert -c 192.168.1.5 --username Administrator \
162   --password password --enable-email-alert 0
163
164== ENVIRONMENT AND CONFIGURATION VARIABLES
165
166include::{partialsdir}/cbcli/part-common-env.adoc[]
167
168== SEE ALSO
169
170man:couchbase-cli-setting-notification[1]
171
172include::{partialsdir}/cbcli/part-footer.adoc[]
173