Comments (12)
What inputs did you use, and what were you expecting should happen? Is there some indication in the AWS docs that the expected usage is supported by the CloudWatch Agent or CloudWatch Logs?
Here is the documented API restriction on the log stream name...
from terraform-aws-watchmaker.
Ok, I think I found the relevant docs:
file_path – Specifies the path of the log file to upload to CloudWatch Logs. Standard Unix glob matching rules are accepted, with the addition of ** as a super asterisk. For example, specifying /var/log/**.log causes all .log files in the /var/log directory tree to be collected. For more examples, see Glob Library.
Give this branch a try: https://github.com/lorengordon/terraform-aws-watchmaker/tree/cwl-wildcard/modules
from terraform-aws-watchmaker.
Just tested it. This approach allows the logs to be uploaded to CWL, but changing the asterisk to the percent symbol prevents the log stream from being viewed in the console. The log stream name can be clicked on, but it never loads.
As a workaround, selecting "Search Log Group" from within the Log Group will bring up all streams, which allows for the viewing of the log.
from terraform-aws-watchmaker.
Ok that's easy, just need to use a character that is url-safe.
from terraform-aws-watchmaker.
There may be other characters in the path that are not url-safe, so I just switched to encoding the path with urllib.parse.quote(path)
. Give the branch another try please...
from terraform-aws-watchmaker.
Closer, but no cigar. The log stream is created, but still can't be viewed. The attached image shows the error encountered when trying to view the log.
from terraform-aws-watchmaker.
Alright, we can hack around it then, but fundamentally there is a bug in the console since these are valid characters in the log stream name that the console just can't handle properly. Can you open a support case?
from terraform-aws-watchmaker.
Will do
Edit: Case opened
from terraform-aws-watchmaker.
I tried replacing the '*' with '.' and that works fine, though it's a little ugly in the console
**.log
becomes ...log
moskey71@3cc7bdb#diff-89543a5acaa9dcdd3a588914c7d159c6R727
from terraform-aws-watchmaker.
Yeah, that kind of sucks. Maybe try a few characters that are less common in a directory/file path, and that are not generally special url characters, !~|
?
from terraform-aws-watchmaker.
Pipe is unsafe and Question Mark is reserved.
https://perishablepress.com/stop-using-unsafe-characters-in-urls/
I can update the code to use the Exclamation and open a PR, if you agree
from terraform-aws-watchmaker.
Any of the "safe" special characters that actually work in the console and are not so commonly used in a path would be fine. I'd also avoid +
since browsers often interpret that as a space... !'(),
from terraform-aws-watchmaker.
Related Issues (20)
- Dependabot couldn't find a <anything>.tf for this project
- Dependabot couldn't find a <anything>.tf for this project
- Add support for the watchmaker standalone executable HOT 1
- Dependabot can't parse your main.tf
- Dependabot can't parse your main.tf
- Dependabot can't parse your main.tf
- Dependabot can't parse your main.tf
- Dependabot can't parse your main.tf
- Dependabot can't parse your main.tf
- Dependabot can't parse your main.tf
- Dependabot can't parse your main.tf
- Set/export AWS_DEFAULT_REGION in userdata for all modules
- Use aws pseudo parameters to reduce cfn parameters HOT 1
- Use terraform data resources to lookup default values
- Make KeyPairName optional HOT 1
- Add TargetGroupArns and LoadBalancerNames as optional parameters for autoscaling templates
- Expose all terraform cfn resource options as variables
- Initial Update
- Seems Like watchmaker-lx-autoscale.template.cfn.json Implements a Bad Assumption HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-aws-watchmaker.