diff --git a/menu/navigation.json b/menu/navigation.json index a7d599bbd7..b1f99f7c77 100644 --- a/menu/navigation.json +++ b/menu/navigation.json @@ -2290,6 +2290,14 @@ "label": "Configure advanced settings", "slug": "configure-advanced-settings-redis" }, + { + "label": "Configure advanced settings", + "slug": "configure-advanced-settings-redis" + }, + { + "label": "Monitor Database Instances with Cockpit", + "slug": "monitor-redis-databases-cockpit" + }, { "label": "Delete a Redis™ Database Instance", "slug": "delete-a-database-for-redis" @@ -2329,6 +2337,24 @@ ], "label": "Additional Content", "slug": "reference-content" + }, + { + "items": [ + { + "label": "Dealing with Database Instance unavailability", + "slug": "database-instance-unavailable" + }, + { + "label": "Dealing with Database Instance connectivity issues", + "slug": "database-instance-connectivity-issues" + }, + { + "label": "Dealing with Database Instance performance issues", + "slug": "database-instance-performance-issues" + } + ], + "label": "Troubleshooting", + "slug": "troubleshooting" } ], "label": "Managed Databases for Redis™", diff --git a/pages/managed-databases-for-postgresql-and-mysql/troubleshooting/database-instance-connectivity-issues.mdx b/pages/managed-databases-for-postgresql-and-mysql/troubleshooting/database-instance-connectivity-issues.mdx index 4442c727cc..76254337f0 100644 --- a/pages/managed-databases-for-postgresql-and-mysql/troubleshooting/database-instance-connectivity-issues.mdx +++ b/pages/managed-databases-for-postgresql-and-mysql/troubleshooting/database-instance-connectivity-issues.mdx @@ -5,7 +5,7 @@ meta: content: h1: Dealing with Database Instance connectivity issues paragraph: Troubleshoot Database Instance connectivity issues for Managed Databases for MySQL and PostgreSQL. -tags: disk-full databases +tags: connectivity databases dates: validation: 2025-01-29 posted: 2025-01-29 @@ -145,5 +145,5 @@ Run the script in a terminal: ``` export INSTANCE_IP= export INSTANCE_PORT= -./troubleshoot.sh +./rdb_troubleshoot.sh ``` diff --git a/pages/managed-databases-for-postgresql-and-mysql/troubleshooting/database-instance-performance-issues.mdx b/pages/managed-databases-for-postgresql-and-mysql/troubleshooting/database-instance-performance-issues.mdx index a85b55b643..ca11c46646 100644 --- a/pages/managed-databases-for-postgresql-and-mysql/troubleshooting/database-instance-performance-issues.mdx +++ b/pages/managed-databases-for-postgresql-and-mysql/troubleshooting/database-instance-performance-issues.mdx @@ -5,7 +5,7 @@ meta: content: h1: Dealing with Database Instance performance issues paragraph: Troubleshoot Database Instance performance issues in Managed Databases for MySQL and PostgreSQL. -tags: disk-full databases +tags: databases performance dates: validation: 2025-01-29 posted: 2025-01-29 diff --git a/pages/managed-databases-for-postgresql-and-mysql/troubleshooting/database-instance-unavailable.mdx b/pages/managed-databases-for-postgresql-and-mysql/troubleshooting/database-instance-unavailable.mdx index b66d69e8d4..8553b5d514 100644 --- a/pages/managed-databases-for-postgresql-and-mysql/troubleshooting/database-instance-unavailable.mdx +++ b/pages/managed-databases-for-postgresql-and-mysql/troubleshooting/database-instance-unavailable.mdx @@ -14,16 +14,18 @@ categories: - postgresql-and-mysql --- -## Problem +## My Database Instance is unavailable + +### Problem My Database Instance is unavailable. -## Possible causes +### Possible causes - High data loads - High incoming traffic from specific apps or websites -## Solution +### Solution 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. @@ -31,4 +33,20 @@ You can monitor your Database Instance activity to be able to quickly identify a - 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 - 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 - - Check the Database Instance logs for any unusual or suspicious activity \ No newline at end of file + - Check the Database Instance logs for any unusual or suspicious activity + +## My Database Instance is in a stuck state + +### Problem + +My Database Instance is currently in a stuck state. + +### Possible causes + +- A maintenance operation on Scaleway's side is taking longer than usual and timed out, making the Database Instance go into a transitional state + +### Solution + +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. + +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. \ No newline at end of file diff --git a/pages/managed-databases-for-redis/how-to/monitor-redis-databases-cockpit.mdx b/pages/managed-databases-for-redis/how-to/monitor-redis-databases-cockpit.mdx new file mode 100644 index 0000000000..ab0c9f0b83 --- /dev/null +++ b/pages/managed-databases-for-redis/how-to/monitor-redis-databases-cockpit.mdx @@ -0,0 +1,126 @@ +--- +meta: + title: How to monitor your Redis™ Database Instance with Scaleway Cockpit + description: Learn how to effectively monitor your Database Instance using Scaleway Cockpit for optimal performance. +content: + h1: How to monitor your Redis™ Database Instance with Scaleway Cockpit + paragraph: Learn how to effectively monitor your Database Instance using Scaleway Cockpit for optimal performance. +tags: managed-database database cockpit observability dashboard metrics logs alerts +dates: + validation: 2025-06-05 + posted: 2025-06-05 +categories: + - managed-databases + - redis +--- + +You can view your Managed Database for Redis™ metrics and logs using [Scaleway Cockpit](/cockpit/quickstart/). Managed Databases are fully integrated into Cockpit. + +Monitoring is available for: + +- Primary Database Instance nodes +- Secondary nodes (if in High Availability or in Cluster mode) + +This page explains how to get started with Scaleway Cockpit for viewing your Managed Database for Redis™' metrics and logs. + + + +- A Scaleway account logged into the [console](https://console.scaleway.com) +- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization +- A [Redis™ Database Instance](/managed-databases-for-redis/quickstart/) + +## How to activate your Cockpit + +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). + +## How to access the Grafana dashboard + +To view your Managed Database's metrics and logs, use the Grafana dashboard which is accessible from the Scaleway console: + - First, you must create a user and their associated credentials (a username and password) for Grafana + - Then, you can use these credentials to access the Grafana dashboard for all your Scaleway products, via the Scaleway console. + +1. Create a Grafana user and retrieve their username and password by [following this procedure](/cockpit/how-to/retrieve-grafana-credentials/). + +2. From the Scaleway console [Cockpit overview page](https://console.scaleway.com/cockpit/overview), click Open dashboards in the top right corner. + +3. Enter your Grafana username and password to log in. + + You are directed to the Scaleway Cockpit dashboards homepage. + +## How to view and understand your Managed Database metrics + +1. Click Open dashboards on the top right from the Scaleway Cockpit dashboards homepage. +2. Click Dashboards in the left menu, then Redis Overview in the list of products. + + You are directed to the RDB Overview dashboard. + + + +Metrics are refreshed every minute, and report on the following data: + +- CPU usage +- Node usage +- Database Memory usage +- Network I/O +- Connected/Blocked clients +- Hits/Misses per second +- Expiring/Not-expiring keys +- Expired/Evicted keys + +### Choosing metric parameters + +At the top of the dashboard, you can configure the following parameters, that control which metrics are displayed: + +- Resource name - Select a specific Database Instance to monitor. +- 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. +- Timeframe - Get metrics from the last five minutes up to 31 days (free plan) and 365 days (premium plan). + +### Viewing logs + +The log section is displayed below the metrics section. + +Click Logs to collapse the tab and view your logs. + +You can [configure Redis™ advanced settings](/managed-databases-for-redis/how-to/configure-advanced-settings-redis) to define parameters for slow logs. + +| Parameter | Description | +| ------------ | ------------------- | +| `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. | +| `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. | + + +## How to activate pre-configured alerts + +You can activate Scaleway pre-configured alerts for your Managed Databases with Scaleway Cockpit. + + + Refer to the [How to activate pre-configured alerts](/cockpit/how-to/activate-managed-alerts/) to learn how to do so. + + +By default, three pre-configured alerts are available for Managed Databases: + +- `HighCpuUsage` - Alerts if CPU usage has been higher than 80% for 10 consecutive minutes +- `HighMemoryUsage` - RAM usage has been higher than 80% for 10 consecutive minutes + +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: + + +| Alert | Description | +| ------------ | ------------------- | +| `rkv_cluster_node_cpu_seconds_total` | Total amount of CPU time consumed by the Database Instance, measured in seconds | +| `rkv_cluster_node_memory_MemAvailable_bytes` | Amount of memory available | +| `rkv_cluster_node_memory_MemTotal_bytes` | Total installed physical memory (RAM) | +| `rkv_cluster_redis_blocked_clients` | Total blocked connections on Redis™ | +| `rkv_cluster_redis_config_maxclients` | Maximum number of connections configured | +| `rkv_cluster_redis_connected_clients` | Total active connections on Redis™ | +| `rkv_cluster_redis_db_keys` | Total number of keys stored | +| `rkv_cluster_redis_db_keys_expiring` | Total number of keys that have an expiration date | +| `rkv_cluster_redis_evicted_keys_total` | Total number of keys that were evicted because of memory pressure | +| `rkv_cluster_redis_expired_keys_total` | Total number of keys that have expired | +| `rkv_cluster_redis_keyspace_hits_total` | Total number of requests that found a match in the database | +| `rkv_cluster_redis_keyspace_misses_total` | Total number of request that did not find a match in the database | +| `rkv_cluster_redis_memory_max_bytes` | Amount of memory available for Redis™ | +| `rkv_cluster_redis_memory_used_bytes` | Amount of memory used by Redis™ | +| `rkv_cluster_redis_net_input_bytes_total` | Total incoming traffic received by Redis™ from clients, measured in bytes | +| `rkv_cluster_redis_net_output_bytes_total` | Total outgoing traffic sent by Redis™, measured in bytes | + diff --git a/pages/managed-databases-for-redis/troubleshooting/database-instance-connectivity-issues.mdx b/pages/managed-databases-for-redis/troubleshooting/database-instance-connectivity-issues.mdx new file mode 100644 index 0000000000..1463300981 --- /dev/null +++ b/pages/managed-databases-for-redis/troubleshooting/database-instance-connectivity-issues.mdx @@ -0,0 +1,149 @@ +--- +meta: + title: Dealing with Redis™ Database Instance connectivity issues + description: Troubleshoot Database Instance connectivity issues for Managed Databases for Redis™. +content: + h1: Dealing with Redis™ Database Instance connectivity issues + paragraph: Troubleshoot Database Instance connectivity issues for Managed Databases for Redis™. +tags: disk-full databases +dates: + validation: 2025-02-12 + posted: 2025-02-12 +categories: + - managed-databases + - redis +--- + +## Public access + +### Problem + +I cannot connect to my Redis™ Database Instance through the public network. + +### Possible causes + +- The Database Instance TLS certificate is outdated +- Your allowed IPs are not properly configured +- You have reached the maximum number of connections +- The Database Instance is experiencing instabilities due to a high load + +### Solution + +You can check the following points to identify and act on what might be causing the issue: + +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. +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). +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. +4. [Monitor other usage metrics on Cockpit](/managed-databases-for-redis/how-to/monitor-redis-databases-cockpit) to: + + - Check if the memory usage is nominal. High memory usage could trigger OOM Kills and cause disconnection + - Check Database Instance logs and look for anything else that could explain the issue + +## Private access + +### Problem + +I cannot connect to my Database Instance through a Private Network. + +### Possible causes + +- The Database Instance TLS certificate is outdated +- Client network issue +- You have reached the maximum number of connections +- The Database Instance is experiencing instabilities due to a high load + +### Solution + +You can carry out the following actions: + +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. +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. +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: + + - The resource ID of resource from which the connection was attempted + - 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. + +#### Database Instance connectivity check script + +`redis_troubleshoot.sh`: + +```sh +#!/bin/bash + +set -o nounset + +if [ -z "$INSTANCE_IP" ]; then + echo "INSTANCE_IP is a mandatory environment variable." + echo "e.g. export INSTANCE_IP=" + exit 1 +fi + +if [ -z "$INSTANCE_PORT" ]; then + echo "INSTANCE_PORT is a mandatory environment variable." + echo "e.g. export INSTANCE_PORT=" + exit 1 +fi + +function header() { + echo -e "\n # ${1}" + echo -e "---------------------------------\n" +} + +echo -e "\nREDIS troubleshooting script\nThis script will run for several minutes to get enough information." +header "Host information" +if ! [ -x "$(command -v uname)" ]; then + echo 'Skipped: uname command is not availabe.' +else + uname -a +fi + +header "Host connectivity check" +if ! [ -x "$(command -v ping)" ]; then + echo 'Skipped: ping command is not availabe.' +else + ping -c 5 ${INSTANCE_IP} +fi + +header "Database connectivity check" +if ! [ -x "$(command -v telnet)" ]; then + # try to fallback on curl telnet + if ! [ -x "$(command -v curl)" ]; then + echo "Skipped: neither telnet nor curl command are availabe." + else + echo "(using curl)" + timeout 2 curl -v telnet://$INSTANCE_IP:$INSTANCE_PORT + fi +else + echo "(using telnet)" + echo -n | telnet ${INSTANCE_IP} ${INSTANCE_PORT} +fi + +header "Ip configuration check" +if ! [ -x "$(command -v ip)" ]; then + echo 'Skipped: ip command is not availabe.' +else + echo -e "Interfaces:\n- \n" + ip a + echo -e "\nNeighbour:\n- \n" + + TEST_ITERATION=30 + TEST_INTERVAL=10 # seconds + + # Iterate a few times to try to catch relevant info + for ((i=1;i<=$TEST_ITERATION;i++)); do + echo -e "\nIteration $i:\n" + ip neighbour show + echo -e "\nWaiting ${TEST_INTERVAL}s...\n" + sleep $TEST_INTERVAL + done + echo -e "\nRoute:\n-\n" + ip route +fi +``` +Run the script in a terminal: + +``` +export INSTANCE_IP= +export INSTANCE_PORT= +./redis_troubleshoot.sh +``` \ No newline at end of file diff --git a/pages/managed-databases-for-redis/troubleshooting/database-instance-performance-issues.mdx b/pages/managed-databases-for-redis/troubleshooting/database-instance-performance-issues.mdx new file mode 100644 index 0000000000..ba8bcb4a00 --- /dev/null +++ b/pages/managed-databases-for-redis/troubleshooting/database-instance-performance-issues.mdx @@ -0,0 +1,31 @@ +--- +meta: + title: Dealing with Database Instance performance issues + description: Troubleshoot Database Instance performance issues in Managed Databases for Redis™. +content: + h1: Dealing with Database Instance performance issues + paragraph: Troubleshoot Database Instance performance issues in Managed Databases for Redis™. +tags: databases performance +dates: + validation: 2025-02-13 + posted: 2025-02-13 +categories: + - managed-databases + - redis +--- + +## Problem + +My Database Instance is not performing as expected. + +## Possible causes + +- High data loads +- High incoming traffic from specific apps or websites +- Sub-optimized Redis™ commands + +## Solution + +You can [Monitor usage metrics on Cockpit](/managed-databases-for-redis/how-to/monitor-redis-databases-cockpit) to check if the usage is nominal. + +The Database Instance can be impacted by high data loads or unexpected high traffic from an app or website, for example. You can [scale up your Instance](/managed-databases-for-redis/how-to/scale-up-a-database-for-redis) if necessary. \ No newline at end of file diff --git a/pages/managed-databases-for-redis/troubleshooting/database-instance-unavailable.mdx b/pages/managed-databases-for-redis/troubleshooting/database-instance-unavailable.mdx new file mode 100644 index 0000000000..2435938a30 --- /dev/null +++ b/pages/managed-databases-for-redis/troubleshooting/database-instance-unavailable.mdx @@ -0,0 +1,33 @@ +--- +meta: + title: Dealing with Database Instance unavailability + description: Troubleshoot Database Instance unavailability for Managed Databases for Redis™. +content: + h1: Dealing with Database Instance unavailability + paragraph: Troubleshoot Database Instance unavailability for Managed Databases for Redis™. +tags: unavailability databases +dates: + validation: 2025-02-17 + posted: 2025-02-17 +categories: + - managed-databases + - redis +--- + +## Problem + +My Database Instance is unavailable. + +## Possible causes + +- High data loads +- High incoming traffic from specific apps or websites + +## Solution + +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. + +[Monitor usage metrics on Cockpit](/managed-databases-for-redis/how-to/monitor-redis-databases-cockpit) to: + + - 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 + - Check the Database Instance logs for any unusual or suspicious activity \ No newline at end of file diff --git a/pages/managed-databases-for-redis/troubleshooting/index.mdx b/pages/managed-databases-for-redis/troubleshooting/index.mdx new file mode 100644 index 0000000000..acdc211a0f --- /dev/null +++ b/pages/managed-databases-for-redis/troubleshooting/index.mdx @@ -0,0 +1,65 @@ +--- +meta: + title: Managed Databases for Redis™ + description: Find troubleshooting resources for resolving issues with Managed Databases for Redis™. +content: + paragraph: Find troubleshooting resources for resolving issues with Managed Databases for Redis™. +dates: + posted: 2025-06-05 +categories: + - managed-databases +--- + + + +## Featured Pages + + + + + + + + + + + +## Managed Databases for Redis™ troubleshooting pages + + + - + - + - + + + +