Google Cloud Memorystore for Redis
Monitor Google Cloud Memorystore for Redis metrics using OpenTelemetry collector with Last9
Use OpenTelemetry to collect Google Cloud Memorystore Redis metrics and send telemetry data to Last9.
Prerequisites
Before setting up Google Cloud Memorystore Redis monitoring, ensure you have:
- Google Cloud account with administrative privileges or Cloud Redis Admin privileges
- Access to a project in Google Cloud Platform (GCP)
- Google Cloud Redis APIs enabled - follow this guide to enable APIs
- Virtual Machine where you can run OpenTelemetry Collector to collect data from Google Cloud Memorystore Redis and send to Last9
-
Install OpenTelemetry Collector
You can install either
rpmordebpackage depending on flavor of operating system you are using.Note: systemd is required for automatic service configuration.
Installing rpm package:
wget https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.118.0/otelcol-contrib_0.118.0_linux_amd64.rpmsudo rpm -ivh otelcol-contrib_0.118.0_linux_amd64.rpmInstalling deb package:
wget https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.118.0/otelcol-contrib_0.118.0_linux_amd64.debsudo dpkg -i otelcol-contrib_0.118.0_linux_amd64.debMore installation options can be found here.
-
Configure Collector
Use the following configuration for Otel Collector:
receivers:googlecloudmonitoring:collection_interval: 60sproject_id: gcp-project-idmetrics_list:# Filter for specific metrics such cloudredis- metric_descriptor_filter: 'metric.type = starts_with("redis.googleapis.com")'processors:batch:timeout: 60ssend_batch_size: 100000send_batch_max_size: 100000resourcedetection/gcp:detectors: ["gcp"]exporters:otlp/last9:endpoint: "{{ .Logs.WriteURL }}"headers:"Authorization": "{{ .Logs.AuthValue }}"debug:verbosity: detailedservice:pipelines:metrics:receivers: [googlecloudmonitoring]processors: [batch, resourcedetection/gcp]exporters: [otlp/last9]Note: Replace
gcp-project-idwith your actual Google Cloud project ID.The complete list of supported metrics can be found here.
Read more about the Google Cloud monitoring receiver configuration options here.
-
Start Collector
Run the otel collector using
systemctlcommand:sudo systemctl start otelcol-contribsudo systemctl status otelcol-contribsudo systemctl restart otelcol-contrib -
Check Collector Logs
Monitor the collector logs to ensure it’s working correctly:
sudo journalctl -u otelcol-contrib -f
Verification
To verify the setup is working:
- Check that the collector service is running
- Review the collector logs for any errors
- Log into your Last9 account to confirm Redis metrics are being received
Need Help?
If you encounter any issues or have questions:
- Join our Discord community for real-time support
- Contact our support team at support@last9.io