Skip to content

Commit 845d8aa

Browse files
authored
Single infra agent (#91)
1 parent 2610c09 commit 845d8aa

5 files changed

Lines changed: 22 additions & 33 deletions

File tree

examples/pilot/compose.yaml

Lines changed: 18 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ services:
3232
interval: 10s
3333
timeout: 5s
3434
retries: 10
35+
ports:
36+
- 127.0.0.1:5432:5432
3537
<<: *logging
3638

3739
redis:
@@ -42,6 +44,8 @@ services:
4244
interval: 10s
4345
timeout: 5s
4446
retries: 10
47+
ports:
48+
- 127.0.0.1:6379:6379
4549
<<: *logging
4650

4751
grafana:
@@ -153,6 +157,7 @@ services:
153157
ports:
154158
- 80:80
155159
- 443:443
160+
- 127.0.0.1:8080:8080
156161
environment:
157162
GRAFANA_DOMAIN: ${GRAFANA_DOMAIN}
158163
COLLECTOR_DOMAIN: ${COLLECTOR_DOMAIN}
@@ -167,7 +172,7 @@ services:
167172
- ${COLLECTOR_DOMAIN}
168173
<<: *logging
169174

170-
infra_host:
175+
infra:
171176
restart: unless-stopped
172177
container_name: newrelic-infra
173178
image: newrelic/infrastructure-bundle:latest
@@ -184,40 +189,24 @@ services:
184189
volumes:
185190
- "/:/host:ro"
186191
- "/var/run/docker.sock:/var/run/docker.sock:ro"
187-
- ./infra_host:/etc/newrelic-infra/integrations.d
192+
- ./infra:/etc/newrelic-infra/integrations.d
188193
- ./ssl:/gmonit/ssl
189194
environment:
195+
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
196+
190197
# NRIA_LOG_LEVEL: debug
198+
191199
NRIA_ENABLE_PROCESS_METRICS: 'true'
192200

193201
NRIA_LICENSE_KEY: "0123456789012345678901234567890123456789"
194-
NRIA_COLLECTOR_URL: https://${COLLECTOR_DOMAIN}/infra/infra-api
195-
NRIA_COMMAND_CHANNEL_URL: https://${COLLECTOR_DOMAIN}/infra/command-api
196-
NRIA_IDENTITY_URL: https://${COLLECTOR_DOMAIN}/infra/identity-api
202+
NRIA_COLLECTOR_URL: https://${COLLECTOR_DOMAIN}/infra2/infra-api
203+
NRIA_COMMAND_CHANNEL_URL: https://${COLLECTOR_DOMAIN}/infra2/command-api
204+
NRIA_IDENTITY_URL: https://${COLLECTOR_DOMAIN}/infra2/identity-api
197205
NRIA_CA_BUNDLE_FILE: ${CA_FILE}
198206

199-
# не работает на самоподписанных сертификатах
200-
# NRIA_SELF_INSTRUMENTATION: newrelic
201-
# NRIA_SELF_INSTRUMENTATION_APM_HOST: ${COLLECTOR_DOMAIN}
202-
<<: *logging
203-
204-
infra_services:
205-
restart: unless-stopped
206-
image: newrelic/infrastructure-bundle:latest
207-
volumes:
208-
- ./infra_services:/etc/newrelic-infra/integrations.d
209-
- ./ssl:/gmonit/ssl
210-
environment:
211-
# NRIA_LOG_LEVEL: debug
212-
NRIA_IS_FORWARD_ONLY: 'true'
213-
214-
NRIA_LICENSE_KEY: "0123456789012345678901234567890123456789"
215-
NRIA_COLLECTOR_URL: https://${COLLECTOR_DOMAIN}/infra/infra-api
216-
NRIA_COMMAND_CHANNEL_URL: https://${COLLECTOR_DOMAIN}/infra/command-api
217-
NRIA_IDENTITY_URL: https://${COLLECTOR_DOMAIN}/infra/identity-api
218-
NRIA_CA_BUNDLE_FILE: ${CA_FILE}
219-
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
220-
# не работает на самоподписанных сертификатах
221-
# NRIA_SELF_INSTRUMENTATION: newrelic
222-
# NRIA_SELF_INSTRUMENTATION_APM_HOST: ${COLLECTOR_DOMAIN}
207+
NEW_RELIC_APP_NAME: '[GMonit] Infrastructure Agent'
208+
NEW_RELIC_LABELS: "environment:gmonit"
209+
NRIA_SELF_INSTRUMENTATION: newrelic
210+
NRIA_SELF_INSTRUMENTATION_APM_HOST: ${COLLECTOR_DOMAIN}
211+
SSL_CERT_FILE: ${CA_FILE}
223212
<<: *logging
File renamed without changes.

examples/pilot/infra_host/nginx-config.yml renamed to examples/pilot/infra/nginx-config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ integrations:
33
env:
44
METRICS: "true"
55
# If you're using ngx_http_api_module be certain to use the full path up to and including the version number
6-
STATUS_URL: http://nginx:8080/status
6+
STATUS_URL: http://localhost:8080/status
77
# Name of Nginx status module OHI is to query against. discover | ngx_http_stub_status_module | ngx_http_status_module | ngx_http_api_module
88
STATUS_MODULE: discover
99

examples/pilot/infra_services/postgresql-config.yml renamed to examples/pilot/infra/postgresql-config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ integrations:
77
PASSWORD: {{POSTGRES_PASSWORD}}
88

99
# The hostname for the postgres instance. Defaults to localhost.
10-
HOSTNAME: postgres
10+
HOSTNAME: localhost
1111

1212
# The database to connect to on the postgres instance. Defaults to postgres.
1313
DATABASE: postgres

examples/pilot/infra_services/redis-config.yml renamed to examples/pilot/infra/redis-config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ integrations:
22
- name: nri-redis
33
env:
44
METRICS: true
5-
HOSTNAME: redis
5+
HOSTNAME: localhost
66
PORT: 6379
77
# KEYS: '{"0":["<KEY_1>"],"1":["<KEY_2>"]}'
88

@@ -48,7 +48,7 @@ integrations:
4848
- name: nri-redis
4949
env:
5050
INVENTORY: true
51-
HOSTNAME: redis
51+
HOSTNAME: localhost
5252
PORT: 6379
5353

5454
# New users should leave this property as `true`, to identify the

0 commit comments

Comments
 (0)