diff options
| author | Haw Loeung <[email protected]> | 2021-02-25 11:10:45 +1100 |
|---|---|---|
| committer | Haw Loeung <[email protected]> | 2021-02-25 11:10:45 +1100 |
| commit | d291b25481efea503755816a6df28a6bb4f9ec32 (patch) | |
| tree | 5dcbad79ec85e4f0f1e17c3e32c79cb0a1001e53 /tests/unit/test_content_cache.py | |
| parent | 9e1d668e53ff85b458917fc955774f2ab45fcd0e (diff) | |
Enable Nginx basic server status metrics - LP:1916078
This lets us enable the telegraf Nginx plugin and scape global server
metrics such as active connections, current server accepts, etc.
Also restrict access to metrics to localhost. Telegraf'
inputs.prometheus can access /metrics.
Diffstat (limited to 'tests/unit/test_content_cache.py')
| -rw-r--r-- | tests/unit/test_content_cache.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/unit/test_content_cache.py b/tests/unit/test_content_cache.py index d8300a9..ffc3308 100644 --- a/tests/unit/test_content_cache.py +++ b/tests/unit/test_content_cache.py @@ -1344,7 +1344,11 @@ site1.local: jinja_env = jinja2.Environment(loader=jinja2.FileSystemLoader(script_dir)) template = jinja_env.get_template('templates/nginx_metrics_cfg.tmpl') content = template.render( - {'nginx_conf_path': os.path.join(self.tmpdir, 'conf.d'), 'port': nginx.METRICS_PORT} + { + 'nginx_conf_path': os.path.join(self.tmpdir, 'conf.d'), + 'listen': nginx.METRICS_LISTEN, + 'port': nginx.METRICS_PORT, + } ) want = content test_file = os.path.join(self.tmpdir, 'sites-available/{0}.conf'.format(nginx.METRICS_SITE)) |
