Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Unable to retrieve the redis instance ID using API

Hi All,

We are monitoring the GCP environment using Elastic. To get the redis metrics, we are using the Elastic Metricbeat agent using Google Cloud Module. It collects metrics, events, and metadata from different services from Google Cloud. This metricset is to collect monitoring metrics from Google Cloud using ListTimeSeries API. Here is the link to the Google metrics for redis - https://cloud.google.com/monitoring/api/metrics_gcp#gcp-redis

 

The data pulled by the Google API is visible but it does not contain the instance_id and provides only the node_id of Redis . Without the instance_id the data is useless as it is not possible to create aggregation if there more than 1 redis instance in the GCP project.

 

Does the API support retrieval of the instance ID?

 

 

 

 

 

"@metadata": {
    "beat": "metricbeat",
    "type": "_doc",
    "version": "7.14.1"
  },
  "event": {
    "dataset": "gcp.metrics",
    "module": "gcp",
    "duration": 1749418883
  },
  "metricset": {
    "period": 300000,
    "name": "metrics"
  },
  "gcp": {
    "labels": {
      "metrics": {
        "cmd": "zrem",
        "role": "replica"
      },
      "resource": {
        "region": "<region>",
        "node_id": "node-1"
      }
    },
    "metrics": {
      "redis": {
        "googleapis": {
          "com": {
            "commands": {
              "usec_per_call": {
                "value": 13.721590724800167
              }
            }
          }
        }
      }
    }
  },
  "ecs": {
    "version": "1.10.0"
  },
  "host": {
    "ip": [
      <IP_information>
    ],
    "mac": [
      "<mac_info>"
    ],
    "hostname": "<hostname>",
    "architecture": "x86_64",
    "os": {
      <OS_info>
    },
    "id": "2e5ec94c2b63a79b028973111a864141",
  },
  "agent": {
    <agent_info>
  },
  "service": {
    "type": "gcp"
  },
  "cloud": {
    "provider": "gcp",
    "account": {
      <gcp_account_info>
    }
  }
}

 

 

 

 

 

 

 

 
0 3 525
3 REPLIES 3

Hello,

The metrics you are using is for  Redis instance hosted on Google Cloud Memorystore. It is not same for Redis hosted in GCE or GKE for example. You can check this documentation for monitoring Redis in other resources.

Hi Shamma,

Thank you for your response. I'm looking to monitor Redis instance hosted on Google Cloud Memorystore

Hello,

 

I would suggest you to create a Public Issue Tracker to report this issue, as this needs proper investigation with more information about your set up and how the agent is collecting data. This forum is mainly to discuss products behavior.