- Metricbeat Reference: other versions:
- Metricbeat overview
- Quick start: installation and configuration
- Set up and run
- Upgrade Metricbeat
- How Metricbeat works
- Configure
- Modules
- General settings
- Project paths
- Config file loading
- Output
- Kerberos
- SSL
- Index lifecycle management (ILM)
- Elasticsearch index template
- Kibana endpoint
- Kibana dashboards
- Processors
- Define processors
- add_cloud_metadata
- add_cloudfoundry_metadata
- add_docker_metadata
- add_fields
- add_host_metadata
- add_id
- add_kubernetes_metadata
- add_labels
- add_locale
- add_network_direction
- add_nomad_metadata
- add_observer_metadata
- add_process_metadata
- add_tags
- append
- community_id
- convert
- copy_fields
- decode_base64_field
- decode_duration
- decode_json_fields
- decode_xml
- decode_xml_wineventlog
- decompress_gzip_field
- detect_mime_type
- dissect
- dns
- drop_event
- drop_fields
- extract_array
- fingerprint
- include_fields
- move_fields
- rate_limit
- registered_domain
- rename
- replace
- script
- syslog
- translate_sid
- truncate_fields
- urldecode
- Autodiscover
- Internal queue
- Logging
- HTTP endpoint
- Regular expression support
- Instrumentation
- Feature flags
- metricbeat.reference.yml
- How to guides
- Modules
- ActiveMQ module
- Aerospike module
- Airflow module
- Apache module
- AWS module
- AWS billing metricset
- AWS cloudwatch metricset
- AWS dynamodb metricset
- AWS ebs metricset
- AWS ec2 metricset
- AWS elb metricset
- AWS kinesis metricset
- AWS lambda metricset
- AWS natgateway metricset
- AWS rds metricset
- AWS s3_daily_storage metricset
- AWS s3_request metricset
- AWS sns metricset
- AWS sqs metricset
- AWS transitgateway metricset
- AWS usage metricset
- AWS vpn metricset
- AWS Fargate module
- Azure module
- Azure app_insights metricset
- Azure app_state metricset
- Azure billing metricset
- Azure compute_vm metricset
- Azure compute_vm_scaleset metricset
- Azure container_instance metricset
- Azure container_registry metricset
- Azure container_service metricset
- Azure database_account metricset
- Azure monitor metricset
- Azure storage metricset
- Beat module
- Ceph module
- Ceph cluster_disk metricset
- Ceph cluster_health metricset
- Ceph cluster_status metricset
- Ceph mgr_cluster_disk metricset
- Ceph mgr_cluster_health metricset
- Ceph mgr_osd_perf metricset
- Ceph mgr_osd_pool_stats metricset
- Ceph mgr_osd_tree metricset
- Ceph mgr_pool_disk metricset
- Ceph monitor_health metricset
- Ceph osd_df metricset
- Ceph osd_tree metricset
- Ceph pool_disk metricset
- Cloudfoundry module
- CockroachDB module
- Consul module
- Containerd module
- Coredns module
- Couchbase module
- CouchDB module
- Docker module
- Dropwizard module
- Elasticsearch module
- Elasticsearch ccr metricset
- Elasticsearch cluster_stats metricset
- Elasticsearch enrich metricset
- Elasticsearch index metricset
- Elasticsearch index_recovery metricset
- Elasticsearch index_summary metricset
- Elasticsearch ingest_pipeline metricset
- Elasticsearch ml_job metricset
- Elasticsearch node metricset
- Elasticsearch node_stats metricset
- Elasticsearch pending_tasks metricset
- Elasticsearch shard metricset
- Enterprise Search module
- Envoyproxy module
- Etcd module
- Google Cloud Platform module
- Google Cloud Platform billing metricset
- Google Cloud Platform carbon metricset
- Google Cloud Platform compute metricset
- Google Cloud Platform dataproc metricset
- Google Cloud Platform firestore metricset
- Google Cloud Platform gke metricset
- Google Cloud Platform loadbalancing metricset
- Google Cloud Platform metrics metricset
- Google Cloud Platform pubsub metricset
- Google Cloud Platform storage metricset
- Golang module
- Graphite module
- HAProxy module
- HTTP module
- IBM MQ module
- IIS module
- Istio module
- Jolokia module
- Kafka module
- Kibana module
- Kubernetes module
- Kubernetes apiserver metricset
- Kubernetes container metricset
- Kubernetes controllermanager metricset
- Kubernetes event metricset
- Kubernetes node metricset
- Kubernetes pod metricset
- Kubernetes proxy metricset
- Kubernetes scheduler metricset
- Kubernetes state_container metricset
- Kubernetes state_cronjob metricset
- Kubernetes state_daemonset metricset
- Kubernetes state_deployment metricset
- Kubernetes state_job metricset
- Kubernetes state_node metricset
- Kubernetes state_persistentvolumeclaim metricset
- Kubernetes state_pod metricset
- Kubernetes state_replicaset metricset
- Kubernetes state_resourcequota metricset
- Kubernetes state_service metricset
- Kubernetes state_statefulset metricset
- Kubernetes state_storageclass metricset
- Kubernetes system metricset
- Kubernetes volume metricset
- KVM module
- Linux module
- Logstash module
- Memcached module
- MongoDB module
- MSSQL module
- Munin module
- MySQL module
- NATS module
- Nginx module
- Openmetrics module
- Oracle module
- PHP_FPM module
- PostgreSQL module
- Prometheus module
- RabbitMQ module
- Redis module
- Redis Enterprise module
- SQL module
- Stan module
- Statsd module
- SyncGateway module
- System module
- System core metricset
- System cpu metricset
- System diskio metricset
- System entropy metricset
- System filesystem metricset
- System fsstat metricset
- System load metricset
- System memory metricset
- System network metricset
- System network_summary metricset
- System process metricset
- System process_summary metricset
- System raid metricset
- System service metricset
- System socket metricset
- System socket_summary metricset
- System uptime metricset
- System users metricset
- Tomcat module
- Traefik module
- uWSGI module
- vSphere module
- Windows module
- ZooKeeper module
- Exported fields
- ActiveMQ fields
- Aerospike fields
- Airflow fields
- Apache fields
- AWS fields
- AWS Fargate fields
- Azure fields
- Beat fields
- Beat fields
- Ceph fields
- Cloud provider metadata fields
- Cloudfoundry fields
- CockroachDB fields
- Common fields
- Consul fields
- Containerd fields
- Coredns fields
- Couchbase fields
- CouchDB fields
- Docker fields
- Docker fields
- Dropwizard fields
- ECS fields
- Elasticsearch fields
- Enterprise Search fields
- Envoyproxy fields
- Etcd fields
- Google Cloud Platform fields
- Golang fields
- Graphite fields
- HAProxy fields
- Host fields
- HTTP fields
- IBM MQ fields
- IIS fields
- Istio fields
- Jolokia fields
- Jolokia Discovery autodiscover provider fields
- Kafka fields
- Kibana fields
- Kubernetes fields
- Kubernetes fields
- KVM fields
- Linux fields
- Logstash fields
- Memcached fields
- MongoDB fields
- MSSQL fields
- Munin fields
- MySQL fields
- NATS fields
- Nginx fields
- Openmetrics fields
- Oracle fields
- PHP_FPM fields
- PostgreSQL fields
- Process fields
- Prometheus fields
- Prometheus typed metrics fields
- RabbitMQ fields
- Redis fields
- Redis Enterprise fields
- SQL fields
- Stan fields
- Statsd fields
- SyncGateway fields
- System fields
- Tomcat fields
- Traefik fields
- uWSGI fields
- vSphere fields
- Windows fields
- ZooKeeper fields
- Monitor
- Secure
- Troubleshoot
- Get help
- Debug
- Common problems
- "open /compat/linux/proc: no such file or directory" error on FreeBSD
- Metricbeat collects system metrics for interfaces you didn’t configure
- Metricbeat uses too much bandwidth
- Error loading config file
- Found unexpected or unknown characters
- Logstash connection doesn’t work
- Publishing to Logstash fails with "connection reset by peer" message
- @metadata is missing in Logstash
- Not sure whether to use Logstash or Beats
- SSL client fails to connect to Logstash
- Monitoring UI shows fewer Beats than expected
- Dashboard could not locate the index-pattern
- High RSS memory usage due to MADV settings
- Contribute to Beats
AWS cloudwatch metricset
editAWS cloudwatch metricset
editThe cloudwatch metricset of aws module allows you to monitor various services on
AWS. cloudwatch
metricset fetches metrics from given namespace periodically
by calling GetMetricData
api.
AWS Permissions
editSome specific AWS permissions are required for IAM user to collect AWS Cloudwatch metrics.
ec2:DescribeRegions cloudwatch:GetMetricData cloudwatch:ListMetrics tag:getResources sts:GetCallerIdentity iam:ListAccountAliases
Metricset-specific configuration notes
edit- namespace: The namespace used by ListMetrics API to filter against. For example, AWS/EC2, AWS/S3. If wildcard * is given for namespace, metrics from all namespaces will be collected automatically.
- name: The name of the metric to filter against. For example, CPUUtilization for EC2 instance.
- dimensions: The dimensions to filter against. For example, InstanceId=i-123.
- resource_type: The constraints on the resources that you want returned. The format of each resource type is service[:resourceType]. For example, specifying a resource type of ec2 returns all Amazon EC2 resources (which includes EC2 instances). Specifying a resource type of ec2:instance returns only EC2 instances.
- statistic: Statistics are metric data aggregations over specified periods of time. By default, statistic includes Average, Sum, Count, Maximum and Minimum.
Configuration examples
editTo be more focused on cloudwatch
metricset use cases, the examples below do
not include configurations on AWS credentials.
Please see AWS credentials options for more details on setting AWS credentials
in configurations in order for this metricset to make proper AWS API calls.
Example 1
edit- module: aws period: 300s metricsets: - cloudwatch tags_filter: - key: "Organization" value: "Engineering" metrics: - namespace: AWS/EBS - namespace: AWS/ELB resource_type: elasticloadbalancing - namespace: AWS/EC2 name: CPUUtilization statistic: ["Average"] dimensions: - name: InstanceId value: i-0686946e22cf9494a
Users can configure the |
|
|
|
If tags are collected (for metricsets with |
|
If users knows exactly what are the cloudwatch metrics they want to collect,
this configuration format can be used. |
Example 2
edit- module: aws period: 300s metricsets: - cloudwatch metrics: - namespace: "*"
With this config, metrics from all namespaces will be collected from Cloudwatch. The limitation here is the collection period for all namespaces are all set to be the same, which in this case is 300 second. This will cause extra costs for API calls or data loss. For example, metrics from namespace AWS/Usage are sent to Cloudwatch every 1 minute. With the collection period equals to 300 seconds, data points in between will get lost. Metrics from namespace AWS/Billing are sent to Cloudwatch every several hours. By querying from AWS/Billing namespace every 300 seconds, additional costs will occur.
Example 3
editDepends on the configuration and number of services in the AWS account, the number of API calls may get too big to cause high API cost. In order to reduce the number of API calls, we recommend users to use this configuration below as an example.
- metrics.name: Only collect a sub list of metrics that are useful to your use case.
- metrics.statistic: By default, cloudwatch metricset will make API calls to get all stats like average, max, min, sum and etc. If the user knows which statistics method is most useful, specify it in the configuration.
-
metrics.dimensions: Different AWS services report different dimensions in their
CloudWatch metrics. For example, EMR metrics
can have either
JobFlowId
dimension orJobId
dimension. If user knows which specific dimension is useful, it can be specified in this configuration option.
- module: aws period: 5m metricsets: - cloudwatch regions: us-east-1 metrics: - namespace: AWS/ElasticMapReduce name: ["S3BytesWritten", "S3BytesRead", "HDFSUtilization", "TotalLoad"] resource_type: elasticmapreduce statistic: ["Average"] dimensions: - name: JobId value: "*"
More examples
editWith the configuration below, users will be able to collect cloudwatch metrics from EBS, ELB and EC2 without tag information.
- module: aws period: 300s metricsets: - cloudwatch metrics: - namespace: AWS/EBS - namespace: AWS/ELB - namespace: AWS/EC2
With the configuration below, users will be able to collect cloudwatch metrics from EBS, ELB and EC2 with tags from these services.
- module: aws period: 300s metricsets: - cloudwatch metrics: - namespace: AWS/EBS resource_type: ebs - namespace: AWS/ELB resource_type: elasticloadbalancing - namespace: AWS/EC2 resource_type: ec2:instance
With the configuration below, users will be able to collect specific cloudwatch metrics. For example CPUUtilization metric(average) from EC2 instance i-123 and NetworkIn metric(average) from EC2 instance i-456.
- module: aws period: 300s metricsets: - cloudwatch metrics: - namespace: AWS/EC2 name: ["CPUUtilization"] resource_type: ec2:instance dimensions: - name: InstanceId value: i-123 statistic: ["Average"] - namespace: AWS/EC2 name: ["NetworkIn"] dimensions: - name: InstanceId value: i-456 statistic: ["Average"]
With the configuration below, user can filter out only LoadBalacer
and TargetGroup
dimension
metircs with the metric name UnHealthyHostCount
, LoadBalacer
and TargetGroup
value could
be any.
- module: aws period: 300s metricsets: - cloudwatch metrics: - namespace: AWS/ApplicationELB statistic: ['Maximum'] name: ['UnHealthyHostCount'] dimensions: - name: LoadBalancer value: "*" - name: TargetGroup value: "*" resource_type: elasticloadbalancing
This is a default metricset. If the host module is unconfigured, this metricset is enabled by default.
For a description of each field in the metricset, see the exported fields section.
Here is an example document generated by this metricset:
{ "@timestamp": "2017-10-12T08:05:34.853Z", "aws": { "cloudwatch": { "namespace": "AWS/RDS" }, "dimensions": { "DBClusterIdentifier": "database-1", "Role": "READER" }, "rds": { "metrics": { "AbortedClients": { "avg": 0, "count": 5, "max": 0, "min": 0, "sum": 0 }, "ActiveTransactions": { "avg": 0, "count": 5, "max": 0, "min": 0, "sum": 0 }, "AuroraBinlogReplicaLag": { "avg": 0, "count": 5, "max": 0, "min": 0, "sum": 0 }, "AuroraReplicaLag": { "avg": 18.4158, "count": 5, "max": 23.787, "min": 10.634, "sum": 92.07900000000001 }, "AuroraVolumeBytesLeftTotal": { "avg": 70007366615040, "count": 5, "max": 70007366615040, "min": 70007366615040, "sum": 350036833075200 }, "Aurora_pq_request_attempted": { "avg": 0, "count": 5, "max": 0, "min": 0, "sum": 0 }, "Aurora_pq_request_executed": { "avg": 0, "count": 5, "max": 0, "min": 0, "sum": 0 }, "Aurora_pq_request_failed": { "avg": 0, "count": 5, "max": 0, "min": 0, "sum": 0 }, "Aurora_pq_request_in_progress": { "avg": 0, "count": 5, "max": 0, "min": 0, "sum": 0 }, "Aurora_pq_request_not_chosen": { "avg": 0, "count": 5, "max": 0, "min": 0, "sum": 0 }, "Aurora_pq_request_not_chosen_below_min_rows": { "avg": 0, "count": 5, "max": 0, "min": 0, "sum": 0 }, "Aurora_pq_request_not_chosen_few_pages_outside_buffer_pool": { "avg": 0, "count": 5, "max": 0, "min": 0, "sum": 0 }, "Aurora_pq_request_not_chosen_long_trx": { "avg": 0, "count": 5, "max": 0, "min": 0, "sum": 0 }, "Aurora_pq_request_not_chosen_pq_high_buffer_pool_pct": { "avg": 0, "count": 5, "max": 0, "min": 0, "sum": 0 }, "Aurora_pq_request_not_chosen_small_table": { "avg": 0, "count": 5, "max": 0, "min": 0, "sum": 0 }, "Aurora_pq_request_not_chosen_unsupported_access": { "avg": 0, "count": 5, "max": 0, "min": 0, "sum": 0 }, "Aurora_pq_request_throttled": { "avg": 0, "count": 5, "max": 0, "min": 0, "sum": 0 }, "BlockedTransactions": { "avg": 0, "count": 5, "max": 0, "min": 0, "sum": 0 }, "BufferCacheHitRatio": { "avg": 100, "count": 5, "max": 100, "min": 100, "sum": 500 }, "CPUUtilization": { "avg": 6.051666111792592, "count": 5, "max": 6.216563057282379, "min": 5.808333333333334, "sum": 30.25833055896296 }, "CommitLatency": { "avg": 0, "count": 5, "max": 0, "min": 0, "sum": 0 }, "CommitThroughput": { "avg": 0, "count": 5, "max": 0, "min": 0, "sum": 0 }, "ConnectionAttempts": { "avg": 0, "count": 5, "max": 0, "min": 0, "sum": 0 }, "DDLLatency": { "avg": 0, "count": 5, "max": 0, "min": 0, "sum": 0 }, "DDLThroughput": { "avg": 0, "count": 5, "max": 0, "min": 0, "sum": 0 }, "DMLLatency": { "avg": 0, "count": 5, "max": 0, "min": 0, "sum": 0 }, "DMLThroughput": { "avg": 0, "count": 5, "max": 0, "min": 0, "sum": 0 }, "DatabaseConnections": { "avg": 0, "count": 5, "max": 0, "min": 0, "sum": 0 }, "Deadlocks": { "avg": 0, "count": 5, "max": 0, "min": 0, "sum": 0 }, "DeleteLatency": { "avg": 0, "count": 5, "max": 0, "min": 0, "sum": 0 }, "DeleteThroughput": { "avg": 0, "count": 5, "max": 0, "min": 0, "sum": 0 }, "EBSByteBalance%": { "avg": 99, "count": 1, "max": 99, "min": 99, "sum": 99 }, "EBSIOBalance%": { "avg": 99, "count": 1, "max": 99, "min": 99, "sum": 99 }, "EngineUptime": { "avg": 20800826, "count": 5, "max": 20800946, "min": 20800706, "sum": 104004130 }, "FreeLocalStorage": { "avg": 29682751078.4, "count": 5, "max": 29682819072, "min": 29682675712, "sum": 148413755392 }, "FreeableMemory": { "avg": 4639068160, "count": 5, "max": 4639838208, "min": 4638638080, "sum": 23195340800 }, "InsertLatency": { "avg": 0, "count": 5, "max": 0, "min": 0, "sum": 0 }, "InsertThroughput": { "avg": 0, "count": 5, "max": 0, "min": 0, "sum": 0 }, "LoginFailures": { "avg": 0, "count": 5, "max": 0, "min": 0, "sum": 0 }, "NetworkReceiveThroughput": { "avg": 0.8399323667305664, "count": 5, "max": 1.399556807011113, "min": 0.6999533364442371, "sum": 4.199661833652832 }, "NetworkThroughput": { "avg": 1.6798647334611327, "count": 5, "max": 2.799113614022226, "min": 1.3999066728884741, "sum": 8.399323667305664 }, "NetworkTransmitThroughput": { "avg": 0.8399323667305664, "count": 5, "max": 1.399556807011113, "min": 0.6999533364442371, "sum": 4.199661833652832 }, "NumBinaryLogFiles": { "avg": 0, "count": 5, "max": 0, "min": 0, "sum": 0 }, "Queries": { "avg": 6.3836833181909265, "count": 5, "max": 6.53289780681288, "min": 6.184260972479205, "sum": 31.91841659095463 }, "ReadLatency": { "avg": 0, "count": 5, "max": 0, "min": 0, "sum": 0 }, "ResultSetCacheHitRatio": { "avg": 0, "count": 5, "max": 0, "min": 0, "sum": 0 }, "RollbackSegmentHistoryListLength": { "avg": 0, "count": 5, "max": 0, "min": 0, "sum": 0 }, "RowLockTime": { "avg": 0, "count": 5, "max": 0, "min": 0, "sum": 0 }, "SelectLatency": { "avg": 0.2519199153394592, "count": 5, "max": 0.2609050632911392, "min": 0.24367924528301885, "sum": 1.2595995766972958 }, "SelectThroughput": { "avg": 2.6002296989354514, "count": 5, "max": 2.650618477644784, "min": 2.5335866920025336, "sum": 13.001148494677256 }, "SumBinaryLogSize": { "avg": 0, "count": 5, "max": 0, "min": 0, "sum": 0 }, "UpdateLatency": { "avg": 0, "count": 5, "max": 0, "min": 0, "sum": 0 }, "UpdateThroughput": { "avg": 0, "count": 5, "max": 0, "min": 0, "sum": 0 }, "WriteLatency": { "avg": 0, "count": 5, "max": 0, "min": 0, "sum": 0 } } } }, "cloud": { "account": { "id": "428152502467", "name": "elastic-beats" }, "provider": "aws", "region": "eu-west-1" }, "event": { "dataset": "aws.cloudwatch", "duration": 115000, "module": "aws" }, "metricset": { "name": "cloudwatch", "period": 10000 }, "service": { "type": "aws" } }
On this page