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 | |
# .ebextensions/datadog/hooks/99stop_datadog.sh | |
STATUS=`sudo initctl status datadog-agent` | |
if [[ "$STATUS" == *"datadog-agent stop/waiting"* ]] | |
then | |
echo "Agent already stopped" | |
else | |
echo "Agent stopping..." | |
sudo initctl stop datadog-agent | |
fi |
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 | |
# .ebextensions/datadog/hooks/99start_datadog.sh | |
STATUS=`sudo initctl status datadog-agent` | |
if [[ "$STATUS" == *"datadog-agent start/running"* ]] | |
then | |
echo "Agent already running" | |
else | |
echo "Agent starting..." | |
sudo initctl start datadog-agent | |
fi |
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] | |
name = Datadog, Inc. | |
baseurl = https://yum.datadoghq.com/stable/6/x86_64/ | |
enabled=1 | |
gpgcheck=1 | |
gpgkey=https://yum.datadoghq.com/DATADOG_RPM_KEY.public |
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
files: | |
/etc/dd-agent/datadog_process.conf: | |
content: | | |
process_agent_enabled: true; |
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
files: | |
"/tmp/replace_datadog_api_key.sh" : | |
mode: "000700" | |
owner: root | |
group: root | |
content: | | |
#!/bin/bash | |
sed 's/api_key:.*/api_key: 438fa781126206d25ad66398f2d6f319 ' /etc/datadog-agent/datadog.yaml.example > /etc/datadog-agent/datadog.yaml | |
sed -i 's/# expvar_port:.*/expvar_port: 5005/' /etc/datadog-agent/datadog.yaml | |
sed -i 's/# cmd_port:.*/cmd_port: 5006/' /etc/datadog-agent/datadog.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
/* | |
*intellij idea, file-> new -> scala worksheet | |
*/ | |
//Lisp-style approach for creating list. | |
//val myList = "Element1" :: "Element2" :: "Element3" :: "Element4":: Nil | |
:: "Element3" :: "Element4" | |
//Java-style approach | |
val myList = List("Element1", "Element2", "Element3", "Element4") | |
//all element to uppercase. |
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
#--------------------------------- | |
#requisites | |
#pip install cassandra-driver | |
#pip install json | |
#--------------------------------- | |
#data,json | |
#--------------------------------- | |
''' | |
{ |