7/25/2023 0 Comments Monit ubuntu![]() If failed port 80 protocol http with timeout 5 seconds then alert If failed port 22 protocol ssh with timeout 3 seconds then alert If failed port 53 protocol dns with timeout 5 seconds then alert If failed icmp type echo count 3 with timeout 3 seconds then alert In this example we will configure Monit to check different ports on a certain machine: # vim /etc/monit.d/host1Ĭheck host dns1 with address 111.111.111.111 Create and edit the corresponding file as follows: # vim /etc/monit.d/file_checkĬheck file important with path "/root/packages/test" The configuration is pretty straightforward, and it goes as follows: # vim /etc/monit.d/cert_checkĬheck file certificate with path "/root/ssl/"Īnother example where Monit can do a file size check. We will setup an SSL certificate’s permissions check. Monit can also do various checks for a certain file. # if space usage > 80% for 5 times within 15 cycles then alert # if failed permission 660 then unmonitor You can also name the file to your liking, it does not have to be the same as the example.Ĭreate and edit the file using your favorite text editor as follows: # vim /etc/monit.d/fs_check ![]() ![]() As we are using include /etc/monit.d/* (it’s just another way of configuring Monit, you can put all of this in /etc/nf too), we need to first create the appropriate file for the check we are about to configure. ![]() With Monit, you can check a certain filesystem. Use the following examples to create your own checks and your own conditions that will suit your need. It’s one of the essential tools a sysadmin must have. Monit is a free and open source monitoring system for Linux. ![]()
0 Comments
Leave a Reply. |