[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-04。"],[],[],null,["# Monitor Memcached instances\n\nThis page describes how to monitor your Memorystore for Memcached instance's performance.\n\nMonitoring allows you to check in on your instances to make sure they're\nbehaving as desired. This guide covers a few basic examples of monitoring Memcached\ninstances. In addition to the types of monitoring covered here,\nMemorystore for Memcached is compatible with open source Memcached, so you can use\nexisting Memcached monitoring tools from Compute Engine VMs to\nmonitor your instances.\n\nMonitoring instances in the Google Cloud console\n------------------------------------------------\n\nTo view an instance's core metrics:\n\n1. Go to the **Memorystore for Memcached** page in the Google Cloud console. \n [Memorystore for Memcached](https://console.cloud.google.com/memorystore/memcached/instances?)\n2. Click the Instance ID of the instance you'd like to view.\n\nYou can monitor several metrics by visiting an instance's **Instance details**\npage in the Google Cloud console. By default, the graph shows the instance's\ncurrent memory usage and its max capacity. Other metrics available in the\nGoogle Cloud console are: Active Connections, Memory Usage, CPU Usage Time,\nHit Ratio, Items, Eviction Count, Operation Count, Received Bytes, Sent Bytes,\nUptime, Unused Memory, Get Operations, Set Operations, and Delete Operations.\n\nTo change the metrics shown on the graph, use the dropdown in its upper left\ncorner. To change the time frame, select a different period of time\nin the upper right corner of the graph.\n\nUsing Cloud Monitoring\n----------------------\n\n[Cloud Monitoring](/monitoring/docs) is a monitoring service\nthat allows you to view metrics such as uptime for your Memcached instances. For\nmore details about all Memorystore for Memcached metrics available from\nCloud Monitoring, see the [Monitoring reference documentation](/monitoring/api/metrics_gcp_i_o#gcp-memcache).\n\n### Signing up for Cloud Monitoring\n\nTo access the monitoring console, click **Monitoring** in the\nGoogle Cloud console navigation pane:\n\n[Go to Google Cloud console](https://console.cloud.google.com/)\n\nFor pricing information, see\n[Cloud Monitoring pricing](/stackdriver/pricing).\n\n### Viewing instance uptime, restart, and failover information in Monitoring\n\nTo view instance uptime information, use Metrics Explorer:\n\n1. Go to the Google Cloud console, login and navigate to the project with your\n Memcached instances:\n\n [Go to Google Cloud console](https://console.cloud.google.com/)\n2. Select **Monitoring** from the left navigation menu.\n\n3. In **Monitoring** , if the navigation pane isn't expanded,\n click **Expand**\n *last_page*.\n This button is located on the lower left of the console.\n\n4. If **Metrics Explorer** is shown in the navigation pane, click\n **Metrics Explorer** . Otherwise, select **Resources** and then select\n **Metrics Explorer**.\n\n5. In the **Find resource type and metric** field, enter\n `memcache.googleapis.com/node/uptime`.\n\nYour graph looks something like this:\n\n- Each line indicates a single instance.\n- Up and to the right indicates Memcached is up.\n- A drop off indicates a restart.\n- Missing data indicates unavailability.\n- Below your graph, there's a color-coded key that indicates which line belongs to which instance. As you hover over the key, the corresponding line on the graph is highlighted.\n\nYou can change the time horizon in the upper-right hand corner as well as add\nfilters to tailor the information you're seeing to a particular region, project,\ninstance, or node.\n\n### Viewing operations per second\n\nTo view an instance's operations per second, use Metrics Explorer:\n\n1. Go to the Google Cloud console, login and navigate to the project with your\n Memcached instances:\n\n [Go to Google Cloud console](https://console.cloud.google.com/)\n2. Select **Monitoring** from the left navigation menu.\n\n3. In **Monitoring** , if the navigation pane isn't expanded,\n click **Expand**\n *last_page*.\n This button is located on the lower left of the console.\n\n4. If **Metrics Explorer** is shown in the navigation pane, click\n **Metrics Explorer** . Otherwise, select **Resources** and then select\n **Metrics Explorer**.\n\n5. Select **Memcached instance** as the resource type.\n\n6. Enter `memcache.googleapis.com/node/operation_count` in the **Find resource\n type and metric** field.\n\n7. Choose **Sum** from the aggregation drop-down menu.\n\nCreating a dashboard to monitor Memcached memory usage\n------------------------------------------------------\n\n1. In the Google Cloud console, select **Monitoring**, or use the\n following button:\n\n [Go to Monitoring](https://console.cloud.google.com/monitoring)\n2. Select **Dashboards \\\u003e Create Dashboard**.\n\n3. Provide a name for the dashboard, e.g. \"Memcached Dashboard\", and click **Confirm**.\n\n4. Click **Add Chart**.\n\n 1. Provide a chart title. For example, \"Memcached Memory Usage\".\n\n 2. In the search box labeled **Find resource type and metric**, search for\n \"Memorystore Memcached Node\", and select the metric.\n\n 1. Enter \"Cache memory\" as the metric type.\n 1. In the Filter box, add a filter for instance_id and select the instance you want to monitor.\n 2. If you want to monitor the usage of all the Memorystore instances in your project, use Group by and select instance_id.\n5. Click **Save**. You can access this dashboard from the dashboards tab in the\n Monitoring UI.\n\n### Setting a Monitoring alert for a metric\n\nThis section explains how to set an alert in Monitoring for an\nindividual metric.\n\nTo create an alert for a metric:\n\n1. In the Google Cloud console, select **Monitoring**, or use the\n following button:\n\n [Go to Monitoring](https://console.cloud.google.com/monitoring)\n2. Click **Alerting** from the left navigation menu.\n\n3. Click the **Create Policy** button.\n\n4. Enter a Policy name.\n\n5. Click **Add Condition**.\n\n 1. Provide a name for the condition, for example \"Memory Usage Alert\".\n 2. Under **Target** , select Memorystore Memcached Node instance resource type.\n 1. Select the desired metric. For example, select \"Memory Usage\".\n 3. Under **Configuration** , choose your desired condition.\n 1. For example, for Memory Usage you can choose **Any time the series violates**.\n 4. Select values for **Condition triggers if** , **Threshold** , and duration (labeled as **For** ).\n 1. For example, use the **Condition** , *is above* , and set **Threshold** to the equivalent, in bytes, of 80% of your instance size. Set **For** to 1 minute initially to understand the usage pattern.\n 5. Click **Add**.\n6. Set up a notification channel:\n\n 1. Click the **Add notification channel** button.\n - Option 1) Choose *Email* from the **Notification Channel Type** menu.\n - Enter the email address where you want your alerts sent.\n - Option 2) See [Creating channels](/monitoring/support/notification-options#creating_channels) for instructions on setting up other types of notification channels.\n7. Click the **Save** button.\n\nViewing Memcached logs\n----------------------\n\nMemcached produces logs that Cloud Logging captures.\n\n### Viewing audit logs\n\n1. Go to the **Logs Explorer** page in the Google Cloud console.\n\n [Logs Explorer](https://console.cloud.google.com/logs)\n2. To view the audit logs, select **Audited Resource \\\u003e memcached.googleapis.com** from the\n resources drop-down.\n\nWhat's next\n-----------\n\n- View available [Memcached metrics](/memorystore/docs/memcached/memcached-metrics).\n- View available [Memcached configurations](/memorystore/docs/memcached/memcached-configs)."]]