update audit examples to an endpoint that is audited

This commit is contained in:
Drew Bailey
2020-03-30 10:03:11 -04:00
parent ae1399e902
commit 207791951b
7 changed files with 13 additions and 13 deletions

View File

@@ -153,7 +153,7 @@ var basicConfig = &Config{
{
Name: "default",
Type: "HTTPEvent",
Endpoints: []string{"/ui/", "/v1/agent/health"},
Endpoints: []string{"/v1/metrics"},
Stages: []string{"*"},
Operations: []string{"*"},
},
@@ -623,7 +623,7 @@ var sample0 = &Config{
{
Name: "default",
Type: "HTTPEvent",
Endpoints: []string{"/ui/", "/v1/agent/health"},
Endpoints: []string{"/v1/metrics"},
Stages: []string{"*"},
Operations: []string{"*"},
},
@@ -711,7 +711,7 @@ var sample1 = &Config{
{
Name: "default",
Type: "HTTPEvent",
Endpoints: []string{"/ui/", "/v1/agent/health"},
Endpoints: []string{"/v1/metrics"},
Stages: []string{"*"},
Operations: []string{"*"},
},

View File

@@ -157,7 +157,7 @@ audit {
filter "default" {
type = "HTTPEvent"
endpoints = ["/ui/", "/v1/agent/health"]
endpoints = ["/v1/metrics"]
stages = ["*"]
operations = ["*"]
}

View File

@@ -26,7 +26,7 @@
{
"default": [
{
"endpoints": ["/ui/", "/v1/agent/health"],
"endpoints": ["/v1/metrics"],
"operations": ["*"],
"stages": ["*"],
"type": "HTTPEvent"

View File

@@ -24,7 +24,7 @@
{
"default": [
{
"endpoints": ["/ui/", "/v1/agent/health"],
"endpoints": ["/v1/metrics"],
"operations": ["*"],
"stages": ["*"],
"type": "HTTPEvent"

View File

@@ -33,7 +33,7 @@ audit {
filter "default" {
type = "HTTPEvent"
endpoints = ["/ui/", "/v1/agent/health"]
endpoints = ["/v1/metrics"]
stages = ["*"]
operations = ["*"]
}

View File

@@ -28,7 +28,7 @@ func TestAuditConfig_Merge(t *testing.T) {
{
Name: "one",
Type: "HTTPEvent",
Endpoints: []string{"/ui/", "/v1/agent/health"},
Endpoints: []string{"/v1/metrics"},
Stages: []string{"*"},
Operations: []string{"*"},
},
@@ -53,7 +53,7 @@ func TestAuditConfig_Merge(t *testing.T) {
{
Name: "one",
Type: "HTTPEvent",
Endpoints: []string{"/ui/", "/v1/agent/health"},
Endpoints: []string{"/v1/metrics"},
Stages: []string{"OperationReceived"},
Operations: []string{"GET"},
},
@@ -86,7 +86,7 @@ func TestAuditConfig_Merge(t *testing.T) {
{
Name: "one",
Type: "HTTPEvent",
Endpoints: []string{"/ui/", "/v1/agent/health"},
Endpoints: []string{"/v1/metrics"},
Stages: []string{"OperationReceived"},
Operations: []string{"GET"},
},

View File

@@ -121,15 +121,15 @@ logging as well as reducing the amount of events generated.
`endpoints`, `stages`, and `operations` support [globbed pattern](https://github.com/ryanuber/go-glob/blob/master/README.md#example) matching.
```hcl
# Filter all requests and all stages for /v1/agent/health
# Filter out all requests and all stages for /v1/metrics
filter "default" {
type = "HTTPEvent"
endpoints = ["/v1/agent/health"]
endpoints = ["/v1/metrics"]
stages = ["*"]
operations = ["*"]
}
# Filter OperationReceived GET requests for all endpoints
# Filter out OperationReceived GET requests for all endpoints
filter "OperationReceived GETs" {
type = "HTTPEvent"
endpoints = ["*"]