16
votes
Accepted
Install monit in Debian 10 (buster)
On Debian Buster, monit is available on backports repository.
Add buster-backports:
printf "%s\n" "deb http://ftp.de.debian.org/debian buster-backports main" | \
sudo tee /etc/apt/sources.list.d/...
15
votes
What command in monitrc can I use to start/stop systemd services?
This should work on RHEL / CentOS 7 / Ubuntu 18.04
check process nginx with pidfile /var/run/nginx.pid
start program = "/bin/systemctl start nginx"
stop program = "/bin/systemctl stop nginx"
...
10
votes
Accepted
Who changes `/proc/sys/kernel/random/boot_id` in Linux (SLES)?
Timestamps in /proc aren't really meaningful. In particular, the modification time does not indicate when the content changes. I can't find official documentation about that, but from a quick source ...
4
votes
What command in monitrc can I use to start/stop systemd services?
Monit expects all paths to be fully qualified. It is clearly the Monit Control File (/etc/monit/monitrc).
In this case fully qualified path for systemctl is required to be specified.
On Ubuntu 20.04 ...
4
votes
Who changes `/proc/sys/kernel/random/boot_id` in Linux (SLES)?
Basically https://unix.stackexchange.com/a/776000/320598 is right, and I made an experiment to verify that the inode will be re-created if its memory was reclaimed (see also /usr/src/linux/...
3
votes
How to check if a web server is reachable in Linux?
The server is not pingable although it is reachable.
So, first of all: fix your damn ICMP! There's no reason why you'd suppress pings, and doing so makes various things unnecessarily hard. Path MTU ...
3
votes
How to check if a web server is reachable in Linux?
Typically you would do this with an endpoint (specific URL) on the server. That way you test both the network access and server availablility (IE not crashed) in the same request.
A simple curl ...
2
votes
How can I monitor load average CPU other servers via monit tools?
You cannot configure a particular monit directly with rules for other servers as your example.
The monit daemon configuration only pertains to the particular server where it is installed; e.g. monit ...
2
votes
How do I configure to 'monit' monitor a process after it restarts?
The issue is that you're only telling it to stop the process, which stops monitoring it too.
In this case, the easiest solution is to write a script that will tell launchd to restart the process (I ...
1
vote
Monit alert/exec when host is back to normal
Here is the solution:
check host [Elasticsearch]-test with address 1.2.3.4
if failed
port 9200
protocol http
then exec "/alerting/monit2telegram/monit2telegram.sh"
else if ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
monit × 37monitoring × 8
linux × 6
debian × 5
ubuntu × 5
systemd × 2
nginx × 2
shell × 1
centos × 1
networking × 1
rhel × 1
boot × 1
apt × 1
process × 1
sudo × 1
software-installation × 1
cron × 1
python × 1
raspberry-pi × 1
configuration × 1
environment-variables × 1
services × 1
dpkg × 1
proxy × 1
reboot × 1