shell - Debugging monit -


I'm getting debugging monit to cause a big pain. There is nothing originally in the silent environment of monit (no path or other environment variable). Also, there is no log file that I can get.

The problem is, if the start or stop command in the monit script fails, it is difficult to understand what is wrong with it. At times it is not easy to run commands only on shell because shell environment is different from monit shell environment.

Are there some techniques that people use to debug monit configurations?

For example, I would be happy to keep the monit open to test my script, or to test a log file to see the wrong file.

I had a single problem. Monit's verbose helps to use the command line option a bit, but I was the best way to create the environment as much as possible for the monit environment and the start / stop program was run from there.

  #munit superuser $ sudo su # the -i goes as an option to ignore the inherited environment # This is the path that supplies the monit by default $ env - I try to start / stop running PATH = / bin: / usr / bin: / sbin: / usr / sbin / bin / short # programs $  

I've found that most Common problems are related to environmental variables (especially PATH ) or you should remember that it is usually Goes into form.

In addition to this, if you use Uyed myusername in your monitor config, then you should see the user myusername

That helps.


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -