Questions tagged [monit]
monit is a free, open source process supervision tool for Unix and Linux.
386
questions
0
votes
1
answer
64
views
How to send Monit alerts with MSMTP?
I've got a Debian 11 system running as a local file server. I want to keep it as simple as possible but have some basic monitoring from Monit. I've installed and configured msmtp and msmtp-mta and I'...
0
votes
0
answers
13
views
Trigger a monit reload after unattended upgrades
I have run into an issue when combining monit with Ubuntu/Debian unattended upgrades. Monit monitors services and binaries, and flags changes, restarts processes, etc as needed. However, when a ...
0
votes
1
answer
42
views
send a get request to url in monit (linux)
I'm trying to find out when a file size increase stops and then sends a GET request to some URL.
already added this conf in
/etc/monit/monitrc
check file file.log with path /home/projects/my_project/...
1
vote
0
answers
150
views
Monitoring php command line worker with Monit Ubuntu 20
Problems monitoring php script using pid method.
We have a Laravel worker script that must be kept running on the server:
php /data/git/site/directory/artisan queue:work --daemon when this is run on ...
0
votes
1
answer
59
views
Monit: Editing in-built alert text
i have the monit tool setup on a linux box, and it's been monitoring apache and the overall system for a few months. The apache config file is:
check process apache with pidfile /var/run/httpd/httpd....
0
votes
1
answer
206
views
Amavis + Monit: "Error receiving data from the mailserver -- Resource temporarily unavailable "
Good morning folks,
I'm often getting these monit alerts, about once or twice a day:
Connection failed Service amavisd
Date: Wed, 20 Jul 2022 09:04:58
Action: restart
Host: (hidden).com
Description: ...
1
vote
1
answer
76
views
How to filter by service groups in the monit web frontend?
Monit has a feature called "service groups" (https://mmonit.com/monit/documentation/monit.html#SERVICE-GROUPS). It allows you to filter by groups using the CLI. But is it possible to use ...
0
votes
1
answer
182
views
Monitor free space with monit ... but only if the folder is mounted
For my backup, external disk space is mounted via cronjob as /mnt/backup on a Ubuntu machine every night. When the backup is complete, the disk is unmounted. No need to expose the backup drive to ...
0
votes
1
answer
261
views
restarting tomcat service monit
I have a Tomcat service running that fail sometimes - I did not find the reason yet. In the Catalina log I see the following:
Feb 03, 2022 10:54:39 AM org.apache.coyote.AbstractProtocol pause
INFO: ...
0
votes
2
answers
1k
views
Monit restart process behavior
Monit's documentation states the following for the restart action :
RESTART restarts the service and send an alert. Restart is performed
by calling the service's registered restart method or by first ...
0
votes
1
answer
72
views
Monit send empty mail
I configured Monit (version 5.27.1) and after a reload of monit I received an "empty" mail.
I searched since many hours and I can't fiind the way...
It seems that "environment variables&...
0
votes
1
answer
1k
views
How do I find the PID file for a process given the PID number?
I'm trying to use Monit to monitor and send email alerts about a process when it stops running, but I need the location of the PID file for that process. I can find the PID number using the htop or ps ...
0
votes
0
answers
142
views
Send Monit E-Mails via Exim
I installed monit on an Ubuntu 18.04 server and I would like to configure it to send e-mails to my personal e-mail address. I heard that I can send them via the installed exim. However, it does not ...
0
votes
2
answers
697
views
Program installed for one user cannot be accessed from other user even full path is provided
I have all the npm pacakages installed for a particular user (i.e) not root (/home/otheruser/*)
I am using monit to see whether to check the program is running. In this case its pm2, which is in
/home/...
1
vote
1
answer
406
views
Monit "can't find filesystem"
I'm finding monit unable to monitor a filesystem effectively. I've added a file /etc/monit.d/disk.cnf with the following:
check device disk1 with path /dev/root
if space usage > 85% then exec &...
2
votes
1
answer
833
views
Monit can't detect MySQL
The Monit webinterfcae is showing: Execution failed | Does not exist
netstat is giving me:
sudo netstat -lnp | grep mysql
tcp 0 0 127.0.0.1:33060 0.0.0.0:* LISTEN ...
0
votes
0
answers
480
views
How to stop monit daemon without stop services
I'm new on ServerFault.
I'm using monit to start/stop/monitoring services on RHEL7.
Sometime I need to stop the monit daemon (for upgrade it or othen reasons).
But when I stop the monit daemon (...
0
votes
1
answer
490
views
Why does monit complain about not being able to read the pid file?
I'm nrew to monit and have a question regarding the pid files:
I have added the following to my /etc/monit/monitrc:
cat /etc/monit/monitrc
set daemon 30
set logfile /var/log/monit.log
set idfile /var/...
0
votes
1
answer
220
views
Using "monit" - how to detect empty reply from http process (apache2)
I would like to monitor empty replies from my apache2 process as I am running into a problem similar to "Apache gives empty reply" .
I am using monit to monitor my processes, so I am going ...
3
votes
3
answers
876
views
Restart apache with monit
I'm trying to figure out some issues on my server where my CPU is reaching 100% utilization every other day. This causes all my websites and http services to fail.
How can I configure monit to restart ...
0
votes
1
answer
41
views
Monit reports certificate self-signed issues after upgrade
After an update to last binary version of Monit, Monit reports an issue about
SSL server certificate verification error: self signed certificate in certificate chain
1
vote
1
answer
594
views
Getting Monit Web Interface and CLI to work on Ubuntu server
I have a hard time getting monit to work on my Ubuntu 18.04.4.
I've installed monit via sudo apt install monit, then I've enabled httpd like this:
set httpd port 2812 and
use address localhost
...
1
vote
0
answers
51
views
can I limit how often monit will alert?
Sometimes monit spams alerts faster than the devops can read them. It's not false alarms, things have gone crazy. But yet there is no need to spray alerts all over the place, a few would be sufficient ...
0
votes
1
answer
276
views
Cannot access monit web interface
I just installed Monit on my server. I want to access to the web interface to manage it but the web is not accessible.
The machine is an instance in AWS, the port is open. I have tried many ...
0
votes
0
answers
217
views
Can `monit` send alerts to an HTTP endpoint (instead of email only)?
I'd like to configure Monit to deliver 'fail' and 'success' notifications via its alerting system; the global alerting system seems only to support email notifications, and there doesn't seem to be a ...
1
vote
1
answer
98
views
2 identical VPS (Ubuntu 18.04): Postfix - Alerts from Monit to Google mail is not working
Let's start from beginning. I have a two identical VPS servers with Ubuntu 18.04 OS and Monit installed on both. I configured mailserver on the monit (for sending alerts) configuration as a localhost ...
0
votes
1
answer
141
views
Monit state file version warning
I am running Monit version 5.17.1 on Ubuntu 14.04. At times, I
see that Monit has logged the following:
[PST Nov 14 15:42:40] warning : State file '/var/lib/monit/state': incompatible version 2
...
0
votes
1
answer
146
views
Get system information Response collected by Monit into Springboot/java
I have configured Monit version 5.6 on an Ubuntu 14.04 server. There are few check like filesystem usage, remote host connectivity check and service monitoring. Now, when I check the web gui of monit, ...
0
votes
2
answers
2k
views
Why does monit log error & status failed while check programm returning exit code 0
Problem 1
I want to monitor a headless running LibreOffice-Process with monit version 5.25.1.
Here is my monit config for this approach:
cat /etc/monit/conf.d/libreoffice
check program lo-check-...
2
votes
1
answer
260
views
HTML formatted alert emails using monit
Is it possible to send HTML formatted alert emails using monit service ?
I would like to include coloured status based on the alert.
Ref: https://linux.die.net/man/1/monit
0
votes
1
answer
248
views
systemd drop-in order in debian jessie
I have several debian 8 servers shipped with a default configuration.
They have on board apache2 and i want to add monit ( https://mmonit.com/monit/ ) for extra availability.
To manage operator-...
1
vote
1
answer
695
views
Monit : Add username and password for mysql check
I have a "problem" with my Monit configuration.
The monitoring works as expected, but I get the following errors on the mysql error file /var/log/mysql/error.log each time the monitoring script runs :
...
0
votes
1
answer
4k
views
syntax error in monitrc
I must be doing stupid in my monitrc file but can't find it. If anyone wants to take a look, here is the result of monit -t
root@app-server[192.168.100.83] ~ # monit -t
/etc/monit/monitrc:308: syntax ...
0
votes
1
answer
130
views
Monit background script running within a detached screen
How can Monit be used to monitor a simple script that creates no PID file and is running in the background within a detached screen session?
1
vote
1
answer
236
views
Send additional (custom) data to m/monit
I use monit (https://mmonit.com/monit/) for system monitoring.
Also I use my own "backend" instead of m/monit and I want to receive additional data from the monit instances.
For example, is it ...
0
votes
1
answer
130
views
Monit to tigger database query
I'm new to monit service. I want to execute select query if a application server goes down using monit.
Configuration in /etc/monitrc is like:-
check host www.example.com with address www.example.com
...
0
votes
1
answer
185
views
delayed reboot if network fails
I'm trying to make a monit check that reboots my router if it looses network connection. But I do not want it to reboot withing the first 5 minutes after boot, no mater if net is up or down. So far I ...
1
vote
2
answers
2k
views
monit failed protocol test [HTTP] at [localhost]:8080
I get the error "monit failed protocol test [HTTP] at [localhost]:8080" every so often. The application, tomcat, has not stopped and is still running just fine. I know port 8080 is open because I ...
0
votes
1
answer
353
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
1
answer
402
views
monit reload - how to know when it is finished?
I have this requirement to add services to monit dynamically. So what I am doing is copying the service monit file to /etc/monit.d/ (which is included in /etc/monitrc) and reloading monit.
cp <...
1
vote
1
answer
782
views
monitoring mongodb with monit
I cannot get the most basic script working on monitoring mongodb on ubuntu 16.04 monit 5.16
check process mongod with pidfile /var/run/mongod.pid
group database
start program = "/usr/sbin/service ...
0
votes
1
answer
513
views
Monit is getting false negative for mongo http host checkup
I am trying to create a monit config file to monitor if mongodb is running.
Here's my config file.
check process mongod with pidfile /var/run/mongodb/mongod.pid
group mongodb
start program = "/...
1
vote
0
answers
399
views
Restart Monit service upon multiple conditions
I have a service monitored by monit, and I would like to restart it if it meets either one of two distinct conditions:
if memory usage is >15%
if memory usage is >5% AND the current system time is ...
1
vote
1
answer
952
views
monit check http response header
unfortunately, the documentation is not clear about the HTTP content.
https://mmonit.com/monit/documentation/monit.html#HTTP
i want to monitor a specific response header, not the content itself, ...
4
votes
1
answer
2k
views
Forbidden Invalid CSRF Token +monit [closed]
I have installed monit on AWS ec2 and it working fine. But when I try to restart the nginx service through monit UI,i got an error like "Forbidden Invalid CSRF Token +monit".
My configuration
check ...
3
votes
2
answers
397
views
Pause monitorig of Monit on server update
I have a problem with monitoring services by Monit.
Monitoring works well. Too well.
When I execute system update... possibly update of MySQL or Apache etc. needs to be service down. Updating ...
1
vote
1
answer
695
views
linux : monit : iptables
Under linux, at least centos and I think also debian, there is a "iptables" listed in the daemons.
But it is really a script to load and save them, it doesn' start a process, neither write a pidfile.
...
0
votes
1
answer
302
views
monit, run program based on another check
On our linux servers we have this basic check:
check system localhost
every "* 08-18 * * 1-5"
if loadavg (1min) > 4 then alert
if loadavg (5min) > 2 then alert
if memory usage &...
0
votes
0
answers
1k
views
Monit throwing failed protocol test [HTTP] instead of starting process
I have a custom process (an elixir application) running. I want to setup monit for it. I am setting up the monit check in /etc/monit.d as the following:
set daemon 30
check host meraj-pc with ...
0
votes
1
answer
581
views
Monit: How to exec when timeout/unmonitor?
How to execute a script as last step, when monit timeout a service?
My config looks like this:
check process php5-fpm with pidfile /var/run/php5-fpm.pid
start program = "/usr/sbin/service php5-...