This file contains hidden or 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
# Datadog Docker agent | |
# - live processes enabled | |
# - using a proxy (see proxy docs > https://docs.datadoghq.com/agent/proxy/?tab=agentv6) | |
DOCKER_CONTENT_TRUST=1 docker run -d --name dd-agent --restart=always \ | |
-v /var/run/docker.sock:/var/run/docker.sock:ro \ | |
-v /proc/:/host/proc/:ro \ | |
-v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro \ | |
-v /etc/passwd:/etc/passwd:ro \ | |
-e DD_API_KEY={YOUR_API_KEY_HERE} \ |
This file contains hidden or 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
# Basic configuration | |
global | |
log 127.0.0.1 local0 | |
maxconn 4096 | |
stats socket /tmp/haproxy | |
# Some sane defaults | |
defaults | |
log global | |
option dontlognull |
This file contains hidden or 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
#!/bin/bash | |
yum update | |
yum install vim bind-utils -y | |
#install agent here | |
DD_API_KEY=<YOUR_API_KEY_HERE> bash -c "$(curl -L https://raw.githubusercontent.com/DataDog/datadog-agent/master/cmd/agent/install_script.sh)" | |
sudo -u dd-agent cp /etc/datadog-agent/system-probe.yaml.example /etc/datadog-agent/system-probe.yaml | |
cat <<EOF > /etc/datadog-agent/system-probe.yaml | |
################################## | |
## System Probe Configuration ## | |
################################## |
This file contains hidden or 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
#!/bin/sh | |
############################################################################### | |
# datadog-agent | |
# | |
# Inspired by Boxed Ice <[email protected]> | |
# Forked by Datadog, Inc. <[email protected]> | |
# | |
# Licensed under Simplified BSD License (see LICENSE) | |
# | |
############################################################################### |
This file contains hidden or 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
#!/bin/bash | |
# Set up CentOS to act as an Ansible controller | |
if [ "$EUID" -ne 0 ] | |
then echo "Please run as root" | |
exit | |
fi | |
# ensure CentOS all up-to-date | |
yum update -y | |
# epel is to be used for pip | |
yum install epel-release -y |
This file contains hidden or 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 checks import AgentCheck | |
import os | |
''' | |
This is for demostration purposes only and not recommended for production use. | |
Because of the nature of ping, it could result in a very long running check if there are excessive timeouts. | |
Long running checks could potentially result in other metrics and checks being skipped. | |
Example conf.yaml: |
This file contains hidden or 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
# CentOS 7 firewall open ports | |
# see active zone (profile) | |
firewall-cmd --get-active-zones | |
#open port 8080 | |
firewall-cmd --zone=public --add-port=8080/tcp --permanent | |
# block calls to external ip | |
firewall-cmd --direct --add-rule ipv4 filter OUTPUT 0 -d 54.236.250.10/32 -p tcp -m tcp --dport=443 -j DROP |
NewerOlder