-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathhaproxy-config.yml.k8s_sample
28 lines (28 loc) · 1.2 KB
/
haproxy-config.yml.k8s_sample
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
haproxy-config.yml: |
----
# Run auto discovery to find pods with label "app=haproxy"
# https://docs.newrelic.com/docs/integrations/host-integrations/installation/container-auto-discovery
discovery:
command:
# Use the following optional arguments:
# --namespaces: Comma separated list of namespaces to discover pods on
# --tls: Use secure (TLS) connection
# --port: Port used to connect to the kubelet. Default is 10255
exec: /var/db/newrelic-infra/nri-discovery-kubernetes
match:
label.app: haproxy
integrations:
- name: nri-haproxy
labels:
env: production
label: haproxy-cluster-member-1
env:
# The URL to the enabled stats page on the
# HAProxy instance using the discovered IP as the host address
STATS_URL: http://${discovery.ip}/stats
# Basic auth username
USERNAME: cacheuser
# Basic auth password
PASSWORD: password
# A user defined cluster name for the HAProxy instance
HA_PROXY_CLUSTER_NAME: < 'my_haproxy_1' or take it from the pod label that identifies your haproxy cluster '${discovery.name}' >