2

I have installed monit in my Ubuntu, starting when I did

root@raaz-ubuntu:~# service monit start

* Starting daemon monitor monit

but its not starting as I can see it

root@raaz-ubuntu:~# ps aux | grep monit
root      1732  0.0  0.1 106488  1504 ?        S    15:46   0:00 /usr/bin/monit -c /etc/monit/monitrc
raaz      2491  0.0  0.5 302600  5232 ?        Sl   15:46   0:00 /usr/lib/gvfs/gvfs-udisks2-volume-monitor
raaz      2509  0.0  0.2 203632  2900 ?        Sl   15:46   0:00 /usr/lib/gvfs/gvfs-gphoto2-volume-monitor
raaz      2513  0.0  0.2 285692  2860 ?        Sl   15:46   0:00 /usr/lib/gvfs/gvfs-afc-volume-monitor
raaz      2518  0.0  0.2 191468  2704 ?        Sl   15:46   0:00 /usr/lib/gvfs/gvfs-mtp-volume-monitor
raaz      2898  0.0  0.4 523920  4456 ?        Sl   15:48   0:00 /usr/lib/x86_64-linux-gnu/deja-dup/deja-dup-monitor
root      4460  0.0  0.0  13648   940 pts/6    R+   16:36   0:00 grep --color=auto monit

I need it in port number 2812 so that I can access it.

2 Answers 2

4

Did you verify that the http daemon is configured (and not commented, i.e., not beginning with the # character) in /etc/monit/monitrc?

It should look something like this:

set httpd port 2812 and
    use address localhost
    allow localhost

Setting a configuration like that may fix your problem.

5
  • This is more suited for a comment Jason, as it does not answer his question but only inquires on his setup. Welcome to the community though!
    – Anon
    Aug 11, 2014 at 22:16
  • 2
    @Akiva Are you sure? This answer seems to say what the contents of the monitrc configuration file should be; it's quite strongly implied that making them like that may solve the problem. Aug 11, 2014 at 23:57
  • @EliahKagan I think you make a fair point. It however does come across as a comment; my preference would be that it be reworded away from asking a question of the op, to making a statement and suggestion.
    – Anon
    Aug 12, 2014 at 0:01
  • 1
    @Akiva Though I don't think it's bad for answers to include sentences in question form--or even to lead with them, as this does--I do agree that whenever practical it should be immediately clear what course of action an answer suggests might help. Since I saw another aspect of this answer that I thought might be improved, I've edited it to address this issue also. Aug 12, 2014 at 0:05
  • That small edit did well to change the question away from an inquiry, to a suggestion. I will keep that in mind next time I review an answer of this sort. Thank you for pointing that out.
    – Anon
    Aug 12, 2014 at 0:08
0

I've just realized that one of my problems was that /etc/init.d/monit was running differently from just running monit start all. They are using different config files. The first one was using a config file located at /etc/monit/monitrc, while the second one was using config located at ~/.monitrc (which was empty). It turns out that monit program uses ~/.monitrc by default and /etc/monitrc as fallback in case first option is not found. I got to know that through their documentation page: https://mmonit.com/monit/documentation/monit.html#FILES

So this comment is just a friendly reminder for you to be aware of this kind of trick that might be fooling you around in order to get your monit daemon/service to properly run.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .