Syntax error when specifying a hostname like 'hour'/'minute'/'second'

Issue #87 closed
Former user created an issue

I have a setup where one of my hostnames is literally called 'SECOND':

BACKUP ~ # grep -i second /etc/hosts 192.168.1.200 SECOND BACKUP ~ #

Monit complains if I use it in any hostname specification, like:

set mailserver master, second

set httpd port 2812 and allow second

It wouldn't allow it to be called hour or minute, either. :) I guess this is an issue with the configuration parser, which probably treats some keywords as special even in places where the literal value should be taken.

The actual error message is:

/etc/monitrc:145: syntax error 'second'

Comments (3)

  1. Tildeslash repo owner

    a "second" is reserved word, you can use it, but you need to use quotes for string:

    set mailserver master, "second"
    
  2. Log in to comment