Shuvodeep Ghosh
Shuvodeep Ghosh

Reputation: 37

Error - io:job could not be initialized: missing field accessing 'heartbeat.monitors.0.hosts.0' (source:'/etc/heartbeat.yml')

Heartbeat configuration file is below

  # Directory + glob pattern to search for configuration files
  path: ${path.config}/monitors.d/*.yml
  # If enabled, heartbeat will periodically check the config.monitors path for changes
  reload.enabled: true
  # How often to check for changes
  reload.period: 10s

heartbeat.monitors:
- type: http
  id: my_app
  name: "Check my_app liveness endpoint"
  labels.application.name: my_app
  schedule: '@every 1m'
  service.name: 'my_app' # must be same as in apm 
  hosts: ["https://${host}/path/to/destination1", "https://${host}/path/to/destination2"]
  check.request.method: HEAD
  check.response.status: [200]
  fields_under_root: true
  fields:
    service.environment: "${my_env}"
    labels.application.name: my_app

####Enabling logging to heartbeat###

logging.level:  debug
logging.to_files: true
logging.files.path: /usr/share/heartbeat/logs
logging.files.name: heartbeat-log
logging.files.keepfiles: 30
logging.files.permissions: 0640

output.kafka:
  hosts: ["${KAFKA_URL}"]
  ssl.verification_mode: "none"  
  topic: "heartbeat"
  partition.round_robin:
    reachable_only: true
  client_id: ${MY_APPLICATION}-heartbeat-${MY_ENVIRONMENT}
  required_acks: 1

monitoring:
  enabled: false

this configuration is deployed as a Configmap inside the heartbeat pod.

But after the deployment, we are getting this error in Kibana Uptime Monitor :

Also tried hardcoded the variables which are there inside the yaml posted. The result is the same. Can anybody help me?

Upvotes: 0

Views: 215

Answers (0)

Related Questions