monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Connection Testing with hostname variable


From: Tan-Vinh Nguyen
Subject: Connection Testing with hostname variable
Date: Wed, 21 Sep 2016 08:09:09 +0200

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]