All Questions
Tagged with monitoring monit
114
questions
0
votes
2
answers
144
views
Is it safe to expose monitd http server to the world
I'd like to use monitd for monitoring my webserver. I read it has built in http server. By default it is set to run on 2812 port. Is safe to open the port on firewall and view it via a browser?
0
votes
1
answer
157
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
1
answer
243
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....
1
vote
1
answer
154
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
395
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
2
answers
3k
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
2k
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
249
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
1
answer
296
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 ...
0
votes
2
answers
390
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 ...
2
votes
1
answer
331
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
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 ...
1
vote
2
answers
2k
views
Possible to not have a monit httpd?
Everytime I do
# monit reload
M/Monit enabled but no httpd allowed -- please add 'set httpd' statement
Reinitializing monit daemon
I get the error about I don't have set httpd. This is my /etc/...
1
vote
1
answer
858
views
Super simple Nagios alternative? [closed]
After having used Nagios for many years, I tried M/Monit, and it is mostly what I want, but still it lacks the option to customize the format of the notification emails sent by M/Monit, which makes it ...
2
votes
1
answer
779
views
How can I make monit poll more often during a state change?
I'm using Monit to monitor various processes that need to be up and running as a group for a web site to work properly. To bring up or bring down the site, there's a definite order by which the ...
3
votes
2
answers
3k
views
check mount point status using monit service
I would like to monitor the server "mount point status" using "monit".
Check filesystem is available to check whether that filesystem available or not on the systeam. But couldn't check filesystem ...
2
votes
1
answer
2k
views
monit restart process periodically
Is it possible to configure monit to restart an application periodically? I'm using monit to check the application health and restart it if it has died. I also want to periodically restart it. Prefer ...
2
votes
1
answer
502
views
Log system information collected by Monit to local log
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,...
2
votes
1
answer
2k
views
monit - "else if succeeded then exec"
I have a problem with monit executing script on success.
~/.monitrc:
check host example.com with address example.com
if failed url http://example.com/startpage and content == "mainBaner"
timeout 10 ...
2
votes
1
answer
12k
views
Monit fails to start process
Monit fails to start a Java process that is launched from an init script in /etc/init.d. The init script works when launched from the shell. Monit detects that the service is running and detects when ...
0
votes
0
answers
136
views
Use monit to collect metrics?
monit is very useful, simple and stable tool, but one thing is curious:
Is it possible to log every monit check?
I mean, that it logs only errors, like
[MSK Aug 10 15:54:30] error : 'fs-home' ...
1
vote
1
answer
746
views
Does monit restart service if service was told to stop via systemd?
I am new to monit and don't use it up to now.
Scenario
monit should restart PostgresSQL if it is dead
PostgresSQL gets started via systemd
A sysadmin shuts down PostgresSQL via systemd since he ...
0
votes
1
answer
585
views
Running monit AND supervisord simulatenously. Any possible issues?
Two aims:
1) Make sure background daemons such as webserver/rabbitmq are running all the time. If they crash they are automatically restarted etc. For this I am using monit with a config like:
set ...
1
vote
2
answers
3k
views
Simple tool to monitor HAProxy web requests?
I'm looking for a tool that can monitor the number of requests that are going to the nodes within HAProxy to determine the need to push out another node to loadbalance the requests. Can something like ...
1
vote
1
answer
3k
views
Monit run script on restart
So I have been trying to get Monit to run a script on start of a service. While Monit has no problem restarting the service, I of course want to be alerted when if my service required starting, not ...
-1
votes
1
answer
3k
views
How do I execute monit commands from a shell script without root access?
I've installed and configured monit on a Debian server and opened the http service to localhost and gave rw permissions to the group "monit". I created this group and added myself to this group.
The ...
0
votes
1
answer
6k
views
MONIT: Monitoring logfile on counting and changes of timestamp
I want to monitor a logfile and I am only interested in the "Received new block" lines. I need two different scripts to monitor
The height, which should always be one number higher then the height in ...
1
vote
1
answer
1k
views
Monit Web Service not available
I'm trying to configure monit on my server using chef solo. When I visit port 2812 response saying this webpage is not availble.
config/chef/files/default/monitrc
set daemon 30
set pidfile /var/run/...
3
votes
1
answer
9k
views
Monit "check program" and restart based on exit code
When I use check process, monit will start the program I define under start program then monit will restart it if it stops.
But when I use check program monit will not automatically start it. If the ...
2
votes
0
answers
660
views
monit: add NOALERT in an IF construct
On debian jessie, I have configured monit to check for HAproxy particular port forwardings, and to restart it if failed like this:
check process haproxy with pidfile /run/haproxy.pid
group www-...
1
vote
0
answers
91
views
Alert on simultaneous failure of multiple monit services
We're using Monit to check our web servers. When the check fails (or succeeds) the corresponding compontent on a status page is updated via a shell script like this:
check host web-a-https with ...
0
votes
0
answers
17
views
How to use number of CPUs as a multiplier in monit config?
What is the best way to use number of CPUs as a multiplier in monit confs? I need this for a system that has varrying number of CPUs, depending on predicted load.
Right now the only idea I have is ...
1
vote
2
answers
4k
views
Monitoring zabbix server (itself) externally
I have some infrastructure (servers, switches etc) monitored by a Zabbix server, setup to alert in case of issues; so far so good. But what if the Zabbix server itself (or any of the underlying infra)...
1
vote
1
answer
178
views
Is it possible to setup Monit to send alerts to Nagios
I am trying to setup Monit on an auto-scaled group of machines. Ideally I would like monit to send alerts to my nagios service (which is already configured to escalate alerts).
I have found this old ...
0
votes
2
answers
810
views
monit: how do I restart many Tomcats without overloading the server?
My server has several separate Apache Tomcat instances that each take a lot of time and CPU to start. It is not possible to start all of them at the same time. This would generate too much I/O, each ...
1
vote
2
answers
4k
views
How to monitor the postfix mail queue using monit?
Is there a way to monitor the postfix mail queue using monit? the available scripts just check, up/down/memory or CPU. I would like notices when the queue starts filling up. it would be nice to be ...
7
votes
1
answer
3k
views
How to restart and alert if condition matches in Monit?
How can I do multiple things when condition is matched? For example if I want to restart a process and also send alert email. I know I can do it with two separate lines, but can I combine them?
if ...
3
votes
1
answer
1k
views
How to configure Monit to alert me when anything appears in syslog
I want Monit to alert me if ANYTHING shows up in syslog - as anything in there would be abnormal.
I've tried the following and I'm not receiving any alert emails when I manually add something to ...
1
vote
1
answer
3k
views
Execute custom monit script upon failure to restart the process [duplicate]
I have a case where empty PID files are being generated by certain processes which are monitored by monit.
Monit is NOT so good in handling empty files and tries to re-start the process even when the ...
1
vote
1
answer
3k
views
Awaken monit daemon every few hours for all monitored processes
I am seeing a problem with monit config in configuring the monit daemon to awaken every few hours and start monitoring the processes which were set to "Not Monitored" state.
PROBLEM:
When the monit ...
-1
votes
1
answer
710
views
Monitoring MySQL – "Execution failed"
Got some trouble with a VPS where MySQL dies on me from time to time. As a temporarily fix I've installed Monit to make sure that the process is restarted when it dies. I checked the site today and it ...
7
votes
1
answer
17k
views
Monit: How to optimally monitor an URL
My webserver runs nginx with php5-fpm. If some trouble occurs, usually php5-fpm hung up, resulting in a "bad gateway" server error. Of course, I never know, if nginx may crash as well, some day.
When ...
1
vote
2
answers
3k
views
Configure Monit to monitor PHP5-FPM on Ubuntu/Nginx setup
System: LEMP running on Ubuntu 14.04
I'm trying to configure the tool Monit to restart Nginx or PHP-FPM if ever there is a problem. It is correctly monitoring Nginx however under status for PHP-FPM ...
3
votes
1
answer
1k
views
Monit ignores memory usage threshold config
I installed Monit 5.6 from Ubuntu repositories to alert me about unusually high memory and CPU usages on my VPS. It turned out that 75% memory usage is rather usual for my setup, so I changed the line ...
2
votes
1
answer
2k
views
Monitor a process using monit in ubuntu
On my server I have started a service using a script created by myself.
I want to monitor that process using monit. I didn't see any .pid file for that process in the /var/run directory. How can I ...
0
votes
1
answer
2k
views
Restarting shell script with &disown using Monit
I have a shell script that runs a C++ backend mail system (PluginHandler).
I need to monitor this process in Monit and restart it if it fails.
The script:
export LD_LIBRARY_PATH=/usr/local/lib/:/...
2
votes
1
answer
2k
views
How to make Monit "check process" conditional?
I have a monit script that does something like this:
check process sidekiq_1 with pidfile /tmp/pids/sidekiq_1.pid
start program = "/bin/bash -l -c 'bundle exec sidekiq start" as uid jim and gid jim ...
0
votes
2
answers
1k
views
Monit issues with mysql Ubuntu server 12.04
I've installed Monit on Ubuntu server 12.04 but Im having issues getting mysql monitoring to work at all. Here is what I have done so far.
#/etc/default/monit
startup=1
#/etc/mysql/my.cnf
pid-file ...
2
votes
2
answers
1k
views
turn off monit text alerts at night
I have monit running 24/7/365 and sending alerts to an e-mail address and text messages to a phone equally.
However I would now like to stop the phone text msgs at night so they don't wake me up.
I ...
0
votes
1
answer
4k
views
Monit system cpu usage
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 ...