Skip to content

Commit

Permalink
Add example config files. (prometheus-community#837)
Browse files Browse the repository at this point in the history
  • Loading branch information
cristiangreco authored Mar 2, 2023
1 parent 6fa909b commit 7f96c1a
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,18 @@ jobs:

- name: golangci-lint
uses: golangci/[email protected]

verify-example-configs:
name: verify
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.x
uses: actions/setup-go@v3
with:
go-version: ^1.20

- uses: actions/checkout@v3

- name: Verify example configs
run: find ./examples -name "*.yml" -print0 | xargs -0 -I % go run ./cmd/yace verify-config -config.file %
33 changes: 33 additions & 0 deletions examples/ec2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
apiVersion: v1alpha1
discovery:
jobs:
- type: AWS/EC2
regions:
- us-east-1
period: 300
length: 300
metrics:
- name: CPUUtilization
statistics: [Average]
- name: NetworkIn
statistics: [Average, Sum]
- name: NetworkOut
statistics: [Average, Sum]
- name: NetworkPacketsIn
statistics: [Sum]
- name: NetworkPacketsOut
statistics: [Sum]
- name: DiskReadBytes
statistics: [Sum]
- name: DiskWriteBytes
statistics: [Sum]
- name: DiskReadOps
statistics: [Sum]
- name: DiskWriteOps
statistics: [Sum]
- name: StatusCheckFailed
statistics: [Sum]
- name: StatusCheckFailed_Instance
statistics: [Sum]
- name: StatusCheckFailed_System
statistics: [Sum]
17 changes: 17 additions & 0 deletions examples/lambda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: v1alpha1
discovery:
jobs:
- type: AWS/Lambda
regions:
- us-east-1
period: 300
length: 300
metrics:
- name: Invocations
statistics: [Sum]
- name: Errors
statistics: [Sum]
- name: Throttles
statistics: [Sum]
- name: Duration
statistics: [Average, Maximum, Minimum, p90]

0 comments on commit 7f96c1a

Please sign in to comment.