monit-general
[Top][All Lists]
Advanced

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

Re: check script value and alert


From: SZÉPE Viktor
Subject: Re: check script value and alert
Date: Thu, 16 Jun 2016 19:18:48 +0200
User-agent: Horde Application Framework 5

Hello!

The Bash script should return an error:

#!/bin/bash
#
# This script does something
#

get-value-of-errorts

if [ -n "$ERRORTS" ]; then
    RET="1"
    echo "ERROR: ${ERRORTS}"
else
    RET="0"
fi

exit "$RET"


monit config:

check program errorts_test with path "/usr/local/bin/errorts.sh"
  if status != 0 then alert


All the best!


Idézem/Quoting Volkan Celebi <address@hidden>:

Dear all,

I have a bash script and I would like to exec it every 5 minutes to check
the value of ERRORTS variable. If everything goes well this variable
doesn't get any value if is tehre any error this script assign to this
variable a int integer.

How I can realize this scenieri in monitrc file?

Thanks in advance

--
Volkan Çelebi
IT System Spezialist
Heimstr. 10
8953 Dietikon
Tel: +41 788 488 319



SZÉPE Viktor
--
+36-20-4242498  address@hidden  skype: szepe.viktor
Budapest, III. kerület







reply via email to

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