-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Wildcard Refresh Interval (#276)
* confgenerator: add wildcard_refresh_interval Adds new field wildcard_refresh_interval to the logging files receiver in the ops-agent config. * confgenerator: added 3rd party receiver tests * confgenerator: removed unused casting case * confgenerator: change validator to multipleof_time Use a different strategy for the validator that is more scalable than the original `whole_time_denomination` implementation; take a time.Duration and see if it is a multiple of some other duration. * confgenerator: fixed copyright comment
- Loading branch information
Showing
38 changed files
with
6,813 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...tdata/invalid/linux/logging-receiver_files_refresh_interval_invalid_duration/golden_error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
cannot unmarshal uint64 into Go struct field UnifiedConfig.Logging of type time.Duration |
26 changes: 26 additions & 0 deletions
26
...estdata/invalid/linux/logging-receiver_files_refresh_interval_invalid_duration/input.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Copyright 2021 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
logging: | ||
receivers: | ||
log_source_id1: | ||
type: files | ||
include_paths: | ||
- /path/to/log/1/* | ||
wildcard_refresh_interval: 30 | ||
service: | ||
pipelines: | ||
pipeline1: | ||
receivers: | ||
- log_source_id1 |
9 changes: 9 additions & 0 deletions
9
...data/invalid/linux/logging-receiver_files_refresh_interval_not_whole_seconds/golden_error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[21:34] "wildcard_refresh_interval" must be a multiple of 1s | ||
18 | type: files | ||
19 | include_paths: | ||
20 | - /path/to/log/1/* | ||
> 21 | wildcard_refresh_interval: 3500ms | ||
^ | ||
22 | service: | ||
23 | pipelines: | ||
24 | pipeline1: |
26 changes: 26 additions & 0 deletions
26
...stdata/invalid/linux/logging-receiver_files_refresh_interval_not_whole_seconds/input.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Copyright 2020 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
logging: | ||
receivers: | ||
log_source_id1: | ||
type: files | ||
include_paths: | ||
- /path/to/log/1/* | ||
wildcard_refresh_interval: 3500ms | ||
service: | ||
pipelines: | ||
pipeline1: | ||
receivers: | ||
- log_source_id1 |
9 changes: 9 additions & 0 deletions
9
...rator/testdata/invalid/linux/logging-receiver_files_refresh_interval_too_low/golden_error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[21:34] "wildcard_refresh_interval" must be a minimum of 1s | ||
18 | type: files | ||
19 | include_paths: | ||
20 | - /path/to/log/1/* | ||
> 21 | wildcard_refresh_interval: 0s | ||
^ | ||
22 | service: | ||
23 | pipelines: | ||
24 | pipeline1: |
26 changes: 26 additions & 0 deletions
26
...nerator/testdata/invalid/linux/logging-receiver_files_refresh_interval_too_low/input.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Copyright 2020 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
logging: | ||
receivers: | ||
log_source_id1: | ||
type: files | ||
include_paths: | ||
- /path/to/log/1/* | ||
wildcard_refresh_interval: 0s | ||
service: | ||
pipelines: | ||
pipeline1: | ||
receivers: | ||
- log_source_id1 |
Oops, something went wrong.