Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
LOG-1498: Add batch-mode. #108
Conversation
…tests, no prompts.
|
Is there any reason you want to run the script for automatic deployments, versus just deploying the configuration file that is generated? All you should have to do is deploy the 22-loggly.com and restart rsyslog. A lot of the tests in the script check are to help spot issues in new environments. |
|
Yes, I'm working with ElasticBeanstalk and deploying custom files there is a hassle. It is much simpler to have a script to download and execute a configuration script with secrets that are passed in environment variables. This is particularly useful if the deployment platform changes, then I can expect the installation script to pick up on that change and adapt. Of course, it would be super to have a custom solution for EB, but Loggly's portfolio of installers does not include those. Here is a link that I found that I tried initially: The problem with this one is that it This approach seems to work well. The reason for the pull request is to illustrate this use case, and of course, it is useful to benefit from further future script updates. This is the contents of the loggly.config yaml file that I have in .ebextensions folder right now to configure the instances:
|
|
Yes we talked about having a custom solution for elastic beanstalk but we haven't had a chance to make one yet. I like how this example shows how to create an rsyslog configuration file https://gist.github.com/zoellner/9849597. It's an nginx example, so it would need to be modified to create 22-loggly.conf instead. The contents you would need to insert in the file are here https://www.loggly.com/docs/rsyslog-manual-configuration/. The MaxMessageSize parameter is optional and only needed if you have long stack traces. You also don't have to restart rsyslog because I think that it would create the files before starting the instance. Really the only thing you have to do is insert the contents of 22-loggly.conf. |
|
One problem with a 22-loggly.conf file like this is that it is static.
It is really useful to have your logging configured based on environment variables provided to your host environment, thus e.g. able to fudge hostname, set application/environment tag, etc. Additionally, there are extra steps required if --secure logging is desired. Here are some of the actions taken on the hosts, according to EB logs.
Perhaps one cannot reasonably expect a single setup script to do all things, but this is at least a start... |
|
Why does it need to be static? Can't you pass environment variables in your eb config, which then populate hostname, tags, token, etc.? Yes for secure logging you'll have to curl the certificate file and use this content https://www.loggly.com/docs/rsyslog-tls-configuration/. My main worry with the script is its getting quite complex to support so many different use cases. The number of parameters is increasing and will need to be maintained over time. It might be better to have a configuration example specifically for elastic beanstalk. If you got one working and shared a gist we'd be happy to send some swag your way as a thanks. |
|
I understand. I'll see if I can't contribute some different EB way. Stay tuned :) |
|
Check this out. Currently using this on our EB instances with good success. |
|
Wow thats really cool thanks for sharing! I added a link to your example on our Loggly Libraries Catalog page https://www.loggly.com/docs/loggly-libraries-catalog/. We'd like to send you some swag as a thanks should I send the invite to the email listed on your github profile? |
Add batch mode, useful for automatic deployment on machines that are known to be compatible.
if --batch flag is provided, then no user account testing is performed. Also, no log delivery tests are
performed.