This file contains 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
# Create an AWS account | |
# The account must use an email address not associated with any other AWS account | |
ACCOUNT_EMAIL='new-team@company.com' | |
ACCOUNT_NAME='new-team' | |
AWS_RESULT=$(aws organizations create-account --email ${ACCOUNT_EMAIL} --account-name "${ACCOUNT_NAME}") | |
# Get the request ID from the create-account operation | |
AWS_REQUEST_ID=`echo $AWS_RESULT | python -mjson.tool | grep '^\(.*\)Id\(.*\)$' | sed 's/^\(.*\)": "\(.*\)",$/\2/'` |
This file contains 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
# From http://webpy.org/docs/0.3/tutorial | |
import web | |
urls = ( | |
'/', 'index' | |
) | |
class index: | |
def GET(self): | |
return "Hello, world!" |
This file contains 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
[Unit] | |
Description=Redis In-Memory Data Store | |
After=network.target | |
[Service] | |
User=redis | |
Group=redis | |
ExecStart=/usr/local/bin/redis-server /etc/redis/redis.conf | |
ExecStop=/usr/local/bin/redis-cli shutdown | |
Restart=always |
This file contains 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
# Set up to collect HAProxy logs via UDP: | |
$ModLoad imudp | |
$UDPServerAddress 127.0.0.1 | |
$UDPServerRun 514 | |
# Define the log files where local0 and local1 will write: | |
$template haproxy-access,"/var/log/haproxy/haproxy-access.log" | |
$template haproxy-events,"/var/log/haproxy/haproxy-events.log" | |
local0.* -?haproxy-access |
This file contains 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
global | |
log 127.0.0.1:1514 local0 | |
log 127.0.0.1 local1 notice | |
user haproxy | |
group haproxy | |
defaults | |
mode http | |
log global | |
option httplog |
This file contains 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
# Adapted from http://webpy.org/docs/0.3/tutorial | |
import redis, random, web | |
urls = ( | |
'/', 'index' | |
) | |
from ddtrace import patch, Pin | |
# Patch the Redis library to automatically enable tracing: | |
patch(redis=True) |
This file contains 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
init_config: | |
instances: | |
- url: http://localhost:9000/haproxy_stats | |
username: Username | |
password: Password | |
collate_status_tags_per_host: True | |
logs: | |
- type: udp | |
port: 514 |
This file contains 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
global | |
log /dev/log local0 | |
user haproxy | |
group haproxy | |
defaults | |
mode http | |
log global | |
option httplog | |
option dontlognull |
This file contains 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
local0.* /var/log/haproxy0.log | |
& stop |
This file contains 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
init_config: | |
instances: | |
- url: http://localhost:9000/haproxy_stats | |
username: Username | |
password: Password | |
collate_status_tags_per_host: True | |
## Log section (Available for Agent >=6.0) |
OlderNewer