Questions tagged [monit]
Monit is a free open source utility for managing and monitoring, processes, files, directories and filesystems on a UNIX system. Monit conducts automatic maintenance and repair and can execute meaningful causal actions in error situations.
393
questions
0
votes
1answer
18 views
When trying to check is checksum of a file changed, I get an error “There is no service named file.yaml”
I'm using Monit tool for monitoring on server.
I'm trying to check if checksum of a file changed:
set daemon 10
set alert me.mylastname@coorp.com
set httpd port 2812 and use address localhost
allow ...
0
votes
0answers
20 views
Monit command in shell script
I am issuing monit commands from command line and this works
$ sudo monit reload
Now I create a shell script monitreload.sh
#!/bin/bash
monit reload
And then the commands
$ sudo ./monitreload.sh
$ ...
0
votes
1answer
22 views
monitor bash script execution using monit
We have just started using monit for process monitor and pretty much new in monit. I have a bash script at /home/ubuntu/launch_example.sh. This is continuously running. is it possible to monitor this ...
0
votes
0answers
33 views
Monit -failed to start (exit status 1) — no output
I need to start pm2 apps using monit. Im not able to restart it or exec a script which sends messages to slack channel. Can some one help.
On monit logs it says trying to restart, but it gives
[UTC ...
0
votes
0answers
18 views
Tomcat is not starting properly with Monit
we tried to start/stop tomcat application using monit service with below config.
check process tomcat matching /opt/tomcat
start program = "/usr/bin/env APP_ENCRYPTION_PASSWORD=Password /opt/...
0
votes
0answers
21 views
Can monit's restart program be implemented?
I am trying to monitor a process with syntax:
check process <process-name>
with pidfile <pid-file>
start program = "<program>"
stop program = "<program>&...
0
votes
0answers
10 views
monit “check program” does not honor alert conditions
I am trying to use monit to run a script in every cycle and report error in syslog, only upon N consecutive failures.
e.g.
check program TestScript with path "/usr/local/bin/test_script.py"
...
0
votes
0answers
16 views
is there a way to suppress the fileattributes warning coming from Monit on AIX?
I'm getting this in /var/log/messages on one of our AIX machines:
...user:warn|warning monit[23593138]: Cannot test filesdescriptors usage as the statistics is not available on this system
I am ...
0
votes
0answers
21 views
restarting delayed_job script via monit breaks /usr/lib/ruby/2.3.0/rubygems/core_ext/kern
So i am trying to use monit to monitor my delayed_job processes. And to do that, i have written this
/home/deploy/sites/app.project.com.my/shared/delayed_job.monitrc
check process delayed_job_0
with ...
0
votes
0answers
29 views
MONIT: How to run script when process doesn't exist and run other on recovery?
I am trying to mount a solution for a process that crashes usual and I have discovered MONIT.
At this point I already have it configured for the service to start after it fails, but I'd like to add ...
0
votes
0answers
28 views
Receiving an email on nodemon events (error, restart)?
my nodemon is running inside a docker-container, ENTRYPOINT yarn start runs nodemon.
package.json
"scripts": {
"start": "nodemon --legacy-watch ./src/bin/www"
}
Basically, changes I make in app....
0
votes
1answer
45 views
Monit gives error after first run of exec command
i am running Monit to monitor cpu usage on an ubuntu server on DigitalOcean.
Then exec some commands to start or stop additional servers behind a load balancer.
Here is my code;
check system host_name
...
0
votes
1answer
32 views
How to add ConfigServer Firewall to Monit?
Does anybody know how to monitor CSF with Monit? I can't find any examples nor csf.pid file on CentOS 7
2
votes
0answers
418 views
Problems installing OpenMediaVault 5 on Raspberry Pi 1
BTW, I am trying to install OpenMediaVault on a Raspberry Pi 1, however, whenever I try and install OpenMediaVault on a Raspberry Pi 1, I get problems with the monit package, the FastCGI Process ...
0
votes
1answer
147 views
how to monit sidekiq process run by systemd?
versions:
ubuntu 18.04.4
sidekiq 6.0.6
monit 5.27.0
How can I monitor a sidekiq process run by systemd with monit?
Specifically, how does the monit file look like?(I don't see a pidfile for sidekiq ...
0
votes
1answer
28 views
Can not start a script in monit
I have a script which have to run another script in background:
#!/bin/bash
( cd /var/lib/docker/volumes/hostcontrol-pipe/_data/ && ./run-pipe.sh ) &
Firstly it changes directory and ...
0
votes
1answer
36 views
Monit config param - group?
I cannot locate information on the purpose of the group parameter below.
It appears in the documentation as a way to control access to a block, but I can't locate what it does in the following block.
...
0
votes
0answers
20 views
using monit cli on systems without pam?
I'm running monit on a synology diskstation DSM418. The underlying DSM linux doesn't support PAM so I cannot use user groups like @monit or so in the http configuration. When I try to connect to monit ...
0
votes
1answer
150 views
Monit fails to stop sidekiq 6
I am upgrading to sidekiq6 we use monit. As sidekiq6 does not support PID(https://github.com/mperham/sidekiq/wiki/Deployment#running-your-own-process)file I am trying to stop using https://github.com/...
-1
votes
1answer
177 views
Keep Track of laravel websocket with monit centos
Im trying to monitor laravel-websocket with monit instead of supervisord because of more options it provides
So In my /home/rabter/laravelwebsocket.sh :
#!/bin/bash
case $1 in
start)
...
0
votes
2answers
809 views
HTTP: Error receiving data ā Connection reset by peer
Since Iāve rebooted my server yesterday Iām getting this error:
mongodbā failed protocol test [HTTP] at [localhost]:27017/ [TCP/IP] ā HTTP: Error receiving data ā Connection reset by peer
āmongodbā ...
0
votes
1answer
41 views
File existence with monit
Does monitblocks until file exists in the specified path? I have a shell script which checks for file existence in a while loop and then execute a binary. How can I use monit to avoid the while loop?
...
0
votes
1answer
74 views
M/Monit proxy/redirection
I have monit running on a set of compute nodes on a private network. These nodes do not have access to the M/Monit host. But the compute nodes are connected to a compute server which again have access ...
0
votes
1answer
33 views
Failure tolerance counter workaround/alternatives
I use monit to monitor my daemon with the HTTP API and restart it if needed. In addition to just checking that the process is not dead, I also added an HTTP check (if failed port 80 protocol http ...
0
votes
1answer
218 views
init.d fails with tomcat
Im using tomcat on ubuntu server, and Im trying to use monit to keep it alive always.
But my problem is that monit dont work because
/etc/init.d/tomcat start
Throws this error:
touch: cannot touch ...
0
votes
1answer
50 views
Monit dont work because cant find “if” program
Im trying to configure monit on my ubuntu server for tomcat, but when I execute:
monit reload
It throws an error:
/etc/monit/monitrc:292: Program does not exist: 'if'
I dont know why it happends.
...
0
votes
1answer
35 views
Can monit filesystem check handle NTFS disk?
I am getting "unable to read filesystem '/dev/sdb1' state" from monit and don't understand why. fdisk -l shows /dev/sbd1: /dev/sdb1 2048 283113471 283111424 135G 7 HPFS/NTFS/exFAT
It is not ...
1
vote
1answer
190 views
Tomcat: /etc/init.d/tomcat dont exist and monit dont work
Im trying to build monit with tomcat in ubuntu, but I have two problems.
I cant find the pid file, and "/etc/init.d/tomcat" doesnt exist
How can I did it?
This is my code in monit:
check process ...
0
votes
1answer
158 views
Ubuntu 14.04.5 LTS: monit alert — Connection failed sshd
Overnight, I received tens of emails from the Monit that looked like this:
Connection failed Service sshd
Date: Thu, 24 Oct 2019 11:39:49
Action: restart
Host: ...
0
votes
1answer
47 views
Script to update Monit config based on amount of processors
I am wanting to build a script to install a monit config to monitor load avg on a server. Is there a way to say "Use this threshold if the server has 1 CPU or use this threshold if the server has 2 ...
0
votes
1answer
156 views
monit and unicorn restart command not working in rails 5.2 application
I configured Monit to watch unicorn and restart it when the memory exceeded or the cpu increased above a certain limit ,
how ever when it happens , monit doesn't restart unicorn , and here is the ...
0
votes
1answer
106 views
Monit http status locally
I'm using the following monit code to alert if the specified page isn't answering with http 200 status code:
check host gateway with address 127.0.0.1
if failed
port 7778
protocol ...
0
votes
1answer
274 views
Upgrade Monit 5.25.3 to 5.26 … configure/make install
I have installed Monit like described here:
https://mmonit.com/wiki/Monit/Installation
Now i want to upgrade. What is the right/best way ? Do this process again ?
Thx for help
RIchard
0
votes
1answer
115 views
Checking script with --login-path in Monit gives ERROR 1045 (28000)
Iām trying to check some rows in MySQL database via ācheck programā, but I always get the error message "ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)".
Needless ...
0
votes
1answer
260 views
Monit only executing once
Monit is currently executing once. I can see in the log file that it does a check every cycle, however, the execution only happens once when I reload monit.
check host somehost with address example....
0
votes
2answers
500 views
monit: monitoring certificates
I am currently trying to keep watch of my systems certificates to make sure I get alerting 30 days before expiring. As an example I took google.com and monitoring its certificates. Looking at monitrc ...
1
vote
1answer
515 views
Is there a way to pass Environment variables through a Monit config
I have a script that needs to be kept alive by Monit. How can I pass my environment variables to this script? Something like:
check host steve with address localhost
group nn
ENV = "...
2
votes
1answer
755 views
Monit on apache server : why monit log “ 'apache' error — unknown resource ID: [5]” on /var/log/monit
We are monitoring several servers with Monit. We are using the version 5.25.1.
Some are dedicated apache servers. The monitoring is ok.
But the log of monit (/var/log/monit) is like this :
[CET Mar ...
1
vote
0answers
95 views
Monit config update with reload leaving zombie processes
We ran into a rare problem here I hope. We are having monit for running background jobs. In AWS Opsworks, we configured chef recipes to run in deploy cycle. Those recipes will update every time the ...
0
votes
1answer
38 views
why moint is not running in local host?
I m trying to run monit in my ubuntu system . I followed the complete steps the was giving in link . ie (https://www.tecmint.com/how-to-install-and-setup-monit-linux-process-and-services-monitoring-...
0
votes
0answers
94 views
Supervisord can't control celery workers, how to do the same using Monit
Supervisord cant controll my celery services(workers, flower, django and celerybeat).
When system startup, I can see all processes running successfully, if 1 of processes fail and supervisor does not ...
0
votes
1answer
36 views
Monit: Accessing test threshold value in alert
I have setup Monit to monitor memory usage by a process, the check will exec a Python script when the threshold is breached. The Python script will sent out an Slack notification.
The requirement is, ...
0
votes
1answer
746 views
monit timestamp check: how to run custom script at each check?
I would like to run a custom script /tmp/script.sh each time the monit does timestamp check for file /tmp/file.txt
I have tried to make a workaround for this with the line:
"if timestamp is older ...
0
votes
0answers
20 views
Types of statuses in Monit service manager
I'm looking to find out what types of statuses that are available in the Monit Service Manager.
So far I've seen Running, Not Monitored and Accessible, but what else can I expect to see?
I've ...
0
votes
0answers
77 views
monit alerting - how to chain rule conditions
is it possible to chain a rule condition, for example,
right now I have a filesystem disk usage check
check filesystem test-/ with path /
if space usage > 80% then alert
If I want a an alert ...
0
votes
1answer
28 views
Can monit test for a response from a node API call?
I have a node API with serious code quality issues that can't be fixed -- because managers -- so very often requests stop being answered but the node process is still running.
I'm using upstart to ...
1
vote
1answer
296 views
Is there a way to stop monit from sending monitor and unmonitor email messages
I've recently started using Monit to monitor some production machines. And it does this well. But the annoying issue I have is that part of the routine is to restart the servers once a day on a ...
0
votes
1answer
38 views
Configuring Monit to monitor Rocketjob
This is what I have currently in monitrc file:
check process rocketjob
matching "rocketjob"
start program = "bin/bash -c 'source $HOME/.rvm/bin/rvm cd /home/ghias/projects/my_project/ ...
0
votes
2answers
722 views
What am I doing wrong in monit syntax with regex?
In my monitrc i wrote next:
check file mysite.com-access.log with path /var/log/apache2/mysite.com-access.log
if content = "\/1.[01]\" 4(\d){2}" then alert
But the systemctl status monit....
5
votes
2answers
946 views
Running 'monit restart all' on command line was working yesterday
error: invalid action action= restart monit
Server Info
Ubuntu 16.04.4 LTS
monit:
Installed: 1:5.16-2ubuntu0.1