-
Notifications
You must be signed in to change notification settings - Fork 312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose promExporter to service or Prometheus could not scrape #877
Comments
It's already enabled via the headless service, example: |
Ah, maybe we should go ahead and add it to the Headless Service port list if its enabled then. If you're not doing any network policy it should still work though. |
I have 1 more question about promExporter. The thing is when I install a new chart from But if I use embedded promExporter, Grafana always shows no data |
Did you you realice how to use the embedded promExporter on Grafana, show no data to me as well., even using the chart for helm https://github.com/nats-io/prometheus-nats-exporter/blob/main/walkthrough/grafana-jetstream-dash-helm.json |
Hii,
|
I was able to get this working in GKE autopilot with managed Prometheus. with GKE autopilot you need to use pod anti-affinity to distribute the replicas across nodes. Here is my config: # Deploy NATS JetStream using Helm
resource "helm_release" "nats" {
name = "nats"
namespace = kubernetes_namespace.nats.metadata[0].name
repository = "https://nats-io.github.io/k8s/helm/charts/"
chart = "nats"
version = "1.2.10" # Using the latest version
wait = true
values = [
<<-EOT
config:
cluster:
enabled: true
replicas: ${var.nats_replicas}
jetstream:
enabled: true
fileStore:
pvc:
size: ${var.nats_pvc_size}
service:
enabled: true
type: ClusterIP
ports:
nats:
enabled: true
port: 4222
cluster:
enabled: true
port: 6222
monitoring:
enabled: true
port: 8222
promExporter:
enabled: true
port: 7777
podMonitor:
enabled: true
merge:
apiVersion: "monitoring.googleapis.com/v1"
kind: "PodMonitoring"
spec:
endpoints:
- port: "prom-metrics"
interval: "30s"
path: "/metrics"
scheme: "HTTP"
timeout: 10s
podTemplate:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
topologyKey: "kubernetes.io/hostname"
labelSelector:
matchLabels:
app.kubernetes.io/name: nats
EOT
]
} |
What motivated this proposal?
promExporter port 777 should expose to nats service so Prometheus can scrape
What is the proposed change?
should add
promExporter: enabled: true
hereWho benefits from this change?
Who doesn't want to install
prometheus-nats-exporter
fromhttps://prometheus-community.github.io/helm-charts
and can use embedded pod by set enable = true
What alternatives have you evaluated?
I must write a new service to expose prompExporter 777 and update Prometheuse scrape config
The text was updated successfully, but these errors were encountered: