Get Host Metrics
get_host_metricsRetrieve metrics data for a specific host from Mackerel to analyze performance over time across standard, custom, and cloud integration metrics.
Instructions
Retrieve metrics data for a specific host from Mackerel.
š USE THIS TOOL WHEN USERS:
Get metrics data for a specific host
Analyze host performance over time
š AVAILABLE METRIC NAMES:
Standard metrics (mackerel-agent): loadavg5, cpu.user, memory.used, disk.sda1.reads, network.eth0.rxBytes, etc.
Custom metrics: custom.myapp.* (user-defined metrics)
AWS integration: ec2.cpu.used, rds.database_connections.used, etc.
Azure integration: azure.virtual_machine.cpu.percent, azure.sql_database.cpu.percent, etc.
GCP integration: gce.instance.cpu.used, etc.
Get custom metric
get_host_metrics(hostId="host123", name="custom.myapp.response_time", from=1609459200, to=1609462800)Get AWS EC2 CPU utilization
get_host_metrics(hostId="host123", name="ec2.cpu.used", from=1609459200, to=1609462800)Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | The end of the time period you want metrics for (unix time) | |
| from | Yes | The start of the time period you want metrics for (unix time) | |
| name | Yes | Metric name (e.g., loadavg5, cpu.user, memory.used, custom.myapp.*, ec2.cpu.used, etc.) | |
| hostId | Yes | Host ID |