Skip to content

Commit 644779e

Browse files
fix(red): add ts pages (#5077)
1 parent b533469 commit 644779e

File tree

9 files changed

+455
-7
lines changed

9 files changed

+455
-7
lines changed

menu/navigation.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2302,6 +2302,14 @@
23022302
"label": "Configure advanced settings",
23032303
"slug": "configure-advanced-settings-redis"
23042304
},
2305+
{
2306+
"label": "Configure advanced settings",
2307+
"slug": "configure-advanced-settings-redis"
2308+
},
2309+
{
2310+
"label": "Monitor Database Instances with Cockpit",
2311+
"slug": "monitor-redis-databases-cockpit"
2312+
},
23052313
{
23062314
"label": "Delete a Redis™ Database Instance",
23072315
"slug": "delete-a-database-for-redis"
@@ -2341,6 +2349,24 @@
23412349
],
23422350
"label": "Additional Content",
23432351
"slug": "reference-content"
2352+
},
2353+
{
2354+
"items": [
2355+
{
2356+
"label": "Dealing with Database Instance unavailability",
2357+
"slug": "database-instance-unavailable"
2358+
},
2359+
{
2360+
"label": "Dealing with Database Instance connectivity issues",
2361+
"slug": "database-instance-connectivity-issues"
2362+
},
2363+
{
2364+
"label": "Dealing with Database Instance performance issues",
2365+
"slug": "database-instance-performance-issues"
2366+
}
2367+
],
2368+
"label": "Troubleshooting",
2369+
"slug": "troubleshooting"
23442370
}
23452371
],
23462372
"label": "Managed Databases for Redis™",

pages/managed-databases-for-postgresql-and-mysql/troubleshooting/database-instance-connectivity-issues.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ meta:
55
content:
66
h1: Dealing with Database Instance connectivity issues
77
paragraph: Troubleshoot Database Instance connectivity issues for Managed Databases for MySQL and PostgreSQL.
8-
tags: disk-full databases
8+
tags: connectivity databases
99
dates:
1010
validation: 2025-01-29
1111
posted: 2025-01-29
@@ -145,5 +145,5 @@ Run the script in a terminal:
145145
```
146146
export INSTANCE_IP=<xxx.xxx.xxx.xxx>
147147
export INSTANCE_PORT=<xxxxx>
148-
./troubleshoot.sh
148+
./rdb_troubleshoot.sh
149149
```

pages/managed-databases-for-postgresql-and-mysql/troubleshooting/database-instance-performance-issues.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ meta:
55
content:
66
h1: Dealing with Database Instance performance issues
77
paragraph: Troubleshoot Database Instance performance issues in Managed Databases for MySQL and PostgreSQL.
8-
tags: disk-full databases
8+
tags: databases performance
99
dates:
1010
validation: 2025-01-29
1111
posted: 2025-01-29

pages/managed-databases-for-postgresql-and-mysql/troubleshooting/database-instance-unavailable.mdx

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,39 @@ categories:
1414
- postgresql-and-mysql
1515
---
1616

17-
## Problem
17+
## My Database Instance is unavailable
18+
19+
### Problem
1820

1921
My Database Instance is unavailable.
2022

21-
## Possible causes
23+
### Possible causes
2224

2325
- High data loads
2426
- High incoming traffic from specific apps or websites
2527

26-
## Solution
28+
### Solution
2729

2830
You can monitor your Database Instance activity to be able to quickly identify and act on irregular activities that might be causing the instability/unavailability.
2931

3032
[Monitor usage metrics on Cockpit](/managed-databases-for-postgresql-and-mysql/how-to/monitor-databases-cockpit) to:
3133

3234
- Check if the usage is regular. Database Instance can be impacted by high data loads or unexpected high traffic from an app or website, for example
3335
- Check if there are slow queries in the Database Instance log. Huge or sub-optimized queries can fill up all the memory and trigger OOM kills
34-
- Check the Database Instance logs for any unusual or suspicious activity
36+
- Check the Database Instance logs for any unusual or suspicious activity
37+
38+
## My Database Instance is in a stuck state
39+
40+
### Problem
41+
42+
My Database Instance is currently in a stuck state.
43+
44+
### Possible causes
45+
46+
- A maintenance operation on Scaleway's side is taking longer than usual and timed out, making the Database Instance go into a transitional state
47+
48+
### Solution
49+
50+
If the Database Instance is sent to a transitional state, the Scaleway Databases team receives an alert and will act on the issue as soon as possible.
51+
52+
If you observe the resolution is taking longer than usual, [create a support ticket](/account/how-to/open-a-support-ticket/#writing-an-effective-subject-and-description) to let us know.
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
---
2+
meta:
3+
title: How to monitor your Redis™ Database Instance with Scaleway Cockpit
4+
description: Learn how to effectively monitor your Database Instance using Scaleway Cockpit for optimal performance.
5+
content:
6+
h1: How to monitor your Redis™ Database Instance with Scaleway Cockpit
7+
paragraph: Learn how to effectively monitor your Database Instance using Scaleway Cockpit for optimal performance.
8+
tags: managed-database database cockpit observability dashboard metrics logs alerts
9+
dates:
10+
validation: 2025-06-05
11+
posted: 2025-06-05
12+
categories:
13+
- managed-databases
14+
- redis
15+
---
16+
17+
You can view your Managed Database for Redis™ metrics and logs using [Scaleway Cockpit](/cockpit/quickstart/). Managed Databases are fully integrated into Cockpit.
18+
19+
Monitoring is available for:
20+
21+
- Primary Database Instance nodes
22+
- Secondary nodes (if in High Availability or in Cluster mode)
23+
24+
This page explains how to get started with Scaleway Cockpit for viewing your Managed Database for Redis™' metrics and logs.
25+
26+
<Macro id="requirements" />
27+
28+
- A Scaleway account logged into the [console](https://console.scaleway.com)
29+
- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
30+
- A [Redis™ Database Instance](/managed-databases-for-redis/quickstart/)
31+
32+
## How to activate your Cockpit
33+
34+
Scaleway Cockpit is activated by default if you have created any [Scaleway resources integrated with Cockpit](/cockpit/reference-content/cockpit-limitations/#product-integration-into-cockpit).
35+
36+
## How to access the Grafana dashboard
37+
38+
To view your Managed Database's metrics and logs, use the Grafana dashboard which is accessible from the Scaleway console:
39+
- First, you must create a user and their associated credentials (a username and password) for Grafana
40+
- Then, you can use these credentials to access the Grafana dashboard for all your Scaleway products, via the Scaleway console.
41+
42+
1. Create a Grafana user and retrieve their username and password by [following this procedure](/cockpit/how-to/retrieve-grafana-credentials/).
43+
44+
2. From the Scaleway console [Cockpit overview page](https://console.scaleway.com/cockpit/overview), click **Open dashboards** in the top right corner.
45+
46+
3. Enter your Grafana username and password to log in.
47+
48+
You are directed to the Scaleway Cockpit dashboards homepage.
49+
50+
## How to view and understand your Managed Database metrics
51+
52+
1. Click **Open dashboards** on the top right from the Scaleway Cockpit dashboards homepage.
53+
2. Click **Dashboards** in the left menu, then **Redis Overview** in the list of products.
54+
55+
You are directed to the RDB Overview dashboard.
56+
57+
<Lightbox src="scaleway-grafana-rdb.webp" alt="" />
58+
59+
Metrics are refreshed every minute, and report on the following data:
60+
61+
- CPU usage
62+
- Node usage
63+
- Database memory usage
64+
- Network I/O
65+
- Connected/Blocked clients
66+
- Hits/Misses per second
67+
- Expiring/Not-expiring keys
68+
- Expired/Evicted keys
69+
70+
### Choosing metric parameters
71+
72+
At the top of the dashboard, you can configure the following parameters, that control which metrics are displayed:
73+
74+
- Resource name - Select a specific Database Instance to monitor.
75+
- Node - Choose a specific node (main or replica). In a High Availability (HA) cluster, both nodes might switch from main to replica and vice versa. You might see two versions of the same node, as main and as replica. If you select main for a specific node, you will only see the node's activity when it was the main, and vice-versa. In Cluster mode, all nodes are considered primary and each have a data subset.
76+
- Timeframe - Get metrics from the last five minutes up to 31 days (free plan) and 365 days (premium plan).
77+
78+
### Viewing logs
79+
80+
The log section is displayed below the metrics section.
81+
82+
Click **Logs** to collapse the tab and view your logs.
83+
84+
You can [configure Redis™ advanced settings](/managed-databases-for-redis/how-to/configure-advanced-settings-redis) to define parameters for slow logs.
85+
86+
| Parameter | Description |
87+
| ------------ | ------------------- |
88+
| `slowlog-log-slower-than` | Specifies how many microseconds (1 second = 1,000,000 microseconds) the execution time of a command must exceed to be recorded in the slow query log. |
89+
| `slowlog-max-len` | Specifies the maximum number of slow query logs that the server retains. The server retains multiple slow query logs on a first-in-first-out (FIFO) basis. When the number of slow query logs stored by the server equals the slowlog-max-len value, the server will delete the oldest slow query log before adding a new one. |
90+
91+
92+
## How to activate pre-configured alerts
93+
94+
You can activate Scaleway pre-configured alerts for your Managed Databases with Scaleway Cockpit.
95+
96+
<Message type="note">
97+
Refer to the [How to activate pre-configured alerts](/cockpit/how-to/activate-managed-alerts/) to learn how to do so.
98+
</Message>
99+
100+
By default, two pre-configured alerts are available for Managed Databases:
101+
102+
- `HighCpuUsage` - Alerts if CPU usage has been higher than 80% for 10 consecutive minutes
103+
- `HighMemoryUsage` - RAM usage has been higher than 80% for 10 consecutive minutes
104+
105+
You can also configure [your own alerts](/cockpit/how-to/configure-alerts-for-scw-resources/) and set values for each of the parameters below to define when you want to be alerted:
106+
107+
108+
| Alert | Description |
109+
| ------------ | ------------------- |
110+
| `rkv_cluster_node_cpu_seconds_total` | Total amount of CPU time consumed by the Database Instance, measured in seconds |
111+
| `rkv_cluster_node_memory_MemAvailable_bytes` | Amount of memory available |
112+
| `rkv_cluster_node_memory_MemTotal_bytes` | Total installed physical memory (RAM) |
113+
| `rkv_cluster_redis_blocked_clients` | Total blocked connections on Redis™ |
114+
| `rkv_cluster_redis_config_maxclients` | Maximum number of connections configured |
115+
| `rkv_cluster_redis_connected_clients` | Total active connections on Redis™ |
116+
| `rkv_cluster_redis_db_keys` | Total number of keys stored |
117+
| `rkv_cluster_redis_db_keys_expiring` | Total number of keys that have an expiration date |
118+
| `rkv_cluster_redis_evicted_keys_total` | Total number of keys that were evicted because of memory pressure |
119+
| `rkv_cluster_redis_expired_keys_total` | Total number of keys that have expired |
120+
| `rkv_cluster_redis_keyspace_hits_total` | Total number of requests that found a match in the database |
121+
| `rkv_cluster_redis_keyspace_misses_total` | Total number of request that did not find a match in the database |
122+
| `rkv_cluster_redis_memory_max_bytes` | Amount of memory available for Redis™ |
123+
| `rkv_cluster_redis_memory_used_bytes` | Amount of memory used by Redis™ |
124+
| `rkv_cluster_redis_net_input_bytes_total` | Total incoming traffic received by Redis™ from clients, measured in bytes |
125+
| `rkv_cluster_redis_net_output_bytes_total` | Total outgoing traffic sent by Redis™, measured in bytes |
126+
Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
---
2+
meta:
3+
title: Dealing with Redis™ Database Instance connectivity issues
4+
description: Troubleshoot Database Instance connectivity issues for Managed Databases for Redis™.
5+
content:
6+
h1: Dealing with Redis™ Database Instance connectivity issues
7+
paragraph: Troubleshoot Database Instance connectivity issues for Managed Databases for Redis™.
8+
tags: disk-full databases
9+
dates:
10+
validation: 2025-02-12
11+
posted: 2025-02-12
12+
categories:
13+
- managed-databases
14+
- redis
15+
---
16+
17+
## Public access
18+
19+
### Problem
20+
21+
I cannot connect to my Redis™ Database Instance through the public network.
22+
23+
### Possible causes
24+
25+
- The Database Instance TLS certificate is outdated
26+
- Your allowed IPs are not properly configured
27+
- You have reached the maximum number of connections
28+
- The Database Instance is experiencing instabilities due to a high load
29+
30+
### Solution
31+
32+
You can check the following points to identify and act on what might be causing the issue:
33+
34+
1. If TLS is enabled on the Database Instance, make sure the certificate is up to date and that your client application is properly configured.
35+
2. Make sure your [ACLs](/managed-databases-for-redis/concepts/#allowed-ips) are [properly configured](/managed-databases-for-redis/how-to/manage-allowed-ip-addresses-redis).
36+
3. Make sure your Database Instance has not reached the maximum number of connections stipulated in the advanced settings of the Database Instance. You can monitor the number of connections on Cockpit. You can also [adjust the advanced settings](/managed-databases-for-redis/how-to/configure-advanced-settings-redis) to accept a higher number of connections.
37+
4. [Monitor other usage metrics on Cockpit](/managed-databases-for-redis/how-to/monitor-redis-databases-cockpit) to:
38+
39+
- Check if the memory usage is nominal. High memory usage could trigger OOM Kills and cause disconnection
40+
- Check Database Instance logs and look for anything else that could explain the issue
41+
42+
## Private access
43+
44+
### Problem
45+
46+
I cannot connect to my Database Instance through a Private Network.
47+
48+
### Possible causes
49+
50+
- The Database Instance TLS certificate is outdated
51+
- Client network issue
52+
- You have reached the maximum number of connections
53+
- The Database Instance is experiencing instabilities due to a high load
54+
55+
### Solution
56+
57+
You can carry out the following actions:
58+
59+
1. Try to connect to the Database Instance from the public endpoint, if one is available, to identify the possible origin (network or instance). This information can help you or the support team to identify the issue.
60+
2. [Use Cockpit](/managed-databases-for-redis/how-to/monitor-redis-databases-cockpit) to check database logs and look for any activity or behavior that could explain the issue.
61+
3. Create a support ticket if the first two steps do not help troubleshoot the issue. In the body of the ticket, make sure you provide:
62+
63+
- The ID of the resource from which the connection was attempted
64+
- The output of the `redis_troubleshoot.sh` script, indicated below. Make sure you execute the script on the machine from which the connection was attempted.
65+
66+
#### Database Instance connectivity check script
67+
68+
`redis_troubleshoot.sh`:
69+
70+
```sh
71+
#!/bin/bash
72+
73+
set -o nounset
74+
75+
if [ -z "$INSTANCE_IP" ]; then
76+
echo "INSTANCE_IP is a mandatory environment variable."
77+
echo "e.g. export INSTANCE_IP=<xxx.xxx.xxx.xxx>"
78+
exit 1
79+
fi
80+
81+
if [ -z "$INSTANCE_PORT" ]; then
82+
echo "INSTANCE_PORT is a mandatory environment variable."
83+
echo "e.g. export INSTANCE_PORT=<xxxxx>"
84+
exit 1
85+
fi
86+
87+
function header() {
88+
echo -e "\n # ${1}"
89+
echo -e "---------------------------------\n"
90+
}
91+
92+
echo -e "\nREDIS troubleshooting script\nThis script will run for several minutes to get enough information."
93+
header "Host information"
94+
if ! [ -x "$(command -v uname)" ]; then
95+
echo 'Skipped: uname command is not availabe.'
96+
else
97+
uname -a
98+
fi
99+
100+
header "Host connectivity check"
101+
if ! [ -x "$(command -v ping)" ]; then
102+
echo 'Skipped: ping command is not availabe.'
103+
else
104+
ping -c 5 ${INSTANCE_IP}
105+
fi
106+
107+
header "Database connectivity check"
108+
if ! [ -x "$(command -v telnet)" ]; then
109+
# try to fallback on curl telnet
110+
if ! [ -x "$(command -v curl)" ]; then
111+
echo "Skipped: neither telnet nor curl command are availabe."
112+
else
113+
echo "(using curl)"
114+
timeout 2 curl -v telnet://$INSTANCE_IP:$INSTANCE_PORT
115+
fi
116+
else
117+
echo "(using telnet)"
118+
echo -n | telnet ${INSTANCE_IP} ${INSTANCE_PORT}
119+
fi
120+
121+
header "Ip configuration check"
122+
if ! [ -x "$(command -v ip)" ]; then
123+
echo 'Skipped: ip command is not availabe.'
124+
else
125+
echo -e "Interfaces:\n- \n"
126+
ip a
127+
echo -e "\nNeighbour:\n- \n"
128+
129+
TEST_ITERATION=30
130+
TEST_INTERVAL=10 # seconds
131+
132+
# Iterate a few times to try to catch relevant info
133+
for ((i=1;i<=$TEST_ITERATION;i++)); do
134+
echo -e "\nIteration $i:\n"
135+
ip neighbour show
136+
echo -e "\nWaiting ${TEST_INTERVAL}s...\n"
137+
sleep $TEST_INTERVAL
138+
done
139+
echo -e "\nRoute:\n-\n"
140+
ip route
141+
fi
142+
```
143+
Run the script in a terminal:
144+
145+
```
146+
export INSTANCE_IP=<xxx.xxx.xxx.xxx>
147+
export INSTANCE_PORT=<xxxxx>
148+
./redis_troubleshoot.sh
149+
```

0 commit comments

Comments
 (0)