Skip to content

Commit cb3f48f

Browse files
Nginx stats (#641)
* use normal amount of api servers * fix api * add nginx status * add conf file
1 parent 7f47620 commit cb3f48f

6 files changed

Lines changed: 26 additions & 2 deletions

File tree

ansible/api-core.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@
2727
tags: [ datadog ]
2828

2929
- role: container_start
30-
number_of_containers: "{{ ansible_processor_cores * 2 }}"
30+
number_of_containers: "{{ ansible_processor_cores }}"

ansible/delta-hosts/hosts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ socket-server
3232

3333
[api]
3434
delta-api
35+
delta-api-2
3536

3637
[consul]
3738
delta-consul-a

ansible/roles/datadog/templates/nginx.yaml.j2

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@ init_config:
33
instances:
44
# For every instance, you have an `nginx_status_url` and (optionally)
55
# a list of tags.
6-
- nginx_status_url: http://{{ ansible_default_ipv4.address }}/basic_status
6+
- nginx_status_url: http://localhost/nginx_status
7+
tags:
8+
- service:ingress
9+
- env:delta

ansible/roles/runnable-domain-proxy/tasks/main.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,13 @@
7373
src: mixpanel.tmpl
7474
dest: /etc/nginx/other-sites-enabled/mixpanel.conf
7575

76+
- name: put nginx status template in place
77+
tags: [ configure_proxy, configure_files ]
78+
become: yes
79+
template:
80+
src: nginx-status.conf
81+
dest: /etc/nginx/other-sites-enabled/nginx-status.conf
82+
7683
- name: put api template in place
7784
tags: [ configure_proxy, configure_files ]
7885
become: yes
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
server {
2+
listen 80;
3+
listen [::]:80;
4+
server_name localhost;
5+
6+
location /nginx_status {
7+
access_log off;
8+
stub_status on;
9+
}
10+
}

ssh/config

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@ Host 10.8.*.*
136136
Host delta-api
137137
ProxyCommand ssh -q ubuntu@delta-bastion nc 10.8.14.25 22
138138

139+
Host delta-api-2
140+
ProxyCommand ssh -q ubuntu@delta-bastion nc 10.8.12.242 22
141+
139142
Host delta-api-worker
140143
ProxyCommand ssh -q ubuntu@delta-bastion nc 10.8.14.24 22
141144

0 commit comments

Comments
 (0)