wget https://github.com/huaweicloud/huaweicloud-prometheus-discovery/releases/download/1.0.0/huaweicloud-prometheus-discovery-1.0.0.linux-amd64.tar.gz
tar -zxvf huaweicloud-prometheus-discovery-1.0.0.linux-amd64.tar.gz
Building The Discovery with Exact steps on clean Ubuntu 16.04
$ wget https://dl.google.com/go/go1.12.5.linux-amd64.tar.gz
$ sudo tar -C /usr/local -xzf go1.12.5.linux-amd64.tar.gz
$ export PATH=$PATH:/usr/local/go/bin # You should put in your .profile or .bashrc
$ go version # to verify it runs and version #
$ go get https://github.com/huaweicloud/huaweicloud-prometheus-discovery
$ cd ~/go/src/github.com/huaweicloud/huaweicloud-prometheus-discovery
$ go build
Help
Usage of ./huaweicloud-prometheus-discovery:
-accessKey string
The access key of the HuaweiCloud to use (optional)
-debug
If debug the code.
-domain string
The Name of the Domain to scope to (Identity v3).
-interval int
interval at which to scrape the Huaweicloud API for ECS service discovery information, The unit is seconds (default 60)
-model
If the config.model is set to true, the model LabelName will added MetaLabelPrefix(__meta_huaweicloud_)
-password string
The Password to login with.
-port string
(default "9100")
-projectName string
The Name of the Tenant (Identity v2) or Project (Identity v3) to login with.
-region string
The region of the HuaweiCloud to use
-secretKey string
The secret key of the HuaweiCloud to use.
-times int
how many times to scrape before exiting (0 = infinite)
-userName string
The Username to login with.
-write-to string
path of file to write ECS service discovery information to (default "ecs_file_sd.yml")
huaweicloud-prometheus-discovery
Prometheus filed service discovery for Huaweicloud.
Install
Download the binary from the Releases page.
Usage
Building The Discovery with Exact steps on clean Ubuntu 16.04
Help
Example of file(ecs_file_sd.yml)
Example prometheus setting