0

Monit version: 5.0.3
Server: Ubuntu 10.04.4 LTS

I want to monitor the system cpu usage with Monit and I am trying as follows:

check system host_name
   if cpu usage (user) > 70% then alert
   if cpu usage (system) > 30% then alert
   if cpu usage (wait) > 20% then alert

But when I use this command:

monit -v

The response is:

'host_name' cpu wait usage check succeeded [current cpu wait usage=-1.0%]
'host_name' cpu system usage check succeeded [current cpu system usage=-1.0%]
'host_name' cpu user usage check succeeded [current cpu user usage=-1.0%] 

I guess it is not working :) Why do I get this message? The cpu usage is not -1.0% of course, so why do I get this false result?

shgnInc
  • 1,634
  • 3
  • 21
  • 29
piazz23
  • 13
  • 1
  • 2

1 Answers1

1

I think you have this result because no check has already been performed.

I would suggest to edit file /etc/monit/monitrc and uncomment line :

set daemon  120

Then restart monit : /etc/init.d/monit restart

Should be OK.

The fact is that your monit version comes with a control file fully commented.

krisFR
  • 12,830
  • 3
  • 31
  • 40