https://github.com/awslabs/aws-cloudmap-prometheus-sd

A custom service discovery adapter for Prometheus that integrates with AWS Cloud Map

https://github.com/awslabs/aws-cloudmap-prometheus-sd

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (7.5%) to scientific vocabulary

Keywords from Contributors

diagram labels interaction
Last synced: 9 months ago · JSON representation

Repository

A custom service discovery adapter for Prometheus that integrates with AWS Cloud Map

Basic Info
  • Host: GitHub
  • Owner: awslabs
  • License: apache-2.0
  • Language: Go
  • Default Branch: master
  • Homepage:
  • Size: 203 KB
Statistics
  • Stars: 36
  • Watchers: 4
  • Forks: 11
  • Open Issues: 2
  • Releases: 0
Created over 6 years ago · Last pushed almost 2 years ago
Metadata Files
Readme Contributing License Code of conduct

README.md

aws-cloudmap-prometheus-sd

A custom service discovery adapter for Prometheus that integrates with AWS Cloud Map. This leverages custom sd to output a file that can be passed as file_sd in prometheus.yaml. This will allow you to pass your targets registered under Cloud Map service to Prometheus for scraping without having to use a static config.

AWS Cloud Map is a cloud resource discovery service. With Cloud Map, you can define custom names for your application resources, and it maintains the updated location of these dynamically changing resources. This increases your application availability because your web service always discovers the most up-to-date locations of its resources.

Usage

  1. Clone this repository git clone https://github.com/awslabs/aws-cloudmap-prometheus-sd
  2. Build ``` make image

awslabs/aws-cloudmap-prometheus-sd 3. Run mkdir -p /tmp/output

docker run -v /tmp/output:/output awslabs/aws-cloudmap-prometheus-sd --help usage: aws-cloudmap-prometheus-sd usage []

Tool to generate file_sd target files for AWS Cloud Map services.

Flags: -h, --help Show context-sensitive help (also try --help-long and --help-man). --output.file="cloudmapsd.json" Output file for filesd compatible file. --aws.region=AWS.REGION AWS Region to use. If none provided, region will be auto-discovered by AWS SDK using environment. --cloudmap.namespace=CLOUDMAP.NAMESPACE CloudMap namespace to discovery services. If none provided all namespaces will be discovered --target.refresh=60 The refresh interval (in seconds).

e.g. docker run -v /tmp/output:/output awslabs/aws-cloudmap-prometheus-sd \ --output.file=/output/cloudmapsd.json \ --target.refresh=30 \ --aws.region=us-east-2 --cloudmap.namespace=howto-k8s-cloudmap.pvt.aws.local \ 4. Verify sudo cat /tmp/output/cloudmapsd.json ```

Sample file_sd output

[ { "targets": [ "192.168.34.115" ], "labels": { "__meta_cloudmap_namespace_name": "howto-k8s-cloudmap.pvt.aws.local", "__meta_cloudmap_service_name": "front" } }, { "targets": [ "192.168.35.13", "192.168.78.132" ], "labels": { "__meta_cloudmap_namespace_name": "howto-k8s-cloudmap.pvt.aws.local", "__meta_cloudmap_service_name": "colorapp" } } ]

License

This project is licensed under the Apache-2.0 License.

Owner

  • Name: Amazon Web Services - Labs
  • Login: awslabs
  • Kind: organization
  • Location: Seattle, WA

AWS Labs

GitHub Events

Total
  • Watch event: 4
Last Year
  • Watch event: 4

Committers

Last synced: over 3 years ago

All Time
  • Total Commits: 15
  • Total Committers: 6
  • Avg Commits per committer: 2.5
  • Development Distribution Score (DDS): 0.4
Top Committers
Name Email Commits
dependabot[bot] 4****]@u****m 9
Akash Rungta m****l@a****m 2
Kiran Meduri m****i@g****m 1
Yu Bingjiao y****n@u****m 1
Ryota Yoshikawa r****a@c****m 1
Amazon GitHub Automation 5****o@u****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 0
  • Total pull requests: 65
  • Average time to close issues: N/A
  • Average time to close pull requests: 7 days
  • Total issue authors: 0
  • Total pull request authors: 5
  • Average comments per issue: 0
  • Average comments per pull request: 0.82
  • Merged pull requests: 14
  • Bot issues: 0
  • Bot pull requests: 61
Past Year
  • Issues: 0
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 1
Top Authors
Issue Authors
Pull Request Authors
  • dependabot[bot] (64)
  • yubingjiaocn (1)
  • kiranmeduri (1)
  • runakash (1)
  • rrreeeyyy (1)
Top Labels
Issue Labels
Pull Request Labels
dependencies (64)

Packages

  • Total packages: 1
  • Total downloads: unknown
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 1
proxy.golang.org: github.com/awslabs/aws-cloudmap-prometheus-sd
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Forks count: 3.8%
Stargazers count: 4.5%
Average: 6.2%
Dependent packages count: 7.0%
Dependent repos count: 9.3%
Last synced: 11 months ago

Dependencies

Dockerfile docker
  • amazonlinux 2 build
  • golang 1.18-stretch build
go.mod go
  • github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751
  • github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137
  • github.com/aws/aws-sdk-go v1.44.116
  • github.com/beorn7/perks v1.0.1
  • github.com/cespare/xxhash/v2 v2.1.2
  • github.com/davecgh/go-spew v1.1.1
  • github.com/go-kit/log v0.2.1
  • github.com/go-logfmt/logfmt v0.5.1
  • github.com/golang/protobuf v1.5.2
  • github.com/jmespath/go-jmespath v0.4.0
  • github.com/jpillora/backoff v1.0.0
  • github.com/matttproud/golang_protobuf_extensions v1.0.2
  • github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f
  • github.com/pkg/errors v0.9.1
  • github.com/pmezard/go-difflib v1.0.0
  • github.com/prometheus/client_golang v1.13.0
  • github.com/prometheus/client_model v0.2.0
  • github.com/prometheus/common v0.37.0
  • github.com/prometheus/procfs v0.8.0
  • github.com/prometheus/prometheus v0.39.1
  • github.com/stretchr/testify v1.8.0
  • golang.org/x/net v0.7.0
  • golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783
  • golang.org/x/sys v0.5.0
  • golang.org/x/text v0.7.0
  • google.golang.org/appengine v1.6.7
  • google.golang.org/protobuf v1.28.1
  • gopkg.in/alecthomas/kingpin.v2 v2.2.6
  • gopkg.in/yaml.v2 v2.4.0
  • gopkg.in/yaml.v3 v3.0.1
go.sum go
  • 485 dependencies