Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

Questions tagged [monit]

monit is a free, open source process supervision tool for Unix and Linux.

0
votes
1answer
14 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
0answers
16 views

Match multiple strings - Monit regex match

The requirement is to match the below in monit regex match: cat /var/log/maillog |grep -v “status=sent” |grep -v “relay=local” |grep “relay=”
0
votes
1answer
20 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
0answers
22 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
0answers
19 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-...
0
votes
1answer
31 views

Monit not restarting process on kill

I've installed monit on my Deabian server with the following configuration: set logfile /var/log/monit.log check process myprogram with pidfile /var/run/myprogram.pid start program = "/etc/init....
0
votes
1answer
38 views

monit won't mount filesystem with “execution failed”, works manually

I have monit configured to mount an NFS filesystem if it is ever not mounted, however for some reason monit won't mount the share automatically and I have to run monit start myshare in order to get ...
1
vote
0answers
22 views

Is there a way to include some text into monit's alert message?

I plan to use program check, with it's exit code I can force monit to send alert mail message, ok. But how to include into that message some output produced by checking program? I could modify ...
4
votes
1answer
321 views

How can I automatically restart my Docker containers with container auto-delete?

I have a general purpose VPS, and am Dockerising the apps on it. There will be around 5-6 containers on it, and very little else, so the box can be trivially rebuilt as required. For each app I have ...
0
votes
2answers
359 views

Monit: use content MATCH on “check file …” if match “xxx”

I've asked this question around a week a go at StackOverflow but no answer just yet, probably is no possible but don't know where to look for that answer, I hope someone can help over here. I'm using ...
1
vote
1answer
48 views

CPU Total is wrong displayed for a process in monit

I am using Monit, and I am monitoring a few processes. I have 12 vCPUS, and system is around 20% usage. Yet M/Monit shows some processes to go up to 100%. Well they actually do but just a single CPU. ...
0
votes
0answers
21 views

How to use cycles with if-statement in Monit?

I would like to only get an alert if the below service isn't available for 15 minutes. So I have done check program check_ssl_cert_https_on_hd.example.com with path /etc/monit.d/scripts/...
0
votes
1answer
47 views

Monit adding hostname to mailserver and inventing a username

I'm brand new to Monit, trying to set it up on my CentOS7 VPS. I put the following settings in monitrc: set mailserver 127.0.0.1 set alert me@externaldomain.org But the email fails, and the entry in ...
0
votes
2answers
154 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
1answer
353 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 ...
1
vote
0answers
35 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 ...
0
votes
0answers
30 views

Restart another monitered service with monit

I have a service that is dependant on another service. So when Service A starts up again, I want Service B to restart. I thought it would be simple like the following, but whenever I restart redis-...
2
votes
1answer
214 views

monit, let's encrypt, and file permissions

I decided to put monit on my vps running centos 7. I've already got let's encrypt on the server and the certs are installed. I wanted to point monit at the fullchain.pem or the cert.pem, but I get ...
1
vote
1answer
117 views

Monit, checking URL with basic Auth but username has @ in it

Monit gives me a syntax error when the username contains an "@", which would be quite common. For example, 'user@gmail' below: check host somesite with address monitoring.somesite.com if failed ...
0
votes
1answer
60 views

Monit - monitor tinc VPN

Is there any way to monitor a tinc VPN with a monit network check? The following check does not see if the vpn connection is actually established (means if there is a connection to one of the vpn ...
1
vote
1answer
238 views

why is monit stopping apache restart, stop, graceful

After a short period of monit running, I cannot then restart or stop apache, it says there is a conflict, something else using port 80. Apache still serves webpages fine and when I netstat -anp | ...
1
vote
0answers
168 views

monit lists apache as 'not monitored'

Trying to get monit to monitor apache. No matter what I do I can't get it to work. It reports as 'not monitored'. I've checked that the pid I am using is the root apache process. Running apache 2.24 ...
0
votes
1answer
126 views

Executing repeating tasks via Zabbix

First, a brief explanation: Using Zabbix for system monitoring, I'm try to understand if/how it can be used to run important, scheduled task for which I need an OK/PROBLEM value reported (ie: via ...
0
votes
1answer
125 views

Monit with mysql, but doesn't work with skip-networking on in my.cnf

I'm trying to figure out a way around this. Basically, I don't want anyone outside of our server to be able to try and connect to our DB's. As such, I have added this into my.conf: skip-networking ...
0
votes
1answer
489 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 ...
0
votes
1answer
322 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 ...
0
votes
1answer
272 views

Monitoring solr service on Ubuntu 16.0.4 with Monit

I'm trying to work out why my Monit (https://mmonit.com/monit/) doesn't want to seem to monitor my Solr service. I have it all working for the rest of the services: But for some reason Solr doesn't ...
2
votes
1answer
128 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,...
1
vote
1answer
618 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 ...
1
vote
1answer
580 views

Monit wont autostart on boot

So as the title states, I have a problem where monit won't start on boot. I have a CentOS 7 box that it does start on, and another CentOS 7 box that it doesn't start on, so I know it's not a OS issue ...
0
votes
1answer
51 views

Postfix daemon connects and immediately disconnects periodically

Postfix's smtpd(daemon used to receive mail) flaps/(connects/disconnects) every 30 seconds with the connection from localhost. May 24 17:33:03 ---- postfix/smtpd[8397]: connect from localhost[127.0....
0
votes
1answer
66 views

Monit restart service at system upgrading

I have problem with monit. I'm monitoring MySQL service for example... and when I execute system updates like apt-get upgrade or dist-upgrade ... sometimes is upgraded monitored services. System ...
0
votes
2answers
505 views

How to determine what's causing high bandwidth usage on server

I have a MySQL database server running on a VPS. The server is connected to a web server via a private network interface, and has no public services except SSH and a PHPMyAdmin installation. Some ...
1
vote
2answers
2k views

Setting up “monit” to monitor services, but can't get it to load

I'm trying to get this going on my new server: https://mmonit.com/monit/ I've installed it, but when I try and run any commands, it times out: root@mail:~# monit status /etc/monit/monitrc:298: ...
3
votes
1answer
705 views

Restart process using monit, when the checksum of a file changed

I want to restart a process monitored by monit, when the checksum of a file failed. Currently i use check process prosody with pidfile /var/run/prosody/prosody.pid depends certificate_file ...
0
votes
1answer
239 views

Configure Monit to send emails with SparkPost

I tried to get Monit to send emails with my SparkPost account but ran into an unexpected error. My monitrc is like so (where mydomain.com is a properly configured sending domain on my SparkPost ...
0
votes
2answers
321 views

M/Monit behind Apache SSL VHost proxy broken redirects

I'm having some difficulty getting M/Monit to work behind a proxy. I'm trying to proxy HTTPS connections from https: //monit.mydomain.com to http: //monit.realserver.com:8082. With the configuration ...
0
votes
1answer
756 views

Syntax error: when using “check program” in monit

check program raid-md127 with path "/sbin/mdadm --misc --test /dev/md127" if status != 0 then alert When restart monit: root@NAS2:/etc/apt/sources.list.d# /etc/init.d/monit restart Stopping ...
0
votes
1answer
393 views

Run multiple PHP scripts through Monit

I'm having two PHP scripts acting as RabbitMQ Consumers and i want them to be started and monitored (+ automatically restarted) through monit. My /etc/monitrc for the two processes looks like this: ...
1
vote
1answer
979 views

Overriding monit alerts with mail-format on a per check basis

I currently have two monit checks for each host I have running HTTPS: check host www-example-https with address www.example.org if failed port 443 protocol https then alert check host ...
1
vote
1answer
56 views

Monit: keep record of all test results

My apache server is frequently spawning lots of children. I think there's multiple causes and while I pick them apart, I've band-aided the situation by getting monit to restart services when it spots ...
0
votes
2answers
329 views

no httpd connection for monit started from systemd

When starting monit my logs show that [CET Oct 31 19:43:34] info : Starting Monit 5.16 daemon [CET Oct 31 19:43:34] error : monit: monit httpd not started since no connect allowed [CET Oct 31 ...
0
votes
1answer
218 views

monit Sendmail: Cannot switch to SSL

I setup monit to monitor some services which are running on my servers. On one of the servers I also have a mail server running, which handles the mail transport for the domains I own (in this case ...
1
vote
1answer
974 views

Monit HTTP Status code gives a syntax error

My systems are running monit 5.19. When I start Monit, I see the error syntax error 'status' Status appears to be supported since 5.8 so I'm not sure what the issue is. It is being caused by the ...
0
votes
1answer
524 views

How to configure monit, check process to start program when only filesystem is available?

I want monit to check specific process and start it only when the depending filesystem is available. check process Tomcat with pidfile /path/to/tomcat/TOMCAT.PID depends on abc start ...
0
votes
1answer
847 views

Monit: ping a website url then restart application server

I am using this configuration for monitoring apache2 (ubuntu): /etc/monit/conf.d/apache2: check process apache with pidfile /var/run/apache2/apache2.pid start program = "/etc/init.d/apache2 ...
2
votes
2answers
1k views

Monit missing files / wont start webserver

I just recently tried to install 'monit' on a server which runs Ubuntu, though when I try to run monit it will always popup the following errors: test:~$ sudo monit restart all /etc/monit/monitrc:...
0
votes
1answer
448 views

Centos monit ulimit not working

Centos 5.9 I have set the below in /etc/security/limits.conf but when monit starts my processes the ulimit is still 1024. If I do ulimit -a it correctly shows 500000 as max open files. In /etc/sysctl....
1
vote
1answer
5k 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
0answers
92 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' ...