Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
configuration
Commits
97717455
Commit
97717455
authored
Oct 30, 2015
by
Feanil Patel
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2429 from edx/feanil/new_relic_labels
Add labels to clusters in Newrelic
parents
14cea6e7
fe35c68b
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
249 additions
and
8 deletions
+249
-8
playbooks/edx-east/analyticsapi.yml
+1
-0
playbooks/edx-east/ecommerce.yml
+1
-0
playbooks/edx-east/edxapp.yml
+1
-0
playbooks/edx-east/elasticsearch.yml
+1
-0
playbooks/edx-east/forum.yml
+1
-0
playbooks/edx-east/insights.yml
+1
-0
playbooks/edx-east/programs.yml
+1
-0
playbooks/edx-east/rabbitmq.yml
+1
-0
playbooks/edx-east/xqueue.yml
+1
-0
playbooks/roles/newrelic/defaults/main.yml
+0
-4
playbooks/roles/newrelic/tasks/main.yml
+7
-4
playbooks/roles/newrelic/templates/etc/newrelic/nrsysmond.cfg.j2
+233
-0
No files found.
playbooks/edx-east/analyticsapi.yml
View file @
97717455
...
...
@@ -6,6 +6,7 @@
ENABLE_DATADOG
:
False
ENABLE_SPLUNKFORWARDER
:
False
ENABLE_NEWRELIC
:
False
CLUSTER_NAME
:
'
analytics-api'
roles
:
-
role
:
nginx
nginx_sites
:
...
...
playbooks/edx-east/ecommerce.yml
View file @
97717455
...
...
@@ -6,6 +6,7 @@
ENABLE_DATADOG
:
False
ENABLE_SPLUNKFORWARDER
:
False
ENABLE_NEWRELIC
:
False
CLUSTER_NAME
:
'
ecommerce'
roles
:
-
role
:
nginx
nginx_sites
:
...
...
playbooks/edx-east/edxapp.yml
View file @
97717455
...
...
@@ -4,6 +4,7 @@
gather_facts
:
True
vars
:
serial_count
:
1
CLUSTER_NAME
:
'
edxapp'
serial
:
"
{{
serial_count
}}"
roles
:
-
aws
...
...
playbooks/edx-east/elasticsearch.yml
View file @
97717455
...
...
@@ -7,6 +7,7 @@
elb_pre_post
:
true
# Number of instances to operate on at a time
serial_count
:
1
CLUSTER_NAME
:
"
commoncluster"
serial
:
"
{{
serial_count
}}"
pre_tasks
:
-
action
:
ec2_facts
...
...
playbooks/edx-east/forum.yml
View file @
97717455
...
...
@@ -4,6 +4,7 @@
gather_facts
:
True
vars
:
serial_count
:
1
CLUSTER_NAME
:
'
forum'
serial
:
"
{{
serial_count
}}"
roles
:
-
aws
...
...
playbooks/edx-east/insights.yml
View file @
97717455
...
...
@@ -6,6 +6,7 @@
ENABLE_DATADOG
:
False
ENABLE_SPLUNKFORWARDER
:
False
ENABLE_NEWRELIC
:
True
CLUSTER_NAME
:
'
insights'
roles
:
-
role
:
nginx
nginx_sites
:
...
...
playbooks/edx-east/programs.yml
View file @
97717455
...
...
@@ -6,6 +6,7 @@
ENABLE_DATADOG
:
False
ENABLE_SPLUNKFORWARDER
:
False
ENABLE_NEWRELIC
:
False
CLUSTER_NAME
:
'
programs'
roles
:
-
role
:
nginx
nginx_sites
:
...
...
playbooks/edx-east/rabbitmq.yml
View file @
97717455
...
...
@@ -12,6 +12,7 @@
elb_pre_post
:
true
# Number of instances to operate on at a time
serial_count
:
1
CLUSTER_NAME
:
'
commoncluster'
serial
:
"
{{
serial_count
}}"
pre_tasks
:
-
action
:
ec2_facts
...
...
playbooks/edx-east/xqueue.yml
View file @
97717455
...
...
@@ -9,6 +9,7 @@
elb_pre_post
:
true
# Number of instances to operate on at a time
serial_count
:
1
CLUSTER_NAME
:
'
commoncluster'
serial
:
"
{{
serial_count
}}"
pre_tasks
:
-
action
:
ec2_facts
...
...
playbooks/roles/newrelic/defaults/main.yml
View file @
97717455
...
...
@@ -30,7 +30,3 @@ newrelic_debian_pkgs:
newrelic_redhat_pkgs
:
-
newrelic-sysmond
newrelic_debian_plugin_pkgs
:
-
ruby-bundler
-
rubygems
playbooks/roles/newrelic/tasks/main.yml
View file @
97717455
...
...
@@ -55,10 +55,13 @@
with_items
:
newrelic_redhat_pkgs
when
:
ansible_distribution == 'Amazon'
-
name
:
configure the agent with the license key
shell
:
>
nrsysmond-config --set license_key="{{ NEWRELIC_LICENSE_KEY }}"
ssl=true
-
name
:
configure the agent
template
:
src
:
"
etc/newrelic/nrsysmond.cfg.j2"
dest
:
"
/etc/newrelic/nrsysmond.cfg"
owner
:
"
newrelic"
group
:
"
newrelic"
mode
:
0640
-
name
:
ensure started and enabled
service
:
name=newrelic-sysmond state=restarted enabled=yes
playbooks/roles/newrelic/templates/etc/newrelic/nrsysmond.cfg.j2
0 → 100644
View file @
97717455
#
# New Relic Server Monitor configuration file.
#
# Lines that begin with a # are comment lines and are ignored by the server
# monitor. For those options that have command line equivalents, if the
# option is specified on the command line it will over-ride any value set
# in this file.
#
#
# Option : license_key
# Value : 40-character hexadecimal string provided by New Relic. This is
# required in order for the server monitor to start.
# Default: none
#
license_key={{ NEWRELIC_LICENSE_KEY }}
#
# Option : loglevel
# Value : Level of detail you want in the log file (as defined by the logfile
# setting below. Valid values are (in increasing levels of verbosity):
# error - show errors only
# warning - show errors and warnings
# info - show minimal additional information messages
# verbose - show more detailed information messages
# debug - show debug messages
# verbosedebug - show very detailed debug messages
# Default: info
# Note : Can also be set with the -d command line option.
#
loglevel=info
#
# Option : logfile
# Value : Name of the file where the server monitor will store it's log
# messages. The amount of detail stored in this file is controlled
# by the loglevel option (above).
# Default: none. However it is highly recommended you set a value for this.
# Note : Can also be set with the -l command line option.
#
logfile=/var/log/newrelic/nrsysmond.log
#
# Option : proxy
# Value : The name and optional login credentials of the proxy server to use
# for all communication with the New Relic collector. In its simplest
# form this setting is just a hostname[:port] setting. The default
# port if none is specified is 1080. If your proxy requires a user
# name, use the syntax user@host[:port]. If it also requires a
# password use the format user:password@host[:port]. For example:
# fred:secret@proxy.mydomain.com:8181
# Default: none (use a direct connection)
#
#proxy=
#
# Setting: ssl
# Type : boolean
# Purpose: If you prefer the daemon to use the secure HTTP (https) protocol
# when communicating with the New Relic collector servers, set this
# to true.
# Default: true (as of version 1.4)
#
ssl=true
#
# Setting: hostname
# Type : string
# Purpose: Sets the name of the host (max 64 characters) that you wish to use
# for reporting. This is usually determined automatically on startup
# but you may want to change it if, for example, you have machine
# generated hostnames that are not visually useful (for example, the
# names generated by Docker containers).
# Default: The system configured host name
#
#hostname=myhost
#
# Setting: docker_connection
# Type : string
# Purpose: Determine how to communicate with the Docker API on the local host.
# Valid values are:
#
# uds:///path/to/socket
# unix:///path/to/socket
# /path/to/socket
# These three forms are all equivalent and are used to point to the
# UNIX-domain socket (UDS). The socket path must be absolute and the
# socket must be writeable.
#
# tcp://localhost:port
# http://localhost:port
# Use an unencrypted connection to the local host on the specified
# port. If the :port portion is missing it defaults to 2376. The
# host name MUST be localhost or 127.0.0.1. No other host name is
# valid.
#
# https://localhost:port
# Use an encrypted connection to the local host om the specified
# port. If the :port portion is missing it defaults to 2376. The
# host name MUST be localhost or 127.0.0.1. No other host name is
# valid. In order to use TLS authentication you may need to set
# the various key and certificate options below.
#
# If no value is set, attempt to use the default (/var/run/docker.sock)
# if it exists and is writable. If that fails, attempt to use the value
# of the environment variable DOCKER_HOST.
#
# You may need to add the user that you run LSM as to the docker
# group. Please consult the Docker web site for details and security
# implications.
# Default: empty
#docker_connection=
#
# Setting: docker_cert_path
# Type : string
# Purpose: Set the default location to look for the certificate, key and CA
# certificate for using TLS. If no value is set and the directory
# $HOME/.docker exists, that is used as the default value. LSM will
# look in this directory for the cert.pem, key.pem and cacert.pem
# files, and use them if present. If set, the environment variable
# $DOCKER_CERT_PATH will be used as the default value if no value
# is explicitly set here.
# Default: empty
#docker_cert_path=
#
# Setting: docker_cert
# docker_key
# docker_cacert
# Type : string
# Purpose: Set the name of the certificate, key and CA certificate files to
# use for TLS. If these are not absolute paths they are searched for
# in the directory determined by docker_cert_path above.
# Default: empty
#docker_cert=
#docker_key=
#docker_cacert=
#
# Setting: ssl_ca_bundle
# Type : string
# Purpose: Sets the location of a file containing CA certificates in PEM
# format. When set, the certificates in this file will be used
# to authenticate the New Relic collector servers. If ssl_ca_path
# is also set (see below), the certificates in this file will be
# searched first, followed by the certificates contained in the
# ssl_ca_path directory. This setting has no effect when ssl
# is set to false.
# Default: none
# Note : Can also be set with the -b command line option.
#
#ssl_ca_bundle=
#
# Setting: ssl_ca_path
# Type : string
# Purpose: Sets the location of a directory containing trusted CA certificates
# in PEM format. When set, the certificates in this directory will be
# used to authenticate the New Relic collector servers. If
# ssl_ca_bundle is also set (see above), it will be searched first
# followed by the certificates contained in ssl_ca_path. This
# setting has no effect when ssl is set to false.
# Default: none
# Note : Can also be set with the -S command line option.
#
#ssl_ca_path=
#
# Option : pidfile
# Value : Name of a file where the server monitoring daemon will store it's
# process ID (PID). This is used by the startup and shutdown script
# to determine if the monitor is already running, and to start it up
# or shut it down.
# Default: /tmp/nrsysmond.pid
# Note : Can also be set with the -p command line option.
#
#pidfile=/var/run/newrelic/nrsysmond.pid
#
# Option : collector_host
# Value : The name of the New Relic collector to connect to. This should only
# ever be changed on advise from a New Relic support staff member.
# The format is host[:port]. Using a port number of 0 means the default
# port, which is 80 (if not using the ssl option - see below) or 443
# if SSL is enabled. If the port is omitted the default value is used.
# Default: collector.newrelic.com
#
#collector_host=collector.newrelic.com
#
# Option : labels
# Value : A series of label_type/label_value pairings
# Each item in the pair is separated by a colon
# Each pair is separated by a semicolon
# e.g.
# labels = Environment:Production;DataCenter:EastUS;
# Default: none
#
#
{% set labels = "Enviornment:" + COMMON_ENVIRONMENT + ";Deployment:" + COMMON_DEPLOYMENT + ";" %}
{% if CLUSTER_NAME is defined %}
{% set labels = labels + "Cluster:" + CLUSTER_NAME + ";" %}
{% endif %}
labels={{ labels }}
#
# Option : disable_nfs
# Type : boolean
# Value : Set to true to disable NFS client statistics gathering.
# Default: false
#
#disable_nfs=false
#
# Option : disable_docker
# Type : boolean
# Value : Set to true to disable Docker container statistics gathering.
# Default: false
#
#disable_docker=false
#
# Option : cgroup_root
# Type : string
# Value : Set to the top level mount point for CGroup data files. Usually
# the daemon will auto-detect this but you can provide a specific
# path if, for example, you have multiple CGroup mounts.
# Default: Distribution dependent, but usually /sys/fs/cgroup or /cgroup.
#cgroup_root=
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment