Monitoring Memcached instances

This page describes how to monitor your Memorystore for Memcached instance's performance.

Monitoring allows you to check in on your instances to make sure they're behaving as desired. This guide covers a few basic examples of monitoring Memcached instances. In addition to the types of monitoring covered here, Memorystore for Memcached is compatible with open source Memcached, so you can use existing Memcached monitoring tools from Compute Engine VMs to monitor your instances.

Monitoring instances in the Google Cloud Console

To view an instance's core metrics:

  1. Go to the Memorystore for Memcached page in the Google Cloud Console.
    Memorystore for Memcached
  2. Click the Instance ID of the instance you'd like to view.

You can monitor several metrics by visiting an instance's Instance details page in the Google Cloud Console. By default, the graph shows the instance's current memory usage and its max capacity. Other metrics available in the Cloud Console are: Active Connections, Memory Usage, CPU Usage Time, Hit Ratio, Items, Eviction Count, Operation Count, Received Bytes, Sent Bytes, Uptime, Unused Memory, Get Operations, Set Operations, and Delete Operations.

To change the metrics shown on the graph, use the dropdown in its upper left corner. To change the time frame, select a different period of time in the upper right corner of the graph.

Using Cloud Monitoring

Cloud Monitoring is a monitoring service that allows you to view metrics such as uptime for your Memcached instances. For more details about all Memorystore for Memcached metrics available from Cloud Monitoring, see the Monitoring reference documentation.

Signing up for Cloud Monitoring

To access the monitoring console, click Monitoring in the Cloud Console navigation pane:

Go to Cloud Console

If this is your first access of Monitoring for your Google Cloud project, then Monitoring needs to create a Workspace. Typically, this process is transparent to you and only takes a few moments. If you see the Add your project to a Workspace dialog, select New Workspace and click Add.

For pricing information, see Cloud Monitoring pricing.

Viewing instance uptime, restart, and failover information in Monitoring

To view instance uptime information, use Metrics Explorer:

  1. Go to the Google Cloud Console, login and navigate to the project with your Memcached instances:

    Go to Cloud Console

  2. Select Monitoring from the left navigation menu.

  3. In Monitoring, if the navigation pane isn't expanded, click Expand . This button is located on the lower left of the console.

  4. If Metrics Explorer is shown in the navigation pane, click Metrics Explorer. Otherwise, select Resources and then select Metrics Explorer.

  5. In the Find resource type and metric field, enter memcache.googleapis.com/node/uptime.

Your graph looks something like this:

Graph of instance uptime

  • Each line indicates a single instance.
  • Up and to the right indicates Memcached is up.
  • A drop off indicates a restart.
  • Missing data indicates unavailability.
  • 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.

You can change the time horizon in the upper-right hand corner as well as add filters to tailor the information you're seeing to a particular region, project, instance, or node.

Viewing operations per second

To view an instance's operations per second, use Metrics Explorer:

  1. Go to the Google Cloud Console, login and navigate to the project with your Memcached instances:

    Go to Cloud Console

  2. Select Monitoring from the left navigation menu.

  3. In Monitoring, if the navigation pane isn't expanded, click Expand . This button is located on the lower left of the console.

  4. If Metrics Explorer is shown in the navigation pane, click Metrics Explorer. Otherwise, select Resources and then select Metrics Explorer.

  5. Select Memcached instance as the resource type.

  6. Enter memcache.googleapis.com/node/operation_count in the Find resource type and metric field.

  7. Choose Sum from the aggregation drop-down menu.

Creating a dashboard to monitor Memcached memory usage

  1. In the Google Cloud Console, select Monitoring, or use the following button:

    Go to Monitoring

  2. Select Dashboards > Create Dashboard.

  3. Click Add Chart.

    1. Provide a name for the chart. For example, "Memcached Memory Usage".

    2. In the search box labeled Find resource type and metric, search for "Cloud Memorystore Memcache Node", and select the metric.

      1. Click Add Metric, search for "Cache memory", and select it.
        1. In the Filter box, add a filter for instance_id and select the instance you want to monitor.
        2. If you want to monitor the usage of all the Memorystore instances in your project, use Group by and select instance_id.
        3. Under Aggregation, set the Aligner to Max.
  4. Click Save. You can access this dashboard from the menu by hovering over Dashboards.

Viewing Memcached logs

Memcached produces logs that Cloud Logging captures.

Viewing audit logs

  1. Go to the Logs Viewer page in the Cloud Console.

    Logs Viewer

  2. To view the audit logs, select Audited Resource > memcached.googleapis.com from the resources drop-down, as shown below:

    Logs viewer screen shot

What's next