-
Notifications
You must be signed in to change notification settings - Fork 15
Bump to v2.0.8: Bootstrap VMWatch Process if vmWatchSettings present #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
frank-pang-msft
merged 41 commits into
feature/v2/bootstrapVMWatch
from
dev/frankpang/bootstrapVMWatch
Nov 17, 2023
Merged
Changes from 17 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
fe0dfd5
Bootstrapping has no integration test regressions
frank-pang-msft 9078203
Add cleanup of VMWatch process during shutdown signals and upon other…
frank-pang-msft 5fd629f
Added integration tests for VMWatch
frank-pang-msft bbba094
Linting
frank-pang-msft ef79852
Fix file vet issues
frank-pang-msft e9a1176
attempt to fix handler command: install - creates the data dir
frank-pang-msft 386d170
nit integration tests
frank-pang-msft 39821e1
Use handlerenvironment to dictate vmwatch signal folder and verbose l…
frank-pang-msft bab9e56
Include missing changes in previous commit
frank-pang-msft 38448b5
Merge remote-tracking branch 'origin/master' into dev/frankpang/boots…
frank-pang-msft e96d5e9
Remove unnecessary changes
frank-pang-msft eafdb41
Try to fix docker installation error in go workflow
frank-pang-msft 057a679
Fix integration tests
frank-pang-msft 2c8547b
Update HandlerManifest with process names for guest agent to monitor …
frank-pang-msft f61b8d7
Run linting
frank-pang-msft ca73b0a
Remove cpu/memory limits in HandlerManifest + update VMWatch binary d…
frank-pang-msft 0f6ec4e
Merge branch 'master' into dev/frankpang/bootstrapVMWatch
frank-pang-msft ce89552
Update test.Dockerfile
frank-pang-msft c4d42b1
Rename workflow
frank-pang-msft 5488445
Merge branch 'dev/frankpang/bootstrapVMWatch' of https://github.com/A…
frank-pang-msft 19c3f0a
Add formatting & linting
frank-pang-msft 7105db3
Add logic to do retries on failed tests + don't fail fast
frank-pang-msft c0225cf
Minor nits
frank-pang-msft a6cfc63
Update integration tests + code changes to resolve comments regarding…
frank-pang-msft e6025db
Formatting + Linting + Vet
frank-pang-msft 198ba22
Add logic for recover and defer for executing VMWatch. Proper close a…
frank-pang-msft 726adaa
fix integration tests
frank-pang-msft e6bdc4e
Bump to v2.0.7
frank-pang-msft 7ce2f7f
revert unnecessary changes to schema.go
frank-pang-msft 688e744
Small fix to killVMWatch
frank-pang-msft 7934366
Fix logic for killing VMWatch
frank-pang-msft f4147d5
v2.0.8 Added Support for dynamic EventsFolder directory from extensio…
klugorosado 8fbc6ee
Merge remote-tracking branch 'origin/master' into dev/frankpang/boots…
frank-pang-msft 6ce2e42
nits after merging from master
frank-pang-msft d5e8c02
feature branch should trigger workflow
frank-pang-msft 982cbb7
Extra asterisk is not necessary
frank-pang-msft 7f7c945
Add back feature/**
frank-pang-msft 1e04c3f
Fix load directory
frank-pang-msft 6bee769
Add container name to mk_container
frank-pang-msft 6ca1b85
Fix naming
frank-pang-msft 22d82e5
Add back VE.RS.ION
frank-pang-msft File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
154 changes: 154 additions & 0 deletions
154
integration-test/env/Extension/bin/VMWatch/vmwatch.conf
This file contains hidden or 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,154 @@ | ||
| # Telegraf Configuration | ||
| # | ||
| # Telegraf is entirely plugin driven. All metrics are gathered from the | ||
| # declared inputs, and sent to the declared outputs. | ||
| # | ||
| # Plugins must be declared in here to be active. | ||
| # To deactivate a plugin, comment out the name and any variables. | ||
| # | ||
| # Use 'telegraf -config telegraf.conf -test' to see what metrics a config | ||
| # file would generate. | ||
| # | ||
| # Environment variables can be used anywhere in this config file, simply surround | ||
| # them with ${}. For strings the variable must be within quotes (ie, "${STR_VAR}"), | ||
| # for numbers and booleans they should be plain (ie, ${INT_VAR}, ${BOOL_VAR}) | ||
|
|
||
| # Configuration for telegraf agent | ||
| [agent] | ||
| ## Default data collection interval for all inputs | ||
| interval = "10s" | ||
| ## Rounds collection interval to 'interval' | ||
| ## ie, if interval="10s" then always collect on :00, :10, :20, etc. | ||
| round_interval = true | ||
|
|
||
| ## Telegraf will send metrics to outputs in batches of at most | ||
| ## metric_batch_size metrics. | ||
| ## This controls the size of writes that Telegraf sends to output plugins. | ||
| metric_batch_size = 1000 | ||
|
|
||
| ## Maximum number of unwritten metrics per output. Increasing this value | ||
| ## allows for longer periods of output downtime without dropping metrics at the | ||
| ## cost of higher maximum memory usage. | ||
| metric_buffer_limit = 10000 | ||
|
|
||
| ## Collection jitter is used to jitter the collection by a random amount. | ||
| ## Each plugin will sleep for a random time within jitter before collecting. | ||
| ## This can be used to avoid many plugins querying things like sysfs at the | ||
| ## same time, which can have a measurable effect on the system. | ||
| collection_jitter = "0s" | ||
|
|
||
| ## Collection offset is used to shift the collection by the given amount. | ||
| ## This can be be used to avoid many plugins querying constraint devices | ||
| ## at the same time by manually scheduling them in time. | ||
| # collection_offset = "0s" | ||
|
|
||
| ## Default flushing interval for all outputs. Maximum flush_interval will be | ||
| ## flush_interval + flush_jitter | ||
| flush_interval = "10s" | ||
| ## Jitter the flush interval by a random amount. This is primarily to avoid | ||
| ## large write spikes for users running a large number of telegraf instances. | ||
| ## ie, a jitter of 5s and interval 10s means flushes will happen every 10-15s | ||
| flush_jitter = "0s" | ||
|
|
||
| ## Collected metrics are rounded to the precision specified. Precision is | ||
| ## specified as an interval with an integer + unit (e.g. 0s, 10ms, 2us, 4s). | ||
| ## Valid time units are "ns", "us" (or "µs"), "ms", "s". | ||
| ## | ||
| ## By default or when set to "0s", precision will be set to the same | ||
| ## timestamp order as the collection interval, with the maximum being 1s: | ||
| ## ie, when interval = "10s", precision will be "1s" | ||
| ## when interval = "250ms", precision will be "1ms" | ||
| ## | ||
| ## Precision will NOT be used for service inputs. It is up to each individual | ||
| ## service input to set the timestamp at the appropriate precision. | ||
| precision = "0s" | ||
|
|
||
| ## Log at debug level. | ||
| # debug = false | ||
| ## Log only error level messages. | ||
| # quiet = false | ||
|
|
||
| ## Log target controls the destination for logs and can be one of "file", | ||
| ## "stderr" or, on Windows, "eventlog". When set to "file", the output file | ||
| ## is determined by the "logfile" setting. | ||
| # logtarget = "file" | ||
|
|
||
| ## Name of the file to be logged to when using the "file" logtarget. If set to | ||
| ## the empty string then logs are written to stderr. | ||
| # logfile = "" | ||
|
|
||
| ## The logfile will be rotated after the time interval specified. When set | ||
| ## to 0 no time based rotation is performed. Logs are rotated only when | ||
| ## written to, if there is no log activity rotation may be delayed. | ||
| # logfile_rotation_interval = "0h" | ||
|
|
||
| ## The logfile will be rotated when it becomes larger than the specified | ||
| ## size. When set to 0 no size based rotation is performed. | ||
| # logfile_rotation_max_size = "0MB" | ||
|
|
||
| ## Maximum number of rotated archives to keep, any older logs are deleted. | ||
| ## If set to -1, no archives are removed. | ||
| # logfile_rotation_max_archives = 5 | ||
|
|
||
| ## Pick a timezone to use when logging or type 'local' for local time. | ||
| ## Example: America/Chicago | ||
| # log_with_timezone = "" | ||
|
|
||
| ## Override default hostname, if empty use os.Hostname() | ||
| hostname = "" | ||
| ## If set to true, do no set the "host" tag in the telegraf agent. | ||
| omit_hostname = true | ||
|
|
||
| ## Method of translating SNMP objects. Can be "netsnmp" (deprecated) which | ||
| ## translates by calling external programs snmptranslate and snmptable, | ||
| ## or "gosmi" which translates using the built-in gosmi library. | ||
| # snmp_translator = "netsnmp" | ||
|
|
||
| ## Name of the file to load the state of plugins from and store the state to. | ||
| ## If uncommented and not empty, this file will be used to save the state of | ||
| ## stateful plugins on termination of Telegraf. If the file exists on start, | ||
| ## the state in the file will be restored for the plugins. | ||
| # statefile = "" | ||
|
|
||
| [[inputs.outbound_connectivity]] | ||
| urls = [] | ||
| timeout_in_seconds = 30 | ||
|
|
||
| [[inputs.disk_io]] | ||
| drives = [] | ||
|
|
||
| [[inputs.simple]] | ||
| ok = true | ||
| interval = "10s" | ||
|
|
||
| # Send telegraf metrics to file(s) | ||
| [[outputs.file]] | ||
| flush_interval = "30s" | ||
| ## Files to write to, "stdout" is a specially handled file. | ||
| #folder = "/Users/mizhe/tmporary" | ||
| #folder = "stdout" | ||
| folder = "/var/log/azure/Microsoft.ManagedServices.ApplicationHealthLinux/events" | ||
|
|
||
| ## Use batch serialization format instead of line based delimiting. The | ||
| ## batch format allows for the production of non line based output formats and | ||
| ## may more efficiently encode and write metrics. | ||
| use_batch_format = true | ||
|
|
||
| ## The file will be rotated after the time interval specified. When set | ||
| ## to 0 no time based rotation is performed. | ||
| rotation_interval = "10s" | ||
|
|
||
| ## The logfile will be rotated when it becomes larger than the specified | ||
| ## size. When set to 0 no size based rotation is performed. | ||
| # rotation_max_size = "0MB" | ||
|
|
||
| ## Data format to output. | ||
| ## Each data format has its own unique set of configuration options, read | ||
| ## more about them here: | ||
| ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md | ||
| data_format = "json" | ||
| json_timestamp_format = "2006-01-02T15:04:05Z07:00" | ||
| json_transformation = ''' | ||
| metrics.$merge([{"Timestamp": timestamp, "Message": $string(fields)}, tags]) | ||
| ''' | ||
|
|
Binary file not shown.
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| openssl genrsa -out testbin/webserverkey.pem 2048 | ||
| openssl req -new -x509 -sha256 -key testbin/webserverkey.pem -out testbin/webservercert.pem -days 3650 -subj '/CN=www.contoso.com/O=Contoso LTD./C=US' | ||
| sudo bats integration-test/test/ | ||
| sudo bats integration-test/test/6_vmwatch.bats |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.