lasvegasmili.blogg.se

Monit linux
Monit linux






  1. #Monit linux software
  2. #Monit linux code
  3. #Monit linux password

If failed host 127.0.0.1 port 80 protocol http then restart Start program = "/etc/init.d/httpd start" If 3 restarts within 5 cycles then timeout // Set in the 5 Restart within a monitoring cycle 3 The second time will be out of time, So we don't monitor this service anymoreĬheck process httpd with pidfile /var/run/httpd.pid // monitor http service If failed host 127.0.0.1 port 22 protocol ssh then restart If inode usage > 85% for 5 cycles then alertĬheck process sshd with pidfile /var/run/sshd.pid // monitor ssh service If space usage > 85% for 5 cycles then alert // If in 5 Within a monitoring cycle ,space Utilization rate exceeding 85% Just send an email to the police

#Monit linux password

Set httpd port 2812 and use address 10.10.8.2 // Set up http Monitor the port and ipĪllow localhost #Allow localhost to connect // Allow local access toĪllow 10.10.8.0/24 // Allow this IP Section visitĪllow admin:nishiwode #Allow Basic Auth // Authenticated user name and password Set mailserver 10.10.9.109 // Set up the mail server #set mailserver, port 10025, localhost with timeout 15 seconds Multiple e-mail addresses are configured with multiple lines with After the configuration can not add. Set alert with reminder on 1 cycle // appear 1 Send an alarm email to the designated mailbox for each error. Set logfile /home/monit/log/monit.log //monit Log file Set daemon 120 #Poll at 2-minute intervals // Every time 2 Check every minute, The unit is in seconds monit Can't do real-time monitoring. src]# cat /etc/nf // The custom configuration is as follows Monit The configuration file /etc/nf, You can back up the default configuration file, Then customize the configuration centos6 The configuration file is nf,centos7 The configuration file is monitrcģ)monit Configuration instructions ( Official website configuration description :) Then edit the configuration file /etc/monitrc that will do.

#Monit linux code

Source code installation package download : Its biggest feature is that the configuration file is easy to read, At the same time, it supports the monitoring of process and system status, And flexible to provide a variety of detection methods, cycle, And alarm and response ( Restart the service, To execute an order, etc )Ĭentos6 Deploy Monit Environmental process : However, the following is a tool specially designed to do this kind of thing :Monit. To the alarm Action or Commands, Or you can write your own script and put it into the planned task for execution. It's not difficult in itself, There are many ways to do this, For example Zabbix or Nagios Add.

#Monit linux software

But the reality is brutal, The stability of many software needs to be improved, The increase of machine hardware resources will touch the cost, So in a cluster environment, With redundancy, It makes simple service restart the most realistic choice. Logically speaking, We should try to find out the essential reason for these situations, And then avoid it happening again. I don't say much nonsense, Following pair monit To sort out the deployment of monitoring environment :Īs the number of online servers increases, A wide range of open source software and tools, Some services stop automatically or do not respond, A large part of it is due to the stability of the software itself or the limitation of the machine hardware resources. If failed host 172.16.5.1 port 8599 for 3 times within 4 cycles then alert This is the : If in four cycles, Three times 8599( My electric donkey mouth ) The ports don't work, Email notification. Like a service ,Monit I found it stopped, It's starting up again, Then don't bother, Don't always email after email. Most of it is due to poor network conditions. Sometimes ,Monit There are also false positives, This is normal, Any monitoring software will. If you want to, In multiple cycles, Even if the service status doesn't change ( It's going down all the time ), You can also get email reminders, Then add this sentence :Īlert with reminder on 10 cycles This sentence means, stay 10 There will be email reminders in every cycle.

monit linux monit linux

Next reminder, It's when the service is restored. Absolute cow X A system monitoring magic !īy default, If the service Down 了, No matter how long it lasts Down How long did it take ,Monit The program will only email you once. Monit Not only is local monitoring very effective, You can also monitor remote services, With a little effort, we can achieve service forever “ revive ”, That is to say, it can make the service programs monitored by it start up quickly after downtime, No human intervention is required. It can automatically fix programs that have stopped working, Special envoys are suitable for dealing with software errors caused by various reasons. Monit It's an artifact for operation and maintenance personnel, It's a very feature rich process 、 file 、 Catalog and device monitoring tools, be used for Unix platform.








Monit linux