View a markdown version of this page

- Amazon Managed Service for Prometheus

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

建立湊集器

注意

global: external_labels: domain_name: my-opensearch-domain scrape_configs: - job_name: opensearch-exporter scrape_interval: 60s

To create a scraper using the AWS API

注意

POST /scrapers HTTP/1.1 { "alias": "myScraper", "source": { "vpcConfiguration": { "securityGroupIds": ["sg-security-group-id"], "subnetIds": ["subnet-subnet-id-1", "subnet-subnet-id-2"] } }, "exporters": [ { "openSearchConfiguration": { "domainArn": "arn:aws:es:us-east-1:123456789012:domain/my-opensearch-domain" } } ], "destination": { "ampConfiguration": { "workspaceArn": "arn:aws:aps:us-east-1:123456789012:workspace/ws-workspace-id" } }, "scrapeConfiguration": { "configurationBlob": "base64-encoded-blob" } }

"destination": { "cloudWatchConfiguration": { "datasetArn": "arn:aws:cloudwatch:us-east-1:123456789012:dataset/default" } }

範例
base64 -w0 scraper-config.yaml
範例 Windows PowerShell
[Convert]::ToBase64String([System.IO.File]::ReadAllBytes("scraper-config.yaml"))
To create a scraper using the AWS CLI

注意

aws amp create-scraper \ --source '{"vpcConfiguration":{"securityGroupIds":["sg-security-group-id"],"subnetIds":["subnet-subnet-id-1","subnet-subnet-id-2"]}}' \ --exporters '[{"openSearchConfiguration":{"domainArn":"arn:aws:es:us-east-1:123456789012:domain/my-opensearch-domain"}}]' \ --scrape-configuration configurationBlob=base64-encoded-blob \ --destination '{"ampConfiguration":{"workspaceArn":"arn:aws:aps:us-east-1:123456789012:workspace/ws-workspace-id"}}'

注意

  1. { "Effect": "Allow", "Principal": { "Service": [ "scraper.aps.amazonaws.com" ] }, "Action": "sts:AssumeRole", "Condition": { "ArnEquals": { "aws:SourceArn": "arn:aws:aps:aws-region:111122223333:scraper/scraper-id" }, "StringEquals": { "AWS:SourceAccount": "111122223333" } } }
  2. { "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::111122223333:role/Source" }, "Action": "sts:AssumeRole", "Condition": { "StringEquals": { "sts:ExternalId": "arn:aws:aps:aws-region:111122223333:scraper/scraper-id" } } }

  3. aws amp create-scraper \ --source '{"vpcConfiguration":{"securityGroupIds":["sg-security-group-id"],"subnetIds":["subnet-subnet-id-1","subnet-subnet-id-2"]}}' \ --exporters '[{"openSearchConfiguration":{"domainArn":"arn:aws:es:aws-region:111122223333:domain/my-opensearch-domain"}}]' \ --scrape-configuration configurationBlob=<base64-encoded-blob> \ --destination '{"ampConfiguration":{"workspaceArn":"arn:aws:aps:aws-region:444455556666:workspace/ws-workspace-id"}}' \ --role-configuration '{"sourceRoleArn":"arn:aws:iam::111122223333:role/Source", "targetRoleArn":"arn:aws:iam::444455556666:role/Target"}'
  4. aws amp list-scrapers

尋找並刪除湊集器

注意

aws amp list-scrapers

aws amp delete-scraper --scraper-id scraperId

指標

叢集中的節點數量。

指標

相關指標包括 opensearch_jvm_memory_committed_bytes 和 opensearch_jvm_memory_max_bytes。

相關指標包括 opensearch_filesystem_data_free_bytes 和 opensearch_filesystem_data_size_bytes。

相關指標包括 opensearch_breakers_estimated_size_bytes 和 opensearch_breakers_limit_size_bytes。

指標

相關指標包括 opensearch_indices_merges_current 和 opensearch_indices_merges_total_time_seconds_total。

相關指標包括 opensearch_indices_query_cache_count 和 opensearch_indices_query_cache_evictions。

相關指標包括 opensearch_indices_request_cache_count 和 opensearch_indices_request_cache_evictions。

限制