Skip to content

Commit e35c72c

Browse files
committed
Merge branch 'main' into DOC-4681
2 parents 73e1423 + 97bb16a commit e35c72c

File tree

6 files changed

+126
-127
lines changed

6 files changed

+126
-127
lines changed

content/operate/rc/api/_index.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ You can use the API to:
3333

3434
1. [Manage subscriptions]({{< relref "/operate/rc/api/examples/manage-subscriptions.md" >}})
3535
1. Database examples
36-
- [Create database]({{< relref "/operate/rc/api/examples/create-database" >}})
37-
- [Update database]({{< relref "/operate/rc/api/examples/update-database.md" >}})
36+
- [Create and manage databases]({{< relref "/operate/rc/api/examples/create-database" >}})
3837
- [Back up and import data]({{< relref "/operate/rc/api/examples/back-up-and-import-data.md" >}})
3938
1. [Estimate costs]({{< relref "/operate/rc/api/examples/dryrun-cost-estimates.md" >}})
4039

content/operate/rc/api/examples/create-database.md

Lines changed: 56 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,45 +5,79 @@ categories:
55
- docs
66
- operate
77
- rc
8-
description: This article describes how to create and manage a database using `cURL`
9-
commands.
10-
linkTitle: Create databases
8+
description: This article describes how to create and manage a database using the Redis Cloud API.
9+
linkTitle: Create and manage databases
1110
weight: 20
1211
---
1312

14-
You can use the Redis Cloud REST API to create databases.
13+
You can use the Redis Cloud REST API to create and manage databases.
1514

16-
These examples use the [`cURL` utility]({{< relref "/operate/rc/api/get-started/use-rest-api#use-the-curl-http-client" >}}). You can use any REST client to work with the Redis Cloud REST API. The examples in this article refer to Redis Cloud Pro databases.
15+
## Redis Cloud Essentials
1716

18-
## Create a database
17+
### Create an Essentials database
1918

20-
To create a database, use `POST /subscriptions/{subscription-id}/databases`
19+
To create a Redis Cloud Essentials database, use [`POST /fixed/subscriptions/{subscriptionId}/databases`]({{< relref "/operate/rc/api/api-reference#tag/Databases-Essentials/operation/createFixedDatabase" >}}).
2120

22-
The database is created in an existing or a newly created subscription.
21+
This call creates a database in the specified subscription. Use [`GET /fixed/subscriptions`]({{< relref "/operate/rc/api/api-reference#tag/Subscriptions-Essentials/operation/getAllSubscriptions_1" >}}) to get a list of Essentials subscriptions and their IDs.
2322

24-
When a subscription is created, it is created with at least one database.
23+
```shell
24+
POST "https://[host]/v1/fixed/subscriptions/{subscriptionId}/databases"
25+
{
26+
"name": "Basic-essentials-database-example"
27+
}
28+
```
29+
30+
This example JSON body contains only the most basic, required parameters to create a database:
31+
32+
- `name`: The database name. A unique name per subscription that can contain only alphanumeric characters and hyphens
33+
34+
There are other additional parameters and settings that can be defined on database creation. Review the database parameters and options in the [full API reference]({{< relref "/operate/rc/api/api-reference#tag/Databases-Essentials/operation/createFixedDatabase" >}}).
35+
36+
Some options may not be compatible with your selected plan. Use [`GET /fixed/subscriptions/{subscriptionId}`]({{< relref "/operate/rc/api/api-reference#tag/Subscriptions-Essentials/operation/getFixedSubscriptionsPlansBySubscriptionId" >}}) to view the plan you have selected and what options it supports.
37+
38+
The response body contains the `taskId` for the task that creates the database. You can use [`GET /v1/tasks/{taskId}`]({{< relref "/operate/rc/api/api-reference#tag/Tasks/operation/getTaskById" >}}) to track the task's status.
39+
40+
### Update an Essentials database
2541

26-
You can add databases to the subscription; you can also update or delete existing databases.
42+
To update a Redis Cloud Essentials database, use [`PUT /fixed/subscriptions/{subscriptionId}/databases/{databaseId}`]({{< relref "/operate/rc/api/api-reference#tag/Databases-Essentials/operation/deleteFixedDatabaseByID" >}}).
2743

28-
Creating a database is an [asynchronous operation]({{< relref "/operate/rc/api/get-started/process-lifecycle" >}}).
44+
The primary component of a database update request is the JSON request body that contains the details of the requested database changes. You can see the full set of changes you can make in the [full API reference]({{< relref "/operate/rc/api/api-reference#tag/Databases-Essentials/operation/deleteFixedDatabaseByID" >}}).
2945

30-
The following API call creates a database.
46+
Some options may not be compatible with your selected plan. Use [`GET /fixed/subscriptions/{subscriptionId}`]({{< relref "/operate/rc/api/api-reference#tag/Subscriptions-Essentials/operation/getFixedSubscriptionsPlansBySubscriptionId" >}}) to view the plan you have selected and what options it supports.
47+
48+
The response body contains the `taskId` for the task that updates the database. You can use [`GET /v1/tasks/{taskId}`]({{< relref "/operate/rc/api/api-reference#tag/Tasks/operation/getTaskById" >}}) to track the task's status.
49+
50+
## Redis Cloud Pro
51+
52+
### Create a Pro database
53+
54+
If you want to create a Pro database in a new subscription, see [Create a Pro subscription]({{< relref "/operate/rc/api/examples/manage-subscriptions#create-a-pro-subscription" >}}).
55+
56+
To create a Redis Cloud Pro database in an existing subscription, use [`POST /subscriptions/{subscriptionId}/databases`]({{< relref "/operate/rc/api/api-reference#tag/Databases-Pro/operation/createDatabase" >}}).
57+
58+
This call creates a database in the specified subscription. Use [`GET /subscriptions`]({{< relref "/operate/rc/api/api-reference#tag/Subscriptions-Pro/operation/getAllSubscriptions" >}}) to get a list of subscriptions and their IDs.
3159

3260
```shell
33-
POST "https://[host]/v1/subscriptions/$SUBSCRIPTION_ID/databases"
61+
POST "https://[host]/v1/subscriptions/{subscriptionId}/databases"
3462
{
35-
"name": "Database-example-basic",
36-
"memoryLimitInGb": 10,
37-
"password": "P@ssw0rd"
63+
"name": "Basic-database-example",
64+
"datasetSizeInGb": 1
3865
}
3966
```
4067

41-
The JSON body contains only the most basic, required parameters in order to create a database:
68+
This example JSON body contains only the most basic, required parameters to create a database:
69+
70+
- `name`: The database name. A unique name per subscription that can contain only alphanumeric characters and hyphens
71+
- `datasetSizeInGb`: Maximum dataset size in GB
72+
73+
There are many additional parameters and settings that can be defined on database creation. Review the database parameters and options in the [full API reference]({{< relref "/operate/rc/api/api-reference#tag/Databases-Pro/operation/createDatabase" >}}).
74+
75+
The response body contains the `taskId` for the task that creates the database. You can use [`GET /v1/tasks/{taskId}`]({{< relref "/operate/rc/api/api-reference#tag/Tasks/operation/getTaskById" >}}) to track the task's status.
76+
77+
### Update a Redis Cloud Pro database
4278

43-
- Database name - A unique name per subscription that can contain only alphanumeric characters and hyphens
44-
- Maximum database size in GB
45-
- Database password
79+
To update a Redis Cloud Pro database, use [`PUT /subscriptions/{subscriptionId}/databases/{databaseId}`]({{< relref "/operate/rc/api/api-reference#tag/Databases-Pro/operation/updateDatabase" >}}).
4680

47-
### Additional database parameters
81+
The primary component of a database update request is the JSON request body that contains the details of the requested database changes. You can see the full set of changes you can make in the [full API reference]({{< relref "/operate/rc/api/api-reference#tag/Databases-Pro/operation/updateDatabase" >}}).
4882

49-
There are many additional parameters and settings that can be defined on database creation. Review the database parameters and options in the [Full API documentation]({{< relref "/operate/rc/api/api-reference#tag/Databases-Pro/operation/createDatabase" >}}).
83+
The response body contains the `taskId` for the task that updates the database. You can use [`GET /v1/tasks/{taskId}`]({{< relref "/operate/rc/api/api-reference#tag/Tasks/operation/getTaskById" >}}) to track the task's status.

content/operate/rc/api/examples/manage-subscriptions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Modify the following parameters in the sample JSON document to create a subscrip
3838

3939
Use [`GET /v1/fixed/plans`]({{< relref "/operate/rc/api/api-reference#tag/Subscriptions-Essentials/operation/getAllFixedSubscriptionsPlans" >}}) to get a list of plan IDs.
4040

41-
After you create an Essentials subscription, you must use the [`POST /v1/fixed/subscriptions/{subscriptionId}/databases`]({{< relref "/operate/rc/api/api-reference#tag/Databases-Essentials/operation/createFixedDatabase" >}}) endpoint to create the database.
41+
After you create an Essentials subscription, you must use the [`POST /v1/fixed/subscriptions/{subscriptionId}/databases`]({{< relref "/operate/rc/api/api-reference#tag/Databases-Essentials/operation/createFixedDatabase" >}}) endpoint to [create the database]({{< relref "/operate/rc/api/examples/create-database#redis-cloud-essentials" >}}).
4242

4343
You can include the contents of the JSON document in the `POST /v1/fixed/subscriptions` operation in the [Swagger UI](https://api.redislabs.com/v1/swagger-ui.html). See [Swagger user interface]({{< relref "/operate/rc/api/get-started/use-rest-api#swagger-user-interface" >}}) for more details.
4444

content/operate/rc/api/examples/update-database.md

Lines changed: 0 additions & 86 deletions
This file was deleted.

content/operate/rs/clusters/logging/redis-slow-log.md

Lines changed: 66 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
Title: View Redis slow log
2+
Title: View and manage Redis slow log
33
alwaysopen: false
44
categories:
55
- docs
@@ -9,32 +9,32 @@ description: null
99
linkTitle: Slow log
1010
weight: $weight
1111
---
12-
On the **Databases** \> **Slowlog** page, you can view Slow Log details
13-
for Redis Enterprise Software databases.
1412

15-
[Redis Slow Log](http://redis.io/commands/slowlog) is one of the best
13+
[Redis slow log]({{<relref "/commands/slowlog">}}) is one of the best
1614
tools for debugging and tracing your Redis database, especially if you
1715
experience high latency and high CPU usage with Redis operations.
18-
Because Redis is based on a single threaded architecture, Redis Slow Log
16+
Because Redis is based on a single threaded architecture, Redis slow log
1917
can be much more useful than slow log mechanisms of multi-threaded
20-
database systems such as MySQL Slow Query Log.
18+
database systems such as MySQL slow query log.
2119

22-
Unlike tools that introduce lock overhead (which complicates the debugging
23-
process), Redis Slow Log is highly effective at showing the actual processing time of each command.
20+
Unlike tools that introduce lock overhead, which complicates the debugging
21+
process, Redis slow log is highly effective at showing the actual processing time of each command.
2422

25-
Redis Enterprise Software includes enhancements to the standard Redis
26-
Slow Log capabilities that allow you to analyze the execution time
23+
## Redis Software slow log enhancements
24+
25+
Redis Software includes enhancements to the standard Redis
26+
slow log capabilities that allow you to analyze the execution time
2727
complexity of each command. This enhancement can help you better analyze
2828
Redis operations, allowing you to compare the differences between
2929
execution times of the same command, observe spikes in CPU usage, and
3030
more.
3131

3232
This is especially useful with complex commands such as
33-
[ZUNIONSTORE](http://redis.io/commands/zunionstore),
34-
[ZINTERSTORE](http://redis.io/commands/zinterstore) and
35-
[ZRANGEBYSCORE](http://redis.io/commands/zrangebyscore).
33+
[ZUNIONSTORE]({{<relref "/commands/zunionstore">}}),
34+
[ZINTERSTORE]({{<relref "/commands/zinterstore">}}), and
35+
[ZRANGEBYSCORE]({{<relref "/commands/zrangebyscore">}}).
3636

37-
The enhanced Redis Enterprise Software Slow Log adds the **Complexity info** field to the
37+
The enhanced Redis Software slow log adds the **Complexity info** field to the
3838
output data.
3939

4040
View the complexity info data by its respective command in the table
@@ -70,3 +70,55 @@ below:
7070
| ZREVRANGE | N – number of elements in the zset</br>M – number of results | O(log(N)+M) |
7171
| ZREVRANK | N – number of elements in the zset | O(log(N)) |
7272
| ZUNIONSTORE | N – sum of element counts of all zsets</br>M – element count of result | O(N)+O(M\*log(M)) |
73+
74+
## View slow log
75+
76+
To view slow log entries for Redis Software databases, use one of the following methods:
77+
78+
- Cluster Manager UI:
79+
80+
1. To access the slow log in the Cluster Manager UI, your [cluster management role]({{<relref "/operate/rs/security/access-control/create-cluster-roles">}}) must be Admin, Cluster Member, or DB Member.
81+
82+
1. Select a database from the **Databases** list.
83+
84+
1. On the database's **Configuration** screen, select the **Slowlog** tab.
85+
86+
- Command line:
87+
88+
Use [`redis-cli`]({{<relref "/operate/rs/references/cli-utilities/redis-cli">}}) to run [`SLOWLOG GET`]({{<relref "/commands/slowlog-get">}}):
89+
90+
```sh
91+
redis-cli -h <endpoint> -p <port> SLOWLOG GET <count>
92+
```
93+
94+
## Change slow log threshold
95+
96+
The slow log includes all database commands that take longer than ten milliseconds (10,000 microseconds) by default. You can use [`redis-cli`]({{<relref "/operate/rs/references/cli-utilities/redis-cli">}}) to view or change this threshold.
97+
98+
To check the current threshold, run [`CONFIG GET`]({{<relref "/commands/config-get">}}):
99+
100+
```sh
101+
redis-cli -h <endpoint> -p <port> CONFIG GET slowlog-log-slower-than
102+
```
103+
104+
To change the threshold, run [`CONFIG SET`]({{<relref "/commands/config-set">}}):
105+
106+
```sh
107+
redis-cli -h <endpoint> -p <port> CONFIG SET slowlog-log-slower-than <value_in_microseconds>
108+
```
109+
110+
## Change maximum entries
111+
112+
The slow log retains the last 128 entries by default. You can use [`redis-cli`]({{<relref "/operate/rs/references/cli-utilities/redis-cli">}}) to view or change the maximum number of entries.
113+
114+
To check the current maximum, run [`CONFIG GET`]({{<relref "/commands/config-get">}}):
115+
116+
```sh
117+
redis-cli -h <endpoint> -p <port> CONFIG GET slowlog-max-len
118+
```
119+
120+
To change the maximum, run [`CONFIG SET`]({{<relref "/commands/config-set">}}):
121+
122+
```sh
123+
redis-cli -h <endpoint> -p <port> CONFIG SET slowlog-max-len <value>
124+
```

content/operate/rs/installing-upgrading/upgrading/upgrade-os.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ To upgrade the cluster's operating system, use one of the following rolling upgr
8080

8181
1. [Remove one node]({{< relref "/operate/rs/clusters/remove-node#remove-a-node" >}}) running the earlier OS version from the cluster.
8282

83-
1. Repeat the previous steps until all nodes with the earlier OS version are removed.
83+
1. Repeat the previous steps until all nodes with the earlier OS version are removed. If the final node to remove from the cluster is the primary node, [demote it]({{<relref "/operate/rs/clusters/change-node-role#demote-primary-node">}}) to a secondary node before you remove it.
8484

8585
### Replace node upgrade method {#replace-node-upgrade}
8686

@@ -144,4 +144,4 @@ To upgrade the cluster's operating system, use one of the following rolling upgr
144144
...
145145
```
146146

147-
1. Repeat the previous steps until all nodes with the earlier OS version are replaced.
147+
1. Repeat the previous steps until all nodes with the earlier OS version are replaced. If the final node to remove from the cluster is the primary node, [demote it]({{<relref "/operate/rs/clusters/change-node-role#demote-primary-node">}}) to a secondary node before you remove it.

0 commit comments

Comments
 (0)