hostname is pinned to localhost

Issue #77 resolved
Mis Tigi created an issue

For some reason I cannot get monit to recognize proper hostname of my machines. It always defaults to "localhost".

I tried setting check system myhost01

but that did not do much. monit summary shows System 'myhost01' Running

However variable $HOST in the mail template still resolves to 'localhost'. It also registers with mmonit as 'localhost'.

running command 'hostname' in the shell returns 'myhost01'. /etc/hostname value is also 'myhost01'.

/etc/hosts 127.0.0.1 localhost myhost01

It seems that changing this to: 127.0.0.1 myhost01 localhost

causes monit to properly recognize my hostname.

I am running monit v 5.3.2 on ubuntu 12.04 and monit v.5.6 on ubuntu 14.04

Comments (2)

  1. Log in to comment