Skip to content

Commit a98e54b

Browse files
committed
improved the docs
1 parent 235bc73 commit a98e54b

File tree

1 file changed

+30
-18
lines changed

1 file changed

+30
-18
lines changed

README.md

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# aws_cloudwatch_exporter
22

3-
![Master branch workflow](https://github.com/slashdevops/aws_cloudwatch_exporter/workflows/Master%20branch%20workflow/badge.svg?branch=master)
3+
![Master branch workflow](https://github.com/slashdevops/aws_cloudwatch_exporter/workflows/.github/workflows/master.yaml/badge.svg)
44
[![Go Report Card](https://goreportcard.com/badge/github.com/slashdevops/aws_cloudwatch_exporter)](https://goreportcard.com/report/github.com/slashdevops/aws_cloudwatch_exporter)
55
![Docker Pulls](https://img.shields.io/docker/pulls/slashdevops/aws_cloudwatch_exporter.svg?maxAge=604800)
66

@@ -11,34 +11,54 @@ This exporter used the AWS CloudWatch GetMetricsData API call, please it is impo
1111

1212
## Configuration
1313

14-
The configuration could be set using 3 ways:
15-
16-
1. Configuration Files (i.e.: ./server.yaml, ./metrics.yaml)
17-
2. Environment Variables (i.e.: SERVER_PORT, AWS_REGION, AWS_PROFILE, etc)
18-
3. Program Flags (i.e.: --serverPort, --region)
14+
### Server
15+
16+
To configure the server you have 3 ways:
17+
18+
1. Configuration Files (i.e.: ./server.yaml)
19+
2. Environment Variables (i.e.: SERVER_PORT, SERVER_ADDRESS, etc)
20+
3. Program Flags (i.e.: --serverPort, --serverAddress,etc)
21+
22+
### Metrics Queries
23+
24+
This exporter used the standard metrics queries format used by [AWS CloudWatch API GetMetricData](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricData.html)
25+
More information at [metrics.md](docs/metrics.md)
1926

20-
The precedence is in the same order of the list, so, if you define values into `server.yaml` and then
21-
the same configuration key is defined as a `Env Var` this last will replace the file value.
27+
### Docs
28+
29+
* [server.yaml](docs/server.md)
30+
* [metrics.yaml](docs/metrics.md)
2231

2332
### Running
2433

2534
#### Docker
2635

36+
Using your own `~/.aws` configuration in local
37+
2738
```bash
2839
docker run --rm \
2940
-i \
3041
-u nobody:nogroup \
3142
--privileged \
3243
-v ~/tmp/queries/m1.yaml:/home/nobody/m1.yaml:ro \
44+
-v ~/tmp/queries/m2.yaml:/home/nobody/m2.yaml:ro \
3345
-v /tmp/:/home/nobody/tmp/:rw \
3446
-v ~/.aws:/home/nobody/.aws:ro \
35-
-e "AWS_SDK_LOAD_CONFIG=1" \
47+
-e "AWS_SDK_LOAD_CONFIG=true" \
3648
-e "AWS_PROFILE=slashdevops" \
3749
slashdevops/aws-cloudwatch-exporter-linux-amd64:develop metrics get --metricsFiles /home/nobody/m1.yaml --outFile /home/nobody/tmp/out.yaml
3850
```
3951

52+
Check the result
53+
54+
```bash
55+
cat /tmp/out.yaml
56+
```
57+
4058
#### Binary
4159

60+
If you download the binary from releases
61+
4262
```bash
4363
AWS_SDK_LOAD_CONFIG="true" \
4464
AWS_PROFILE="slashdevops" \
@@ -47,17 +67,9 @@ AWS_PROFILE="slashdevops" \
4767
--debug
4868
```
4969

50-
### Configuration Files
51-
52-
* [server.yaml](docs/server.md)
53-
* [metrics.yaml](docs/metrics.md)
54-
55-
5670
## Development / Contributing
5771

58-
### Building and release tools
59-
60-
* https://github.com/prometheus/promu
72+
WIP
6173

6274
## License
6375

0 commit comments

Comments
 (0)