syntax error using address core

Issue #890 resolved
Oivlis L. Hog created an issue

Using the following check:

check host core with address core
  if failed port 80 protocol HTTP
      request /api/config
      with timeout 3 seconds
      then alert

Using any other host address it works; except if the host address is core

Unfortunately, this is the only address (hostname) this container is reachable, as I can not rely on the network suffix name as it changes depending on the environment.

live_monit.1.lveac4stjp8n@rdbla279    | /monit/checks/core.conf:1: syntax error 'core'

Is core some kind of special/reserved word in this context? Can it be escaped in a way monit accepts it?

Comments (2)

  1. Tildeslash repo owner

    Yes, “core” is reserved, you can still use it, but you need to quote it:

    check host core with address "core"

  2. Log in to comment