This module contains a script called configure-syslog that allows you to configure rate limiting and log rotation
settings for syslog.
Note that this module currently only supports:
Operating systems:
Amazon Linux 2
Amazon Linux
Ubuntu
CentOS / Red Hat Linux
Syslog flavors: rsyslog
What is syslog and rsyslog?
syslog is the standard logging system on Linux. Many Linux distributions,
including Ubuntu, CentOS, and Amazon Linux, come with rsyslog installed, which is a
replacement for syslog that uses the same configuration and API, but has more advanced features (see this StackOverflow
thread for a discussion of the various syslog libraries).
With syslog, you can log things using the logger command (e.g. echo "hi" | logger) and find the log files under
/var/log/syslog (most Linux flavors) or /var/log/messages (Amazon Linux).
Example
See the syslog example for an example of how to use this module.
How do you use this module?
Installation
To use this module, you just need to run the configure-syslog script on your servers. The easiest way to install and
run the configure-syslog script on your servers is to create a Packer template
for your servers and to run the Gruntwork Installer in that
template:
By default, rsyslog has a rate limit that will start dropping log messages
if it sees more than 200 messages over a 5 second interval. This may be too small of a rate limit for many high traffic
web services, so this module allows you to configure a higher limit so you don't lose log messages whenever traffic
increases.
This module increases the rate limit to 5,000 messages over a 5-second interval. You can use the --rate-limit-interval
and --rate-limit-burst flags to configure an even higher limit, or disable rate limiting entirely by setting
--rate-limit-interval to 0. Note: disabling rate limiting carries a small amount of risk, as logging can take up a
lot of CPU and disk space.
For example, to set the rate limit to 2,500 messages over a 3-second interval, you could use the following command:
By default, all syslog messages go to /var/log/syslog (most Linux flavors) or /var/log/messages (Amazon Linux). If
this went on indefinitely, that log file would become enormous, making it hard to search and read. Moreover, you could
end up with so much log data that you run out of disk space.
Therefore, most Linux systems run a command called logrotate
as a daily and weekly CRON job. logrotate "rotates" your log files, archiving the current log file by renaming it
(e.g. /var/log/syslog gets renamed to /var/log/syslog-05-06-2016.log) and deleting old archived files.
This module configures reasonable defaults for log rotation:
Run logrotate hourly
Rotate log files once per day
Rotate log files if they are over 1GB in size
Keep at most 7 log files
It also allows you to provide a custom logrotate config file using the --logrotate-config-path variable to set up a
custom log rotation configuration.
Questions? Ask away.
We're here to talk about our services, answer any questions, give advice, or just to chat.
{"treedata":{"name":"root","toggled":true,"children":[{"name":".circleci","children":[{"name":"config.yml","path":".circleci/config.yml","sha":"f0cf57589ccc943f438d0ad9e1875e05f7e1abd8"}]},{"name":".gitignore","path":".gitignore","sha":"294b83cf423cbee767f863a2595ada330f8b7d0c"},{"name":".pre-commit-config.yaml","path":".pre-commit-config.yaml","sha":"40dde37cbe2716be382b51fccaabc08b113a5eba"},{"name":"CODEOWNERS","path":"CODEOWNERS","sha":"8756b38c5d955dfa04e10eda748ee62fc361d244"},{"name":"LICENSE.txt","path":"LICENSE.txt","sha":"f4e3d9bd4717a044ed31ad847a300eee74371a78"},{"name":"README.md","path":"README.md","sha":"bf52bd41a4a5d337fd3c9f61458628f7565d70d3"},{"name":"examples","children":[{"name":"alb-alarms","children":[{"name":"README.md","path":"examples/alb-alarms/README.md","sha":"5e39e3c8a77d82fe1f356c4afd7896fab0a44f5a"},{"name":"main.tf","path":"examples/alb-alarms/main.tf","sha":"8b2c057b4ff9ba4842b318b15bdb1f10ed42492c"},{"name":"outputs.tf","path":"examples/alb-alarms/outputs.tf","sha":"6fa5c1b548602ee8912c973ad05e3aec40cd32b0"},{"name":"vars.tf","path":"examples/alb-alarms/vars.tf","sha":"6f9edf33c508701e9bae1d7c8304295952e482b7"}]},{"name":"alb-target-group-alarms","children":[{"name":"README.md","path":"examples/alb-target-group-alarms/README.md","sha":"d7e0b7bd3103af1d90f931e17ab8a89df1437a95"},{"name":"main.tf","path":"examples/alb-target-group-alarms/main.tf","sha":"0c741b4325cbab50e0440f053950df0d2768a9d2"},{"name":"outputs.tf","path":"examples/alb-target-group-alarms/outputs.tf","sha":"c43657ddd3a1c40eb354c5192c4ecd3ebb26cf47"},{"name":"vars.tf","path":"examples/alb-target-group-alarms/vars.tf","sha":"7410e57ed960de8fbfdfa64a841d3752966d5326"}]},{"name":"asg-alarms","children":[{"name":"README.md","path":"examples/asg-alarms/README.md","sha":"752750d9634a831f8b9d4b5b2738daa1d6165b15"},{"name":"main.tf","path":"examples/asg-alarms/main.tf","sha":"a3dc3447e64bddb1cccc003296ff5717c1c24749"},{"name":"outputs.tf","path":"examples/asg-alarms/outputs.tf","sha":"8259844bf891d7dd7a2745df89804b356df84a59"},{"name":"vars.tf","path":"examples/asg-alarms/vars.tf","sha":"c57fd6487ae4fa0687e580536f6a9884d3acec82"}]},{"name":"cloudwatch-custom-metrics","children":[{"name":"README.md","path":"examples/cloudwatch-custom-metrics/README.md","sha":"e4d8dcd3882b7aa7296d7aa06dc4aeeb1d274b51"},{"name":"main.tf","path":"examples/cloudwatch-custom-metrics/main.tf","sha":"df9d9cd3bba61e826a45f11c094192a31c096606"},{"name":"outputs.tf","path":"examples/cloudwatch-custom-metrics/outputs.tf","sha":"61762f5f43c227e1683605eee8da34cc19e719b8"},{"name":"packer","children":[{"name":"build.json","path":"examples/cloudwatch-custom-metrics/packer/build.json","sha":"2a73a350c2cdecde52a2969ce51c3cc32aaa2440"}]},{"name":"vars.tf","path":"examples/cloudwatch-custom-metrics/vars.tf","sha":"4adea2ae7e6fed3ab055151dc049de9a7cbb4e18"}]},{"name":"cloudwatch-dashboard","children":[{"name":"README.md","path":"examples/cloudwatch-dashboard/README.md","sha":"724f1f42530a4245a4e4a732e6d0b8ddbb0b738f"},{"name":"main.tf","path":"examples/cloudwatch-dashboard/main.tf","sha":"2716cbf8e3f436cf3d384a959d44a3e332c35899"},{"name":"outputs.tf","path":"examples/cloudwatch-dashboard/outputs.tf","sha":"44bdb681166336894d50e51dc64cfead255cff4f"},{"name":"vars.tf","path":"examples/cloudwatch-dashboard/vars.tf","sha":"d2fb5fd788e607085e024180bd2a68bf0678d58d"}]},{"name":"cloudwatch-log-aggregation","children":[{"name":"README.md","path":"examples/cloudwatch-log-aggregation/README.md","sha":"ca4db9b5555b0329eda3820b76ee0bf710d1f8c6"},{"name":"main.tf","path":"examples/cloudwatch-log-aggregation/main.tf","sha":"0ccc0eccd40af17f944852da71c6c496ec88da67"},{"name":"outputs.tf","path":"examples/cloudwatch-log-aggregation/outputs.tf","sha":"db64d3c79fc4c66c49f0a86fb1bac85eacc9418f"},{"name":"packer","children":[{"name":"build.json","path":"examples/cloudwatch-log-aggregation/packer/build.json","sha":"ed7b22550942b166452c42681f4a1c7ed2bdcf53"}]},{"name":"user-data","children":[{"name":"user-data.sh","path":"examples/cloudwatch-log-aggregation/user-data/user-data.sh","sha":"511bdf3e654beea01009dcc3a41d4885aa887979"}]},{"name":"vars.tf","path":"examples/cloudwatch-log-aggregation/vars.tf","sha":"431d9c355a0bc967d12c83ba912a38485aa3bafc"}]},{"name":"cloudwatch-logs-metric-filters","children":[{"name":"README.md","path":"examples/cloudwatch-logs-metric-filters/README.md","sha":"dc5990c581c53ea6c11454e06a2f1c3267167c3c"},{"name":"main.tf","path":"examples/cloudwatch-logs-metric-filters/main.tf","sha":"f7468830fd1fbacaedbad464cec93f9ef3e56405"},{"name":"outputs.tf","path":"examples/cloudwatch-logs-metric-filters/outputs.tf","sha":"28d515dc5364afbc215ccdffbb03e3f3cd66a0ba"},{"name":"vars.tf","path":"examples/cloudwatch-logs-metric-filters/vars.tf","sha":"d2c45abbba41a4952ad87749ec207505d68c1f2c"}]},{"name":"cloudwatch-to-slack","children":[{"name":"README.md","path":"examples/cloudwatch-to-slack/README.md","sha":"2ec9ead93a7c8b5fbe92690cb5cd1d4d05fc04f6"},{"name":"main.tf","path":"examples/cloudwatch-to-slack/main.tf","sha":"32a07cda6afdd55ca3c3a2fc2261d9b4763bc544"},{"name":"vars.tf","path":"examples/cloudwatch-to-slack/vars.tf","sha":"1131023eb393490226e25749520fc68db20083c0"}]},{"name":"ec2-alarms","children":[{"name":"README.md","path":"examples/ec2-alarms/README.md","sha":"674f1dc82e51834e553fb575ad6e6b5d271c5941"},{"name":"main.tf","path":"examples/ec2-alarms/main.tf","sha":"e09d4888ef66805a19bd228af5a9f77a723c7371"},{"name":"outputs.tf","path":"examples/ec2-alarms/outputs.tf","sha":"db64d3c79fc4c66c49f0a86fb1bac85eacc9418f"},{"name":"vars.tf","path":"examples/ec2-alarms/vars.tf","sha":"5d5c5907ba090ffaefd2707e343c633f9cb0db90"}]},{"name":"ecs-alarms","children":[{"name":"README.md","path":"examples/ecs-alarms/README.md","sha":"e8abe3b1b1ab6e0d0f1cc75a39d04cc6700ff199"},{"name":"main.tf","path":"examples/ecs-alarms/main.tf","sha":"6af4e7183948bdef04d6c92cfe3c7f970e1fa231"},{"name":"outputs.tf","path":"examples/ecs-alarms/outputs.tf","sha":"8259844bf891d7dd7a2745df89804b356df84a59"},{"name":"user-data","children":[{"name":"user-data.sh","path":"examples/ecs-alarms/user-data/user-data.sh","sha":"af6a43c618ff5f89ae997b9906a18db2bc5611ab"}]},{"name":"vars.tf","path":"examples/ecs-alarms/vars.tf","sha":"87837d0f736c9eec2e0fd0024a1039c13eeb6df7"}]},{"name":"elasticache-alarms","children":[{"name":"README.md","path":"examples/elasticache-alarms/README.md","sha":"0c7f899ef7976e18805da18f6c62e680cef9c910"},{"name":"main.tf","path":"examples/elasticache-alarms/main.tf","sha":"bdf57de3d5e9f674b7e49e50c50e8fc1a72f6ed9"},{"name":"outputs.tf","path":"examples/elasticache-alarms/outputs.tf","sha":"b88ce427c5c8ce38a2a88f2b317e2bf94dcdda61"},{"name":"vars.tf","path":"examples/elasticache-alarms/vars.tf","sha":"9df80a0c88d18cda2f42b2cff93c16d001a44454"}]},{"name":"elasticsearch-alarms","children":[{"name":"README.md","path":"examples/elasticsearch-alarms/README.md","sha":"8e1c6e3e00ae3873750dcee959c5d81961a83d94"},{"name":"main.tf","path":"examples/elasticsearch-alarms/main.tf","sha":"9bacd2eb3c4519e8e42882cc05e66659f4cbfe64"},{"name":"outputs.tf","path":"examples/elasticsearch-alarms/outputs.tf","sha":"8259844bf891d7dd7a2745df89804b356df84a59"},{"name":"vars.tf","path":"examples/elasticsearch-alarms/vars.tf","sha":"7e021ff0df92bfb433e9b6ea0d13e2b66f965de5"}]},{"name":"elb-alarms","children":[{"name":"README.md","path":"examples/elb-alarms/README.md","sha":"efd1f59ca0bc2020c28755277ab462a5f9c665b8"},{"name":"main.tf","path":"examples/elb-alarms/main.tf","sha":"fc1f3e597de4f5263486656b812984661ef310de"},{"name":"outputs.tf","path":"examples/elb-alarms/outputs.tf","sha":"b98ff4cfcc70054d0f87a65883fa17e305c8189c"},{"name":"vars.tf","path":"examples/elb-alarms/vars.tf","sha":"bd33dc9c7bb27fac2eebd0b0042e7434137c798d"}]},{"name":"load-balancer-access-logs","children":[{"name":"alb","children":[{"name":"README.md","path":"examples/load-balancer-access-logs/alb/README.md","sha":"5668d030166e04b230be5dd200be6ddf936ddb4c"},{"name":"main.tf","path":"examples/load-balancer-access-logs/alb/main.tf","sha":"8688126876f2c58d56bf38917fa9b89554db295a"},{"name":"outputs.tf","path":"examples/load-balancer-access-logs/alb/outputs.tf","sha":"3d68d5999618b1ce3a7913397ac9aca618205322"},{"name":"vars.tf","path":"examples/load-balancer-access-logs/alb/vars.tf","sha":"15760ff76bcec102533ac1436614d75e57c2bac5"}]},{"name":"elb","children":[{"name":"README.md","path":"examples/load-balancer-access-logs/elb/README.md","sha":"e576cce3c910b6cb04678304585fb7bc5d96d0e5"},{"name":"main.tf","path":"examples/load-balancer-access-logs/elb/main.tf","sha":"49e236e60147178dfd37937dc07e352041092df2"},{"name":"outputs.tf","path":"examples/load-balancer-access-logs/elb/outputs.tf","sha":"aac64206ee3f7b0067f35112081d62566ce9522d"},{"name":"vars.tf","path":"examples/load-balancer-access-logs/elb/vars.tf","sha":"15760ff76bcec102533ac1436614d75e57c2bac5"}]},{"name":"nlb","children":[{"name":"README.md","path":"examples/load-balancer-access-logs/nlb/README.md","sha":"e075d96b9d8168b204a9cc96c906fdea9eb85381"},{"name":"main.tf","path":"examples/load-balancer-access-logs/nlb/main.tf","sha":"b634ae7c7c93d8b90c5aa7934bad0c0e875caf4a"},{"name":"outputs.tf","path":"examples/load-balancer-access-logs/nlb/outputs.tf","sha":"f2b50bd9ccf6afdca03c2f691ef44f6a75dc0722"},{"name":"vars.tf","path":"examples/load-balancer-access-logs/nlb/vars.tf","sha":"15760ff76bcec102533ac1436614d75e57c2bac5"}]}]},{"name":"rds-alarms","children":[{"name":"README.md","path":"examples/rds-alarms/README.md","sha":"0b6cccd63afba417e1fc02d190c7ff2f38932f7c"},{"name":"main.tf","path":"examples/rds-alarms/main.tf","sha":"3639b0b42a51024ac9d39d46b4daa6a2d7c04d05"},{"name":"outputs.tf","path":"examples/rds-alarms/outputs.tf","sha":"8259844bf891d7dd7a2745df89804b356df84a59"},{"name":"vars.tf","path":"examples/rds-alarms/vars.tf","sha":"4cae919361eadf1554ba818c6080316d2290d120"}]},{"name":"route53-health-check-alarms","children":[{"name":"README.md","path":"examples/route53-health-check-alarms/README.md","sha":"54175046fb87337b9e4ebc787fbb96d2bd18e2c1"},{"name":"main.tf","path":"examples/route53-health-check-alarms/main.tf","sha":"d34f1c3691fc21d7940d74b4571eee9cff4586e3"},{"name":"outputs.tf","path":"examples/route53-health-check-alarms/outputs.tf","sha":"8259844bf891d7dd7a2745df89804b356df84a59"},{"name":"vars.tf","path":"examples/route53-health-check-alarms/vars.tf","sha":"c8de0aca1b1773e29e5177d7acd0dc97fc1c29c7"}]},{"name":"scheduled-job-alarms","children":[{"name":"README.md","path":"examples/scheduled-job-alarms/README.md","sha":"95818d05404e2f8e68e399de3fff3d4d029d3602"},{"name":"main.tf","path":"examples/scheduled-job-alarms/main.tf","sha":"cc9d6a9122660609859754f89eb625ddfe76c02f"},{"name":"outputs.tf","path":"examples/scheduled-job-alarms/outputs.tf","sha":"8259844bf891d7dd7a2745df89804b356df84a59"},{"name":"vars.tf","path":"examples/scheduled-job-alarms/vars.tf","sha":"1d06c7678f23c5cf624b172f96d4d0bc6277e85f"}]},{"name":"sqs-alarms","children":[{"name":"README.md","path":"examples/sqs-alarms/README.md","sha":"49a9fee10f7fe5f4756923672345b2ef22a561d4"},{"name":"main.tf","path":"examples/sqs-alarms/main.tf","sha":"4211b0244f80805e866d393241c92bac91282b10"},{"name":"outputs.tf","path":"examples/sqs-alarms/outputs.tf","sha":"8259844bf891d7dd7a2745df89804b356df84a59"},{"name":"vars.tf","path":"examples/sqs-alarms/vars.tf","sha":"32a3fece3af25aed02386cfc74e073b1704389a1"}]},{"name":"syslog","children":[{"name":"README.md","path":"examples/syslog/README.md","sha":"5fa2747b5fade6ab04d6438bb8e5105a75101a8e"},{"name":"syslog-example.json","path":"examples/syslog/syslog-example.json","sha":"50d9ae993ca4dfed52447011a4345404ba3bc780"}]}]},{"name":"modules","children":[{"name":"alarms","children":[{"name":"README.md","path":"modules/alarms/README.md","sha":"03bb0d4b8fb06be9f14861392483848ff357944a"},{"name":"alb-alarms","children":[{"name":"README.md","path":"modules/alarms/alb-alarms/README.md","sha":"3366f88f77937832802b48686e766ddf849bfab5"},{"name":"main.tf","path":"modules/alarms/alb-alarms/main.tf","sha":"63d5b86bb32758ec11c5390853cd469df5f434dc"},{"name":"vars.tf","path":"modules/alarms/alb-alarms/vars.tf","sha":"1db323d250385d148b705782565b2ae27ba32f53"}]},{"name":"alb-target-group-alarms","children":[{"name":"README.md","path":"modules/alarms/alb-target-group-alarms/README.md","sha":"9f74b6be1ce9d7d9d00dafd80f26047f6d517963"},{"name":"main.tf","path":"modules/alarms/alb-target-group-alarms/main.tf","sha":"7b757f8c6af57339900002cb113606147fc3e6b8"},{"name":"vars.tf","path":"modules/alarms/alb-target-group-alarms/vars.tf","sha":"f324d60c8fe0b3d7a6a613c139e53bc2e49f62ed"}]},{"name":"asg-cpu-alarms","children":[{"name":"README.md","path":"modules/alarms/asg-cpu-alarms/README.md","sha":"5d8930a69b56e7e68de60460bc9ac086d78c3fdb"},{"name":"main.tf","path":"modules/alarms/asg-cpu-alarms/main.tf","sha":"2a1fa991721b215c083b8273706af9d59f0990ea"},{"name":"vars.tf","path":"modules/alarms/asg-cpu-alarms/vars.tf","sha":"1ba8d2ab312caecefd6b93899ec2c6440a0f006b"}]},{"name":"asg-disk-alarms","children":[{"name":"README.MD","path":"modules/alarms/asg-disk-alarms/README.MD","sha":"a70e4bb2774d2f34ab304c594bbf5af1274f42fd"},{"name":"main.tf","path":"modules/alarms/asg-disk-alarms/main.tf","sha":"e20dcf7e94061f484d6481798a48d140895cbbc2"},{"name":"vars.tf","path":"modules/alarms/asg-disk-alarms/vars.tf","sha":"0b2ae9f04294c63fcac836cef83c111dd003a7a4"}]},{"name":"asg-memory-alarms","children":[{"name":"README.md","path":"modules/alarms/asg-memory-alarms/README.md","sha":"5cee9559d7c409187099138db7480322b18aef1a"},{"name":"main.tf","path":"modules/alarms/asg-memory-alarms/main.tf","sha":"9a39498b00d5350dcc1898b6d6d671440fc52009"},{"name":"vars.tf","path":"modules/alarms/asg-memory-alarms/vars.tf","sha":"6165e081b395efe6ed8f100062cfdc5e79d7d083"}]},{"name":"ec2-cpu-alarms","children":[{"name":"README.md","path":"modules/alarms/ec2-cpu-alarms/README.md","sha":"f5a086f005bf67ac936a00cbabc892c91c06b4b8"},{"name":"main.tf","path":"modules/alarms/ec2-cpu-alarms/main.tf","sha":"e10229913939511db98113a8c770f4e9656bf194"},{"name":"vars.tf","path":"modules/alarms/ec2-cpu-alarms/vars.tf","sha":"0fd938b22c51bb12e6cac7b38930919d8f2c0923"}]},{"name":"ec2-disk-alarms","children":[{"name":"README.MD","path":"modules/alarms/ec2-disk-alarms/README.MD","sha":"d06565ca47c749fe7033994d1fcd5779be0930c8"},{"name":"main.tf","path":"modules/alarms/ec2-disk-alarms/main.tf","sha":"5b093579389ca39631968628da76b8ba0f45eb12"},{"name":"vars.tf","path":"modules/alarms/ec2-disk-alarms/vars.tf","sha":"2426920c76849cfe6b363c5c45a7462f1d1ec27a"}]},{"name":"ec2-memory-alarms","children":[{"name":"README.md","path":"modules/alarms/ec2-memory-alarms/README.md","sha":"7b33625f7536545b2b71d978df3ecaa3b17d358c"},{"name":"main.tf","path":"modules/alarms/ec2-memory-alarms/main.tf","sha":"c4be83b1e2d00d74f8ccfc07c6acaf678211e571"},{"name":"vars.tf","path":"modules/alarms/ec2-memory-alarms/vars.tf","sha":"f36faec3e385cf0ef84901dee72a5616613f8d20"}]},{"name":"ecs-cluster-alarms","children":[{"name":"README.md","path":"modules/alarms/ecs-cluster-alarms/README.md","sha":"4bbc7f714a6ac55589d649eda6883e3002bc3746"},{"name":"main.tf","path":"modules/alarms/ecs-cluster-alarms/main.tf","sha":"85baeaee38944e316830504377b4eccfc2bfacd0"},{"name":"vars.tf","path":"modules/alarms/ecs-cluster-alarms/vars.tf","sha":"e2e8a5a85352ea226453d10611a78b68d1b1dd51"}]},{"name":"ecs-service-alarms","children":[{"name":"README.md","path":"modules/alarms/ecs-service-alarms/README.md","sha":"d54663b23f2deb5ff48fe4493eab3b6b98685bfb"},{"name":"main.tf","path":"modules/alarms/ecs-service-alarms/main.tf","sha":"383e35bdfd1b374eb1c5d2dd7d6260d7bc094381"},{"name":"vars.tf","path":"modules/alarms/ecs-service-alarms/vars.tf","sha":"a9e1faeadd8d92c26eb031e9a5e94f927b32224e"}]},{"name":"ecs-service-with-alb-alarms","children":[{"name":"README.md","path":"modules/alarms/ecs-service-with-alb-alarms/README.md","sha":"9e18e374f9bf37ac5c0e09cabb4a7177fe461c69"}]},{"name":"elasticache-memcached-alarms","children":[{"name":"README.md","path":"modules/alarms/elasticache-memcached-alarms/README.md","sha":"bd5fd399c37e09a450dcb8bf878f3b57eb6ea09e"},{"name":"main.tf","path":"modules/alarms/elasticache-memcached-alarms/main.tf","sha":"23fac89b20c3132d42e20c1d8274f44e265e9138"},{"name":"vars.tf","path":"modules/alarms/elasticache-memcached-alarms/vars.tf","sha":"34417dec83856e6a5ad8518b2697c771017a90cd"}]},{"name":"elasticache-redis-alarms","children":[{"name":"README.md","path":"modules/alarms/elasticache-redis-alarms/README.md","sha":"becd381d6b4441e61cacbdd0a55c32b3caec2c02"},{"name":"main.tf","path":"modules/alarms/elasticache-redis-alarms/main.tf","sha":"33b0bbc9c8826a1b89bcadff68289d33c4e1fe9e"},{"name":"vars.tf","path":"modules/alarms/elasticache-redis-alarms/vars.tf","sha":"375910a0a56032dc9d5960a6cec86e08de7ebe76"}]},{"name":"elasticsearch-alarms","children":[{"name":"README.md","path":"modules/alarms/elasticsearch-alarms/README.md","sha":"0cdc80ff90c0bf44ae5d2feaed06f35fa71a49f4"},{"name":"main.tf","path":"modules/alarms/elasticsearch-alarms/main.tf","sha":"fa62cf124f878e0f89cb703a20065d054bbc2e3a"},{"name":"vars.tf","path":"modules/alarms/elasticsearch-alarms/vars.tf","sha":"77a61a8bc455c5eb0128351ee20ffb5beabd6d5b"}]},{"name":"elb-alarms","children":[{"name":"README.md","path":"modules/alarms/elb-alarms/README.md","sha":"71a5fed07bfae58b6ac4f8e61699ad774a040987"},{"name":"main.tf","path":"modules/alarms/elb-alarms/main.tf","sha":"4e3e281df188cf6192163c62299fd1f4040a4bfe"},{"name":"vars.tf","path":"modules/alarms/elb-alarms/vars.tf","sha":"3d40906f596c78373113f19e5598d2ea87ff377d"}]},{"name":"rds-alarms","children":[{"name":"README.md","path":"modules/alarms/rds-alarms/README.md","sha":"b9e3381e5ec91ab1bed5329b779ca1e3898fabce"},{"name":"main.tf","path":"modules/alarms/rds-alarms/main.tf","sha":"b5e1828c011494c469c79307b7a0500759dc268b"},{"name":"vars.tf","path":"modules/alarms/rds-alarms/vars.tf","sha":"850fa3d9810f58ef07f54db3559b837c7a102b0d"}]},{"name":"route53-health-check-alarms","children":[{"name":"README.md","path":"modules/alarms/route53-health-check-alarms/README.md","sha":"2268b9b10edb85e52252d50e76f6181d43c97128"},{"name":"main.tf","path":"modules/alarms/route53-health-check-alarms/main.tf","sha":"a68dd52f7804db1870f21d491cb184aab91b2e11"},{"name":"vars.tf","path":"modules/alarms/route53-health-check-alarms/vars.tf","sha":"0a7396ff070007e7b45f0bf3267ee24c2885e561"}]},{"name":"scheduled-job-alarm","children":[{"name":"README.md","path":"modules/alarms/scheduled-job-alarm/README.md","sha":"fc0c2d69beadde62d8123aef8db17073507fe4a3"},{"name":"main.tf","path":"modules/alarms/scheduled-job-alarm/main.tf","sha":"098c196ba93f90221d302b379ab754d4921848ba"},{"name":"vars.tf","path":"modules/alarms/scheduled-job-alarm/vars.tf","sha":"01e59a715397619e2420611cfb3c1ac15f739e8e"}]},{"name":"sns-to-slack","children":[{"name":"README.md","path":"modules/alarms/sns-to-slack/README.md","sha":"c9f3857fce41812bca03faa096d2e5c071c9ad55"},{"name":"lambda","children":[{"name":"alerts.py","path":"modules/alarms/sns-to-slack/lambda/alerts.py","sha":"09faffbfd4cb9068b8e0af0b56f1880dc1cee7a0"},{"name":"test-data","children":[{"name":"ec2-high-cpu-utilization-alert.json","path":"modules/alarms/sns-to-slack/lambda/test-data/ec2-high-cpu-utilization-alert.json","sha":"4efc79f1f6d77f0f715b86c0b86e9d95fd89d4a8"},{"name":"ec2-high-cpu-utilization-ok.json","path":"modules/alarms/sns-to-slack/lambda/test-data/ec2-high-cpu-utilization-ok.json","sha":"007ed86f4f4e2f23c5bac8b121de044ddb9b1753"}]},{"name":"test.py","path":"modules/alarms/sns-to-slack/lambda/test.py","sha":"e20f6a28fcfb81c578b52c18aa5430056e77f43c"}]},{"name":"main.tf","path":"modules/alarms/sns-to-slack/main.tf","sha":"ffe22a0af61f5f729f330b7564013f0988ee7a0f"},{"name":"vars.tf","path":"modules/alarms/sns-to-slack/vars.tf","sha":"caa317ef44d6005761e6ddaf37298d6409ce2ecf"}]},{"name":"sqs-alarms","children":[{"name":"README.md","path":"modules/alarms/sqs-alarms/README.md","sha":"076c1e0546accdd50fd0f7a07435b84cfb0c21da"},{"name":"main.tf","path":"modules/alarms/sqs-alarms/main.tf","sha":"09e0d946aff76fde073c99480252a5ee1788189a"},{"name":"vars.tf","path":"modules/alarms/sqs-alarms/vars.tf","sha":"71b83be572ecfefbd55f8beace00a84351776bab"}]}]},{"name":"logs","children":[{"name":"README.md","path":"modules/logs/README.md","sha":"e0a3ae8ff6ed08ca7c8977083262ec5a1af1dda3"},{"name":"_deprecated","children":[{"name":"elb-access-logs","children":[{"name":"README.md","path":"modules/logs/_deprecated/elb-access-logs/README.md","sha":"3cb659a6a9a53f33a1ce0c59aa99d1cbcdb4e8df"}]}]},{"name":"cloudwatch-log-aggregation-iam-policy","children":[{"name":"README.md","path":"modules/logs/cloudwatch-log-aggregation-iam-policy/README.md","sha":"77746359b78766e8b9198867db2bd8ce66f36263"},{"name":"main.tf","path":"modules/logs/cloudwatch-log-aggregation-iam-policy/main.tf","sha":"fe24773fb95b1f9bc80597f220eb73f6208ad4c0"},{"name":"outputs.tf","path":"modules/logs/cloudwatch-log-aggregation-iam-policy/outputs.tf","sha":"bd206e7139b681664671a31b09bf30533bc9ad48"},{"name":"vars.tf","path":"modules/logs/cloudwatch-log-aggregation-iam-policy/vars.tf","sha":"250152e6bfeb02a16bed4151ffc7156636db1bd9"}]},{"name":"cloudwatch-log-aggregation-scripts","children":[{"name":"README.md","path":"modules/logs/cloudwatch-log-aggregation-scripts/README.md","sha":"2b43aa3966c01eb9a70f46687f51ee2c9a4be05c"},{"name":"install-scripts","children":[{"name":"install-cloudwatch-logs-agent.sh","path":"modules/logs/cloudwatch-log-aggregation-scripts/install-scripts/install-cloudwatch-logs-agent.sh","sha":"10843f7eeb0b03b2508c4a3b962241eee7fe64d3"}]},{"name":"install.sh","path":"modules/logs/cloudwatch-log-aggregation-scripts/install.sh","sha":"46542ef190f9e2ed9b12a0c1c95f749b5b469d8d"},{"name":"user-data-scripts","children":[{"name":"run-cloudwatch-logs-agent.sh","path":"modules/logs/cloudwatch-log-aggregation-scripts/user-data-scripts/run-cloudwatch-logs-agent.sh","sha":"1310b8fd7d8334eaeb59c6a37329fe2942206eb9"}]}]},{"name":"cloudwatch-logs-metric-filters","children":[{"name":"README.md","path":"modules/logs/cloudwatch-logs-metric-filters/README.md","sha":"d8281b100291617ce01ed98eb313ba851a15b14d"},{"name":"main.tf","path":"modules/logs/cloudwatch-logs-metric-filters/main.tf","sha":"379178113d4ac94277dfc64d1aeaa85554779c1e"},{"name":"outputs.tf","path":"modules/logs/cloudwatch-logs-metric-filters/outputs.tf","sha":"dec3f496d05244a3728103e172be6a90476577c4"},{"name":"vars.tf","path":"modules/logs/cloudwatch-logs-metric-filters/vars.tf","sha":"6df1cd142a5a1bf4d2752f01d0b0d058a3dfe578"}]},{"name":"load-balancer-access-logs","children":[{"name":"README.md","path":"modules/logs/load-balancer-access-logs/README.md","sha":"340aaa820b34bf0897eb25d32ecd21a99c1ade22"},{"name":"_docs","children":[{"name":"Upgrade Guide.md","path":"modules/logs/load-balancer-access-logs/_docs/Upgrade Guide.md","sha":"c073730734b5e6359d6c9e547af6a4dc606f5575"}]},{"name":"main.tf","path":"modules/logs/load-balancer-access-logs/main.tf","sha":"35e8a7487e88fdba1af19744a0d8f1f44ae4a34e"},{"name":"outputs.tf","path":"modules/logs/load-balancer-access-logs/outputs.tf","sha":"29c12b94d4b5ba9b4f90fa87dee0f028dce8048b"},{"name":"vars.tf","path":"modules/logs/load-balancer-access-logs/vars.tf","sha":"cf19f2c86844297062a2874df0f25652f31ff38a"}]},{"name":"syslog","children":[{"name":"README.md","path":"modules/logs/syslog/README.md","sha":"391d5d2a0e66bf6b8732533bd31234d8cc833bc4","toggled":true},{"name":"install-scripts","children":[{"name":"configure-syslog","path":"modules/logs/syslog/install-scripts/configure-syslog","sha":"9bd9359ccb0b5f306f7c0df6f19ae07c34e94fc5"},{"name":"logrotate-config-amazon-linux","path":"modules/logs/syslog/install-scripts/logrotate-config-amazon-linux","sha":"1c3fedb3f165c7fcc89ce951f2ec28805c7373dc"},{"name":"logrotate-config-redhat","path":"modules/logs/syslog/install-scripts/logrotate-config-redhat","sha":"6aaf5e4f496d3742afccb9366ae5a0788d8716d3"},{"name":"logrotate-config-ubuntu","path":"modules/logs/syslog/install-scripts/logrotate-config-ubuntu","sha":"ea4603d761a8566a682bd194b8b0701198b34d59"}]},{"name":"install.sh","path":"modules/logs/syslog/install.sh","sha":"5995cf33d1b93a1d3397758f2de383386b9de94e"}],"toggled":true}],"toggled":true},{"name":"metrics","children":[{"name":"README.md","path":"modules/metrics/README.md","sha":"dfaa64a0fb49a1318d676e6a836d16dd572191b1"},{"name":"cloudwatch-custom-metrics-iam-policy","children":[{"name":"README.md","path":"modules/metrics/cloudwatch-custom-metrics-iam-policy/README.md","sha":"1e72f2ad72f7fddfc4cc8ff88f7c84c78f57fe95"},{"name":"main.tf","path":"modules/metrics/cloudwatch-custom-metrics-iam-policy/main.tf","sha":"0742b228c06b3c837492452a7fccdb0244987ac4"},{"name":"outputs.tf","path":"modules/metrics/cloudwatch-custom-metrics-iam-policy/outputs.tf","sha":"a4333e31573fa21ec9b638794ab0e83b8b5adcff"},{"name":"vars.tf","path":"modules/metrics/cloudwatch-custom-metrics-iam-policy/vars.tf","sha":"187d43c4156f9e630ce0ff4d5111ea1e9f934a9f"}]},{"name":"cloudwatch-dashboard-metric-widget","children":[{"name":"README.md","path":"modules/metrics/cloudwatch-dashboard-metric-widget/README.md","sha":"1e74fa76f69a158a8e001e3c1d1f92903cf2946d"},{"name":"main.tf","path":"modules/metrics/cloudwatch-dashboard-metric-widget/main.tf","sha":"1d14c0cd3135eb82211f86e6d524a32d66b12dc8"},{"name":"outputs.tf","path":"modules/metrics/cloudwatch-dashboard-metric-widget/outputs.tf","sha":"b051fe38ab1908024978d27db681c88a5cac53ed"},{"name":"vars.tf","path":"modules/metrics/cloudwatch-dashboard-metric-widget/vars.tf","sha":"89519c38ffad943ba4926a150f1983dae74a6747"}]},{"name":"cloudwatch-dashboard-text-widget","children":[{"name":"README.md","path":"modules/metrics/cloudwatch-dashboard-text-widget/README.md","sha":"cd180e72c4ac373898ff2c74d8e56744baa71367"},{"name":"main.tf","path":"modules/metrics/cloudwatch-dashboard-text-widget/main.tf","sha":"c3eef740d3b1166c901a403a3e27c92d116802bf"},{"name":"outputs.tf","path":"modules/metrics/cloudwatch-dashboard-text-widget/outputs.tf","sha":"b051fe38ab1908024978d27db681c88a5cac53ed"},{"name":"vars.tf","path":"modules/metrics/cloudwatch-dashboard-text-widget/vars.tf","sha":"610e30a2d694634e7f4f343120e3fc0924ab1973"}]},{"name":"cloudwatch-dashboard","children":[{"name":"README.md","path":"modules/metrics/cloudwatch-dashboard/README.md","sha":"e3cde88d2636c386213f4fd0a19c9cd0e3b7b259"},{"name":"main.tf","path":"modules/metrics/cloudwatch-dashboard/main.tf","sha":"111c145c5dc15eb5834ecea94dada2b98d645f10"},{"name":"outputs.tf","path":"modules/metrics/cloudwatch-dashboard/outputs.tf","sha":"d99f4b61c9c195a40e12fc541a047d1b5ee3162d"},{"name":"vars.tf","path":"modules/metrics/cloudwatch-dashboard/vars.tf","sha":"fca792d317ef3a17c940106d8945fb2836fd76e9"}]},{"name":"cloudwatch-memory-disk-metrics-scripts","children":[{"name":"README.md","path":"modules/metrics/cloudwatch-memory-disk-metrics-scripts/README.md","sha":"e41ee92e4ffaf55c59b16e3ea1502b6f19517a43"},{"name":"install-scripts","children":[{"name":"install-cloudwatch-monitoring-scripts.sh","path":"modules/metrics/cloudwatch-memory-disk-metrics-scripts/install-scripts/install-cloudwatch-monitoring-scripts.sh","sha":"605612a57c017d5296fbb2c5f1695c8349af65a8"}]},{"name":"install.sh","path":"modules/metrics/cloudwatch-memory-disk-metrics-scripts/install.sh","sha":"49874b43a1ef66f67aae500ca2b72d45bfd01de2"}]}]}],"toggled":true},{"name":"test","children":[{"name":"README.md","path":"test/README.md","sha":"47f47f2f840300d4f8cea8964dba297d9b41d93d"},{"name":"alb_alarms_test.go","path":"test/alb_alarms_test.go","sha":"debf66159d0755f8f555b68e65dfc6f1af216ee5"},{"name":"asg_alarms_test.go","path":"test/asg_alarms_test.go","sha":"4dc471b637ae6dd2564bdcaa30c022ea01c9ac29"},{"name":"cloudwatch_custom_metrics_test.go","path":"test/cloudwatch_custom_metrics_test.go","sha":"3fc7cb207002db807f0a088706b6694ca456ef66"},{"name":"cloudwatch_dashboard_test.go","path":"test/cloudwatch_dashboard_test.go","sha":"3fa504b8eb643fd477cae31711c5ff71519c24b3"},{"name":"cloudwatch_log_aggregation_test.go","path":"test/cloudwatch_log_aggregation_test.go","sha":"b25eea56d84dc1c0a37a1259998fb340ff9801c7"},{"name":"cloudwatch_logs_metric_filters_test.go","path":"test/cloudwatch_logs_metric_filters_test.go","sha":"6ee2b54e545b1575e906701457d320daed836103"},{"name":"cloudwatch_to_slack_test.go","path":"test/cloudwatch_to_slack_test.go","sha":"1b661da2bce156c9ebf5f8fe726f1fe4d97039b0"},{"name":"ec2_alarms_test.go","path":"test/ec2_alarms_test.go","sha":"a5c4dcb28ae006fbd2a2520853363222c68122b3"},{"name":"ecs_alarms_test.go","path":"test/ecs_alarms_test.go","sha":"e5be98f9daaecd57cfe9237aaf03df08174a6efd"},{"name":"elasticache_alarms_test.go","path":"test/elasticache_alarms_test.go","sha":"ac504c300316a22e72f05dabec6c83d7a644afc7"},{"name":"elasticsearch_alarms_test.go","path":"test/elasticsearch_alarms_test.go","sha":"0814662a6769b68dbe2bb2a03d8e5c3728058d76"},{"name":"elb_alarms_test.go","path":"test/elb_alarms_test.go","sha":"6804050e87e8356cdd84b928f501eb0ccfcf53c2"},{"name":"go.mod","path":"test/go.mod","sha":"366eb44cd935c94cfe0b625e59820b9d8d8fa543"},{"name":"go.sum","path":"test/go.sum","sha":"8001d7f415aa604a7bbd06a047b6dd60e62aad8b"},{"name":"lb_access_logs_test.go","path":"test/lb_access_logs_test.go","sha":"9f99e9085eea4d055dbfb36b92be1e407b0f1d33"},{"name":"rds_alarms_test.go","path":"test/rds_alarms_test.go","sha":"391dcde49eff236e4f32cf585f762f2a0bd6ba9d"},{"name":"route53_health_check_alarms_test.go","path":"test/route53_health_check_alarms_test.go","sha":"5a5c4cc82acf33a2be0e1a0b94efe967afc54c32"},{"name":"scheduled_job_alarms_test.go","path":"test/scheduled_job_alarms_test.go","sha":"81533f51d2db455b1ce34bdb19f4fa7c533f38a5"},{"name":"sqs_alarms_test.go","path":"test/sqs_alarms_test.go","sha":"8fe64fab727896d19cf716d7aa31716d3205d0fb"},{"name":"syslog_test.go","path":"test/syslog_test.go","sha":"f51403536d4789c1efe46612061dd350f580676c"},{"name":"test_helpers.go","path":"test/test_helpers.go","sha":"667801854a6bbff08df9b52341133e7f962952a9"}]}]},"detailsContent":"<h1 class=\"preview__body--title\" id=\"syslog-module\">Syslog Module</h1><div class=\"preview__body--border\"></div><p>This module contains a script called <code>configure-syslog</code> that allows you to configure rate limiting and log rotation\nsettings for syslog.</p>\n<p>Note that this module currently only supports:</p>\n<ul>\n<li>\n<p><strong>Operating systems:</strong></p>\n<ul>\n<li>Amazon Linux 2</li>\n<li>Amazon Linux</li>\n<li>Ubuntu</li>\n<li>CentOS / Red Hat Linux</li>\n</ul>\n</li>\n<li>\n<p><strong>Syslog flavors:</strong> rsyslog</p>\n</li>\n</ul>\n<h2 class=\"preview__body--subtitle\" id=\"what-is-syslog-and-rsyslog\">What is syslog and rsyslog?</h2>\n<p><a href=\"https://en.wikipedia.org/wiki/Syslog\" class=\"preview__body--description--blue\" target=\"_blank\">syslog</a> is the standard logging system on Linux. Many Linux distributions,\nincluding Ubuntu, CentOS, and Amazon Linux, come with <a href=\"http://www.rsyslog.com/\" class=\"preview__body--description--blue\" target=\"_blank\">rsyslog</a> installed, which is a\nreplacement for syslog that uses the same configuration and API, but has more advanced features (see <a href=\"http://serverfault.com/a/692329/326638\" class=\"preview__body--description--blue\" target=\"_blank\">this StackOverflow\nthread</a> for a discussion of the various syslog libraries).</p>\n<p>With syslog, you can log things using the <code>logger</code> command (e.g. <code>echo "hi" | logger</code>) and find the log files under\n<code>/var/log/syslog</code> (most Linux flavors) or <code>/var/log/messages</code> (Amazon Linux).</p>\n<h2 class=\"preview__body--subtitle\" id=\"example\">Example</h2>\n<p>See the <a href=\"/repos/v0.23.4/terraform-aws-monitoring/examples/syslog\" class=\"preview__body--description--blue\">syslog example</a> for an example of how to use this module.</p>\n<h2 class=\"preview__body--subtitle\" id=\"how-do-you-use-this-module\">How do you use this module?</h2>\n<h4 id=\"installation\">Installation</h4>\n<p>To use this module, you just need to run the <code>configure-syslog</code> script on your servers. The easiest way to install and\nrun the <code>configure-syslog</code> script on your servers is to create a <a href=\"https://www.packer.io/\" class=\"preview__body--description--blue\" target=\"_blank\">Packer</a> template\nfor your servers and to run the <a href=\"/repos/gruntwork-installer\" class=\"preview__body--description--blue\">Gruntwork Installer</a> in that\ntemplate:</p>\n<pre>gruntwork-install <span class=\"hljs-params\">--module-name</span> logs/syslog <span class=\"hljs-params\">--repo</span> https:<span class=\"hljs-string\">//github.com/gruntwork-io/module-aws-monitoring</span> <span class=\"hljs-params\">--tag</span> v0.0.9\n</pre>\n<h4 id=\"rate-limiting\">Rate limiting</h4>\n<p>By default, rsyslog has a <a href=\"http://www.rsyslog.com/tag/rate-limiting/\" class=\"preview__body--description--blue\" target=\"_blank\">rate limit</a> that will start dropping log messages\nif it sees more than 200 messages over a 5 second interval. This may be too small of a rate limit for many high traffic\nweb services, so this module allows you to configure a higher limit so you don't lose log messages whenever traffic\nincreases.</p>\n<p>This module increases the rate limit to 5,000 messages over a 5-second interval. You can use the <code>--rate-limit-interval</code>\nand <code>--rate-limit-burst</code> flags to configure an even higher limit, or disable rate limiting entirely by setting\n<code>--rate-limit-interval</code> to 0. Note: disabling rate limiting carries a small amount of risk, as logging can take up a\nlot of CPU and disk space.</p>\n<p>For example, to set the rate limit to 2,500 messages over a 3-second interval, you could use the following command:</p>\n<pre>gruntwork-install <span class=\"hljs-params\">--module-name</span> logs/syslog <span class=\"hljs-params\">--repo</span> https:<span class=\"hljs-string\">//github.com/gruntwork-io/module-aws-monitoring</span> <span class=\"hljs-params\">--tag</span> v0.0.9 <span class=\"hljs-params\">--rate-limit-interval</span> 3 <span class=\"hljs-params\">--rate-limit-burst</span> 2500\n</pre>\n<h4 id=\"log-rotation\">Log rotation</h4>\n<p>By default, all syslog messages go to <code>/var/log/syslog</code> (most Linux flavors) or <code>/var/log/messages</code> (Amazon Linux). If\nthis went on indefinitely, that log file would become enormous, making it hard to search and read. Moreover, you could\nend up with so much log data that you run out of disk space.</p>\n<p>Therefore, most Linux systems run a command called <a href=\"http://www.linuxcommand.org/man_pages/logrotate8.html\" class=\"preview__body--description--blue\" target=\"_blank\">logrotate</a>\nas a daily and weekly CRON job. <code>logrotate</code> "rotates" your log files, archiving the current log file by renaming it\n(e.g. <code>/var/log/syslog</code> gets renamed to <code>/var/log/syslog-05-06-2016.log</code>) and deleting old archived files.</p>\n<p>This module configures reasonable defaults for log rotation:</p>\n<ul>\n<li>Run logrotate hourly</li>\n<li>Rotate log files once per day</li>\n<li>Rotate log files if they are over 1GB in size</li>\n<li>Keep at most 7 log files</li>\n</ul>\n<p>It also allows you to provide a custom <code>logrotate</code> config file using the <code>--logrotate-config-path</code> variable to set up a\ncustom log rotation configuration.</p>\n","repoName":"terraform-aws-monitoring","repoRef":"v0.23.4","serviceDescriptor":{"serviceName":"CloudWatch","serviceRepoName":"terraform-aws-monitoring","serviceRepoOrg":"gruntwork-io","cloudProviders":["aws"],"description":"Send all metrics to CloudWatch, including those not visible to the EC2 hypervisor. Create dashboards and alerts as code.","imageUrl":"cloudwatch.png","licenseType":"subscriber","technologies":["Terraform","Bash"],"compliance":[],"tags":[""]},"serviceCategoryName":"Monitoring & alerting","fileName":"README.md","filePath":"/modules/logs/syslog","title":"Repo Browser: CloudWatch","description":"Browse the repos in the Gruntwork Infrastructure as Code Library."}