Hi Guys,
is it possible to use a the output of Linux hostname in the controlfile for connection testing?
address@hidden:/opt/monit> hostname
alpha
Currently I do something like this
CHECK PROCESS kibana WITH MATCHING "/opt/kibana/bin/../node/bin/node\s"
if failed
host alpha
port 5601
type tcp
protocol http
then alert
alert address@hidden
group elkstack
The problem is I have kibana run on multiple hosts and binded to the hostname of its respective hosts. I would like to have the same configuration file on each host, instead of changing the hostname on each host. I triedÂ
CHECK PROCESS kibana WITH MATCHING "/opt/kibana/bin/../node/bin/node\s"
if failed
host $HOST
port 5601
type tcp
protocol http
then alert
alert address@hidden
group elkstack
That does not work. I think $HOST only works for SYSTEM. Any ideas how this can be achieved?
Thanks in advance
Vinh