Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
In dieser Anleitung wird erläutert, wie Sie Monitoring zum Überwachen von Redis konfigurieren.
Redis ist ein erweiterter Open-Source-Schlüssel-Werte-Speicher. Er wird oft als Datenstrukturserver bezeichnet, da die Werte Zeichenfolgen, Hash-Zeichen, Listen, Datensätze und sortierte Datensätze enthalten können. Weitere Informationen erhalten Sie unter redis.io.
Diese Funktion ist nur für Agents verfügbar, die unter Linux ausgeführt werden. Es ist unter Windows nicht verfügbar.
Logo: Discovery
Monitoring erkennt in Ihrem Cloud Platform-Projekt ausgeführte Redis-Dienste, wenn Sie Folgendes haben:
VM-Instanzen mit redis im Namen
Firewallregeln, die Port 6379 öffnen
So rufen Sie die Messwerte für Redis auf:
Rufen Sie in der Google Cloud Console die Seite Dashboards auf:
Wenn Sie diese Seite über die Suchleiste suchen, wählen Sie das Ergebnis aus, dessen Zwischenüberschrift Monitoring ist.
Wählen Sie in der Liste das Dashboard Redis aus.
Redis-Monitoring konfigurieren
Der Monitoring-Agent überwacht Redis mithilfe der hiredis-Clientbibliothek. Nach der Installation von Redis installieren Sie hiredis mit den folgenden Befehlen:
Wenn Ihre Redis-Instanz passwortgeschützt ist oder Sie einen nicht standardmäßigen Host oder Port für Redis als Root verwenden, bearbeiten Sie redis.conf nach der Anleitung oben in der Datei.
Starten Sie den Monitoring-Agent neu, indem Sie den folgenden Befehl ausführen:
sudo service stackdriver-agent restart
Weitere Informationen zum collectdredis-Plug-in finden Sie unter Plugin:Redis.
Redis-Messwerte
Die vollständige Liste der vom Redis-Plug-in überwachten Messwerte finden Sie unter Agent-Messwerte: redis.
Die tatsächlich erhobenen Messwerte und die in den Monitoring-Menüs verfügbaren Messwerte können variieren.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-04 (UTC)."],[],[],null,["# Monitoring Redis\n\nThis guide helps you configure Monitoring to monitor Redis.\n\nRedis is an open source advanced key-value store. It is often referred to as a\ndata structure server since values can contain strings, hashes, lists, sets and\nsorted sets. For more information, visit [redis.io](http://redis.io/).\n\nThis functionality is only available for agents running on Linux. It is\nnot available on Windows.\n| **Note:** You can now collect metrics from your Redis instance using the [Ops Agent](/stackdriver/docs/solutions/agents/ops-agent), the primary and preferred agent for collecting telemetry from your Compute Engine instances. For details, see [configuring the Ops Agent for\n| Redis](/stackdriver/docs/solutions/agents/ops-agent/third-party/redis).\n\nDiscovery\n---------\n\nMonitoring discovers Redis services running in your Cloud Platform\nproject if you have the following:\n\n- VM instances with **redis** in their names.\n- Firewall rules that open port **6379**.\n\nTo see the metrics for Redis, do the following:\n\n1. In the Google Cloud console, go to the **Dashboards** page:\n\n [Go to **Dashboards**](https://console.cloud.google.com/monitoring/dashboards)\n\n \u003cbr /\u003e\n\n If you use the search bar to find this page, then select the result whose subheading is\n **Monitoring**.\n2. Select the **Redis** dashboard from the list.\n\nConfiguring Redis monitoring\n----------------------------\n\nThe Monitoring agent uses the\n[**hiredis** client library](https://github.com/redis/hiredis)\nto monitor Redis. After installing Redis, install `hiredis` by running the\nfollowing commands:\n\n- RHEL and CentOS\n\n sudo yum install epel-release\n sudo yum install hiredis\n\n- Ubuntu 18.04 LTS, 16.04 LTS, and Debian 9\n\n sudo apt-get install libhiredis0.13\n\n- SLES\n\n sudo zypper install libhiredis0_13\n\nConfiguring Monitoring\n----------------------\n\nTo monitor Redis, perform the following actions on your VM instance after\n[installing the monitoring agent](/monitoring/agent/monitoring/installation):\n\n1. **Install the Redis configuration file** ,\n [redis.conf](https://raw.githubusercontent.com/Stackdriver/stackdriver-agent-service-configs/master/etc/collectd.d/redis.conf),\n by running the following command:\n\n (cd /etc/stackdriver/collectd.d/ && sudo curl -O https://raw.githubusercontent.com/Stackdriver/stackdriver-agent-service-configs/master/etc/collectd.d/redis.conf)\n\n2. If your Redis instance is password-protected, or if you are using a\n nonstandard host or port for Redis, as **root** , edit `redis.conf` by\n following the instructions at the top of the file.\n\n3. **Restart the monitoring agent** by running the following command:\n\n sudo service stackdriver-agent restart\n\nFor more information on the `collectd` `redis` plugin, see\n[Plugin:Redis](https://collectd.org/wiki/index.php/Plugin:Redis).\n\nRedis metrics\n-------------\n\nThe full list of metrics the Redis plugin monitors is at\n[Agent metrics: redis](/monitoring/api/metrics_agent#agent-redis).\nThe actual metrics collected, and the metrics available in the\nMonitoring menus, can vary."]]