Skip to content

Commit

Permalink
fix: use 9090 as prometheus port across services for consistency (#330)
Browse files Browse the repository at this point in the history
Signed-off-by: Lenin Mehedy <[email protected]>
  • Loading branch information
leninmehedy authored Sep 11, 2023
1 parent f052481 commit 5052945
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 12 deletions.
4 changes: 2 additions & 2 deletions charts/hedera-network/config-files/haproxy.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ global
maxconn 100000
ssl-default-bind-ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:RSA+AESGCM:RSA+AES:!aNULL:!MD5:!DSS
ssl-default-bind-options ssl-min-ver TLSv1.1
stats socket 0.0.0.0:14566
stats socket 0.0.0.0:9090
defaults
log global
maxconn 100000
Expand Down Expand Up @@ -48,7 +48,7 @@ backend be_servers_tls
server server1 network-{{ .nodeConfig.name }}-svc:50212 check inter 10s downinter 10s observe layer4 error-limit 5 on-error mark-down
listen stats
mode http
bind 0.0.0.0:14567
bind 0.0.0.0:9090
http-request use-service prometheus-exporter if { path /metrics }
stats enable
stats uri /stats
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ processors:

exporters:
prometheus:
endpoint: "0.0.0.0:8889" # note: network-node-svc exposes this port for all prometheus metrics instead of node's port 9999
endpoint: "0.0.0.0:9090" # note: network-node-svc exposes this port for all prometheus metrics instead of node's port 9999
const_labels:
source: p-{{ default "otel-collector" .otelDefaults.nameOverride }} # PromQL: {source="p-otel-collector"}

Expand Down
4 changes: 2 additions & 2 deletions charts/hedera-network/templates/services/haproxy-svc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ spec:
port: 50212
targetPort: 50212
- name: prometheus # port name must be prometheus for prometheus-svc-monitor
port: 14567 # stats port
targetPort: 14567
port: 9090
targetPort: 9090 # stats port
{{- end }}
{{- end }}

Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ spec:
# Rather than exposing the node's metrics port 9999 directly, we expose otel-collect's prometheus port here.
- name: prometheus # port name must be prometheus for prometheus-svc-monitor
protocol: TCP
port: 8889 # otel-collector's prometheus exporter port
targetPort: 8889
port: 9090
targetPort: 9090 # otel-collector's prometheus exporter port
{{- end }}
4 changes: 2 additions & 2 deletions charts/hedera-network/templates/sidecars/_otel-collector.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
- name: otlp # otel port defined in otel-collector config
containerPort: 4317
protocol: TCP
- name: prometheus # prometheus exporter port as specified in otel-collector-config.yaml
containerPort: 8889
- name: prometheus
containerPort: 9090
protocol: TCP
- name: health # for otel-collector liveness check
containerPort: 13133
Expand Down
2 changes: 1 addition & 1 deletion charts/hedera-network/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ defaults:
resources: {}
receivers:
prometheus:
scrapeTargets: [ 0.0.0.0:9999 ] # hedera node metrics are exposed at port 9090
scrapeTargets: [ 0.0.0.0:9999 ] # hedera node metrics are exposed at port 9999
scrapeInterval: 5s
exporters:
otlp:
Expand Down
3 changes: 1 addition & 2 deletions dev/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,7 @@ deploy-prometheus: deploy-prometheus-operator

.PHONY: destroy-prometheus
destroy-prometheus:
-source "${SCRIPTS_DIR}/${TELEMETRY_SCRIPT}" && unexpose_prometheus && destroy-prometheus
-${MAKE} destroy-prometheus-operator
source "${SCRIPTS_DIR}/${TELEMETRY_SCRIPT}" && unexpose_prometheus && destroy-prometheus

.PHONY: deploy-telemetry-stack
deploy-telemetry-stack: deploy-prometheus deploy-grafana-tempo
Expand Down

0 comments on commit 5052945

Please sign in to comment.