Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Neste guia, você aprenderá a configurar o Monitoring para monitorar o Redis.
O Redis é um armazenamento de valores-chave avançado e de código aberto. Ele também costuma ser conhecido como um servidor de estrutura de dados, já que os valores podem conter strings, hashes, listas e conjuntos (classificados ou não). Para saber mais, visite redis.io.
Observação: essa funcionalidade está disponível apenas para agentes em execução no Linux. Não
está disponível no Windows.
Discovery
O Monitoring descobrirá os serviços do Redis em execução no projeto do Cloud Platform se você tiver o seguinte:
instâncias de VM com redis no nome delas;
Regras de firewall que abrem a porta 6379
Para conferir as métricas do Redis, faça o seguinte:
Se você usar a barra de pesquisa para encontrar essa página, selecione o resultado com o subtítulo Monitoramento.
Selecione o painel Redis na lista.
Configurar o monitoramento do Redis
O agente do Monitoring usa a
biblioteca de cliente hiredis (em inglês)
para monitorar o Redis. Depois de instalar o Redis, instale hiredis executando os seguintes comandos:
Se sua instância do Redis for protegida por senha ou se você estiver usando um
host ou uma porta não padrão para o Redis, como raiz, edite redis.conf seguindo
as instruções na parte superior. do arquivo.
Reinicie o agente de monitoramento executando o seguinte comando:
sudo service stackdriver-agent restart
Para mais informações sobre o plug-in collectdredis, consulte Plugin:Redis (em inglês).
Métricas do Redis
A lista completa de métricas que o plug-in Redis monitora está em Métricas de agente: redis.
As métricas reais coletadas e as disponíveis nos menus do Monitoring podem variar.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-08-18 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."]]