This repository has been archived by the owner on Mar 23, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 72
/
monitoring.yaml
114 lines (109 loc) · 3.86 KB
/
monitoring.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
---
classes:
- diamond
- graphite
- nginx
#- statsd # Some statsd? Add puppet-statsd to Puppetfile, and then uncomment this line and the section at the bottom.
## Diamond
diamond::graphite_host: 'monitor1'
diamond::collectors:
CPUCollector: {}
# options:
# path: cpu
DiskSpaceCollector: {}
DiskUsageCollector: {}
LoadAverageCollector: {}
MemoryCollector: {}
NetworkCollector: {}
SockstatCollector: {}
VMStatCollector: {}
## Graphite
#
# Note: If clients connecting to carbon-cache are experiencing errors such as connection refused by the daemon, a common
# reason is a shortage of file descriptors (ulimit -n). A value of 8192 or more may be necessary depending on how many
# clients are simultaneously connecting to the carbon-cache daemon.
graphite::carbon::aggregator_enable: true
graphite::carbon::cache_enable: true
graphite::carbon::storage_rules:
'stats':
pattern: '^stats.*'
retentions: '10s:6h,1min:7d,10min:5y'
order: '1'
'prod_apps':
pattern: '^prod\.apps\.'
retentions: '10s:2d'
order: '2'
'test_apps':
pattern: '^test\.apps\.'
retentions: '10s:2d'
order: '3'
graphite::carbon::limits_manage: true
graphite::carbon::limits_nofile: 65536
graphite::web::admin_email: '[email protected]'
graphite::web::django_secret_key: 'o4ointa4098w3haql;kjtg098yh#%&ISZFGH'
graphite::web::limits_manage: true
graphite::web::limits_nofile: 65536
## Nginx
nginx::manage_repo: false
nginx::nginx_upstreams:
'gunicorn_app_server':
ensure: 'present'
members:
- 'localhost:8081 fail_timeout=0'
nginx::nginx_vhosts:
'_':
use_default_location: false
www_root: '/undefined'
ipv6_enable: false
listen_port: 8080
access_log: '/var/log/nginx/graphite-web.access.log'
error_log: '/var/log/nginx/graphite-web.error.log'
vhost_cfg_append:
client_max_body_size: '64M'
keepalive_timeout: 5
nginx::nginx_locations:
'root':
vhost: '_'
location: '/'
www_root: '/usr/share/graphite/webapp/content'
location_cfg_append:
proxy_pass_header: 'Server'
proxy_redirect: 'off'
'proxy_set_header X-Real-IP': '$remote_addr'
'proxy_set_header Host': '$http_host'
'proxy_set_header X-Scheme': '$scheme'
proxy_connect_timeout: 30
proxy_read_timeout: 30
proxy_pass: 'http://gunicorn_app_server'
# Enable CORS (Cross Origin Resource Sharing) so that Graphite can be used with alternative
# dashboards such as Grafana.
#
# Note: It seems that in newer versions of puppet-nginx you must use `raw_append` instead of
# `location_custom_cfg_append` to achieve the same behavior.
# See https://github.com/jfryman/puppet-nginx/issues/308.
location_custom_cfg_append:
- '# Test if request is from allowed domain. You can use multiple if-statements'
- '# to allow multiple domains, simply setting $cors to true in each one.'
- 'if ($http_origin ~* (https?://localhost(:[0-9]+)?)) {'
- ' set $cors "true";'
- '}'
- 'if ($cors = "true") {'
- ' add_header "Access-Control-Allow-Origin" $http_origin; # This mirrors back whatever domain the request came from as authorized,'
- ' add_header "Access-Control-Allow-Credentials" "true"; # as long as it matches the http_origin if-statement'
- ' add_header "Access-Control-Allow-Methods" "GET, OPTIONS";'
- ' add_header "Access-Control-Allow-Headers" "Authorization, origin, accept";'
- '}'
'media':
vhost: '_'
location: '/media/'
www_root: '/usr/lib/python2.6/site-packages/django/contrib/admin'
## Statsd
##
## Uncomment the lines below if you want to play with statsd. Make sure you also enable the `classes` entry for statsd
## at the top of this file.
##
#statsd::graphite_server: 'localhost'
#statsd::flush_interval: 10000 # flush every 10 seconds to Graphite
#statsd::config_variables:
# 'graphite':
# 'legacyNamespace': false