Skip to content

when update the docker configs with k8s manifest missing metrics #258

@illthizam-healthhelper

Description

@illthizam-healthhelper

I have update mentioned docker configs with kubernetes i have received some metrics but i dont see some other metrics below,

  • jobs_waiting
  • jobs_stalled
  • jobs_failed
  • jobs_completed
  • jobs_delayed
  • job_duration
  • job_wait_duration
  • job_attempts

these are missing. below my k8s deloyment config

below my k8s deployment config

apiVersion: apps/v1
kind: Deployment
metadata:
name: bull-monitor
namespace: staging-monitoring
labels:
app: bull-monitor
spec:
replicas: 1
selector:
matchLabels:
app: bull-monitor
template:
metadata:
labels:
app: bull-monitor
spec:
containers:
- name: bull-monitor
image: ejhayes/nodejs-bull-monitor:latest
ports:
- containerPort: 3000
env:
- name: NODE_ENV
value: "production"
- name: REDIS_HOST
value: "service-staging-redis.hh-staging.svc.cluster.local"
- name: REDIS_PORT
value: "6379"
- name: PORT
value: "3000"
- name: BULL_WATCH_QUEUE_PREFIXES
value: "bull"
- name: UI
value: "arena"
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef:
name: < name of secret?
key: REDIS_PASSWORD
- name: COLLECT_NODEJS_METRICS
value: "true"

below i turned off probes because pods getting restarted always

  #   livenessProbe:
  #     httpGet:
  #       path: /
  #       port: 3000
  #     initialDelaySeconds: 30
  #     periodSeconds: 10
  #   readinessProbe:
  #     httpGet:
  #       path: /
  #       port: 3000
  #     initialDelaySeconds: 30
  #     periodSeconds: 10
  # restartPolicy: Always

apiVersion: v1
kind: Service
metadata:
name: bull-monitor
namespace: staging-monitoring
labels:
app: bull-monitor
annotations:
prometheus.io/scrape: 'true'
prometheus.io/port: '3000'
spec:
type: NodePort
ports:

  • port: 3000
    targetPort: 3000
    nodePort: 30000
    selector:
    app: bull-monitor

after this i add scrape_config ass below to prometheus server ,

  • job_name: 'bull-exporter'
    scrape_interval: 5s
    static_configs:
    - targets: ['bull-monitor.staging-monitoring.svc.cluster.local:3000', 'service-staging-redis.staging.svc.cluster.local:6379']

but when i see grafana after import dashbards i see only below,
image

image

metrics are
image

kindly advise me !! @ejhayes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions