godo.Monitoring.GetDropletFilesystemFree()

Generated on 5 Nov 2026 from godo version v1.236.0

Usage

client.Monitoring.GetDropletFilesystemFree(ctx context.Context, args *godo.DropletMetricsRequest) (*godo.MetricsResponse, *godo.Response, error)

Description

GetDropletFilesystemFree retrieves Droplet filesystem free metrics.

This method sends a GET request to /v2/monitoring/metrics/droplet/filesystem_free.

Parameters

args *godo.DropletMetricsRequest required

Fields of godo.DropletMetricsRequest

DropletMetricsRequest holds the information needed to retrieve Droplet various metrics.

HostID string
Start time.Time
End time.Time

Returns

*godo.MetricsResponse
*godo.Response

The HTTP response, with pagination Links, Meta, and Rate limit information.

error

Non-nil when the request fails. API errors are returned as *godo.ErrorResponse.

Fields of godo.MetricsResponse

MetricsResponse holds a Metrics query response.

Status string

JSON key: status

Data godo.MetricsData

JSON key: data

Request Sample

Show Request Sample
package main

import (
	"context"
	"fmt"
	"log"
	"os"

	"github.com/digitalocean/godo"
)

func main() {
	client := godo.NewFromToken(os.Getenv("DIGITALOCEAN_TOKEN"))
	ctx := context.TODO()

	result, _, err := client.Monitoring.GetDropletFilesystemFree(ctx, &godo.DropletMetricsRequest{
		HostID: "<your-host-id>",
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", result)
}

Response Example

Show Response Example
{
  "status": "success",
  "data": {
    "resultType": "matrix",
    "result": [
      {
        "metric": {
          "device": "/dev/vda1",
          "fstype": "ext4",
          "host_id": "222651441",
          "mountpoint": "/"
        },
        "values": [
          [
            1635386880,
            "25832407040"
          ],
          [
            1635387000,
            "25832407040"
          ],
          [
            1635387120,
            "25832407040"
          ]
        ]
      }
    ]
  }
}

More Information

See GET /v2/monitoring/metrics/droplet/filesystem_free in the API reference for additional detail on responses, headers, parameters, and more.

See the Go package documentation for the source of this method.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.