<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Linux Forum &mdash; Centos 7, monit не работает как полагается]]></title>
	<link rel="self" href="https://linuxforum.ru/extern.php?action=feed&amp;tid=37444&amp;type=atom" />
	<updated>2015-01-22T05:04:57Z</updated>
	<generator>PunBB</generator>
	<id>https://linuxforum.ru/viewtopic.php?id=37444</id>
		<entry>
			<title type="html"><![CDATA[Re: Centos 7, monit не работает как полагается]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=441599#p441599" />
			<content type="html"><![CDATA[<p>Правильный путь /var/run/httpd/httpd.pid<br />Старт и стоп systemctl start httpd.service и systemctl stop httpd.service соответственно</p>]]></content>
			<author>
				<name><![CDATA[Eof]]></name>
				<uri>https://linuxforum.ru/profile.php?id=36893</uri>
			</author>
			<updated>2015-01-22T05:04:57Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=441599#p441599</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Centos 7, monit не работает как полагается]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=441396#p441396" />
			<content type="html"><![CDATA[<p>Если решил - пиши и решение, вдруг кому пригодится.</p>]]></content>
			<author>
				<name><![CDATA[Vascom]]></name>
				<uri>https://linuxforum.ru/profile.php?id=5339</uri>
			</author>
			<updated>2015-01-21T06:59:35Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=441396#p441396</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Centos 7, monit не работает как полагается]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=441391#p441391" />
			<content type="html"><![CDATA[<p>решено</p>]]></content>
			<author>
				<name><![CDATA[Eof]]></name>
				<uri>https://linuxforum.ru/profile.php?id=36893</uri>
			</author>
			<updated>2015-01-21T05:17:41Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=441391#p441391</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Centos 7, monit не работает как полагается]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=441304#p441304" />
			<content type="html"><![CDATA[<p>Подскажите пожалуйста правильный конфиг для monit <br /></p><div class="codebox"><pre><code>set daemon  60              
set logfile syslog facility log_daemon
set mailserver localhost 
set mail-format {
      from: monit@$HOST
   subject: monit alert --  $EVENT $SERVICE
   message: $EVENT Service $SERVICE
                 Date:        $DATE
                 Action:      $ACTION
                 Host:        $HOST
                 Description: $DESCRIPTION

              Your faithful employee,
              Monit
}

set mail-format { from: monit@localhost}
set alert root@localhost                       # receive all alerts
set httpd port 2812 and
    use address 192.168.1.250  # only accept connection from localhost   
    allow admin:admin      # require user &#039;admin&#039; with password &#039;monit&#039;
    allow @monit           # allow users of group &#039;monit&#039; to connect (rw)
    allow @users readonly  # allow users of group &#039;users&#039; to connect readonly

check process apache with pidfile /usr/local/apache/logs/httpd.pid
    start program = &quot;/usr/bin/systemctl start httpd.service&quot; with timeout 60 seconds
    stop program  = &quot;/usr/bin/systemctl stop httpd.service&quot;

    if failed host server.my port 80 protocol http
    and request &quot;/monit/apache.php&quot;
    then restart
    if 3 restarts within 5 cycles then timeout#
include /etc/monit.d/*</code></pre></div><div class="codebox"><pre><code>[MSK Jan 20 19:01:25] info     : &#039;apache&#039; trying to restart
[MSK Jan 20 19:01:25] info     : &#039;apache&#039; start: /usr/bin/systemctl
[MSK Jan 20 19:02:26] error    : &#039;apache&#039; failed to start
[MSK Jan 20 19:03:26] error    : &#039;apache&#039; process is not running
[MSK Jan 20 19:03:26] info     : &#039;apache&#039; trying to restart
[MSK Jan 20 19:03:26] info     : &#039;apache&#039; start: /usr/bin/systemctl</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Eof]]></name>
				<uri>https://linuxforum.ru/profile.php?id=36893</uri>
			</author>
			<updated>2015-01-20T13:33:01Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=441304#p441304</id>
		</entry>
</feed>
