From b409a10b7bc2e5554f3163aedc5c08cc963b7757 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?juexiaolin=28=E6=9E=97=E8=A7=89=E9=9C=84=29?= Date: Fri, 9 Apr 2021 15:03:33 +0800 Subject: [PATCH] docs: opt cbs & config --- Makefile | 14 ++++++++++++++ configs/qcloud-cbs-product.yml | 11 +++++++++++ readme.md | 2 +- 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 Makefile create mode 100644 configs/qcloud-cbs-product.yml diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..67f05c8 --- /dev/null +++ b/Makefile @@ -0,0 +1,14 @@ +.PHONY: help build lint + +GOOS ?= $(shell go env GOOS) +GOARCH ?= $(shell go env GOARCH) +GOLANGCI_LINT_VERSION ?= "v1.35.2" + +build: + env GOOS=$(GOOS) GOARCH=$(GOARCH) go build -o "build/$(version)/qcloud_exporter" ./cmd/qcloud-exporter/ + +lint: + if [[ ! -e ./bin/golangci-lint ]]; then \ + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s $(GOLANGCI_LINT_VERSION); \ + fi; \ + ./bin/golangci-lint run ./... diff --git a/configs/qcloud-cbs-product.yml b/configs/qcloud-cbs-product.yml new file mode 100644 index 0000000..7fcbf9a --- /dev/null +++ b/configs/qcloud-cbs-product.yml @@ -0,0 +1,11 @@ +credential: + access_key: "access_key" + secret_key: "secret_key" + region: "region" + +rate_limit: 15 #云监控拉数据接口最大限制, 20/秒, 1200/分钟, https://cloud.tencent.com/document/product/248/31014 + +products: + - namespace: QCE/CBS #指标详情: https://cloud.tencent.com/document/product/248/45411 + all_metrics: true + all_instances: true diff --git a/readme.md b/readme.md index 8e55005..8da7869 100644 --- a/readme.md +++ b/readme.md @@ -20,7 +20,7 @@ CLB(7层)|QCE/LOADBALANCE|[指标详情](https://cloud.tencent.com/document/prod NAT|QCE/NAT_GATEWAY|[指标详情](https://cloud.tencent.com/document/product/248/45069) 物理专线|QCE/DC|[指标详情](https://cloud.tencent.com/document/product/248/45102) 专用通道|QCE/DCX|[指标详情](https://cloud.tencent.com/document/product/248/45101) -云硬盘|QCE/BLOCK_STORAGE|[指标详情](https://cloud.tencent.com/document/product/248/45411) +云硬盘|QCE/CBS|[指标详情](https://cloud.tencent.com/document/product/248/45411) `后续会有更多的产品支持`