[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
The "if exist" check does not contain some data
From: |
Lutz Mader |
Subject: |
The "if exist" check does not contain some data |
Date: |
Sat, 27 Oct 2018 22:55:47 +0200 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 |
Hallo,
I missed some data in the environment variables in the "if exist" check
(I use monit 5.25.2).
check process sleep matching "sleep"
if exist then exec "/usr/local/etc/monit/scripts/env.sh"
else if succeeded then exec "/usr/local/etc/monit/scripts/env.sh"
I got the following variables, the "monit status" show the right data
and the description contain the pid value too.
Process 'sleep'
status Does exist
monitoring status Monitored
monitoring mode active
on reboot start
pid 44445
parent pid 1
uid 504
effective uid 504
gid 20
uptime 0m
threads 1
children 0
cpu 0.0%
cpu total 0.0%
memory 0.0% [520 kB]
memory total 0.0% [520 kB]
data collected Sat, 27 Oct 2018 21:22:59
And I got the following variables for "Does exist".
But some of the values does not contain some usefull data.
MONIT_HOST=MacBookPro.local
MONIT_PROCESS_PID=-1
MONIT_EVENT=Does exist
MONIT_PROCESS_MEMORY=0
MONIT_PROCESS_CPU_PERCENT=-1.0
MONIT_SERVICE=sleep
MONIT_PROCESS_CHILDREN=-1
MONIT_DESCRIPTION=process is running with pid 44445
MONIT_DATE=Sat, 27 Oct 2018 21:22:59
The "Exists not" seems to fit, but contain to much values compared to
"Does not exist" (I think).
MONIT_HOST=MacBookPro.local
MONIT_PROCESS_PID=-1
MONIT_EVENT=Exists not
MONIT_PROCESS_MEMORY=0
MONIT_PROCESS_CPU_PERCENT=-1.0
MONIT_SERVICE=sleep
MONIT_PROCESS_CHILDREN=-1
MONIT_DESCRIPTION=process is not running
MONIT_DATE=Sat, 27 Oct 2018 21:24:59
Any idea,
Lutz
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- The "if exist" check does not contain some data,
Lutz Mader <=