amalucelli / chef-cloudwatchlogs Goto Github PK
View Code? Open in Web Editor NEWChef Cookbook for AWS CloudWatch Logs
Home Page: https://malucelli.net/2017/05/21/aws-cloudwatch-logs-for-chef/
License: Apache License 2.0
Chef Cookbook for AWS CloudWatch Logs
Home Page: https://malucelli.net/2017/05/21/aws-cloudwatch-logs-for-chef/
License: Apache License 2.0
I don't see anything in here that describes the desired structure of template.conf.erb.
If we have a role attached to the instance, can we exclude
aws_access_key_id
aws_secret_access_key
I'm running aws-cloudwatchlogs v1.1.7 under chef-client 14.9.13 and everytime the aws_cwlogs
resource is executed, the service is reload immediatelly.
It's true that on the code seems to follow correctly the documentation, but it just keeps happening:
* aws_cwlogs[rss_app_error] action add
* service[awslogs] action nothing (skipped due to action :nothing)
* template[/var/awslogs/etc/config/rss_app_error.conf] action create
- update content in file /var/awslogs/etc/config/rss_app_error.conf from 259cf0 to 9ecfe1
--- /var/awslogs/etc/config/rss_app_error.conf 2019-05-10 12:16:21.996152948 +0000
+++ /var/awslogs/etc/config/.chef-rss_app_error20190511-12240-1tmdkxj.conf 2019-05-11 14:34:13.516735927 +0000
@@ -1,8 +1,9 @@
[rss_app_error]
-datetime_format = %Y-%m-%d %H:%M:%S %z
+time_zone = UTC
+datetime_format = [[%Y-%m-%d %H:%M:%S]]
file = /var/www/app/public/txt/app_error*.txt
-buffer_duration = 60000
+buffer_duration = 25000
log_stream_name = {hostname}
initial_position = start_of_file
log_group_name = rss_app_error
* service[awslogs] action restart
- restart service service[awslogs]
* aws_cwlogs[rss_subs_error] action add
* service[awslogs] action nothing (skipped due to action :nothing)
* template[/var/awslogs/etc/config/rss_subs_error.conf] action create
- update content in file /var/awslogs/etc/config/rss_subs_error.conf from 9b640b to 89f7b2
--- /var/awslogs/etc/config/rss_subs_error.conf 2019-05-10 12:16:27.156263718 +0000
+++ /var/awslogs/etc/config/.chef-rss_subs_error20190511-12240-kxbvso.conf 2019-05-11 14:34:16.656803633 +0000
@@ -1,8 +1,9 @@
[rss_subs_error]
-datetime_format = %Y-%m-%d %H:%M:%S %z
+time_zone = UTC
+datetime_format = [[%Y-%m-%d %H:%M:%S]]
file = /var/www/app/public/txt/subs_error*.txt
-buffer_duration = 60000
+buffer_duration = 25000
log_stream_name = {hostname}
initial_position = start_of_file
log_group_name = rss_subs_error
* service[awslogs] action restart
- restart service service[awslogs]
With Chef 12.5 I get this error:
Chef::Exceptions::ResourceNotFound: resource template[/var/awslogs/etc/config/archive_to_s3.conf] is configured to notify resource service[awslogs] with action restart, but service[awslogs] cannot be found in the resource collection.
Based on this issue I think this is likely a new error that start in this version of the Chef client. From notes by the backslasher (a community member I've found really knows their stuff), the solution is to define the service resource directly in the custom resource.
It's a simple fix and I've tested it in the situation I encountered. I'll submit a PR in a minute. Thanks!
Adam
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.