<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Linux Forum &mdash; Centos 7, monit не работает как полагается]]></title>
		<link>https://linuxforum.ru/viewtopic.php?id=37444</link>
		<atom:link href="https://linuxforum.ru/extern.php?action=feed&amp;tid=37444&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «Centos 7, monit не работает как полагается».]]></description>
		<lastBuildDate>Thu, 22 Jan 2015 05:04:57 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Centos 7, monit не работает как полагается]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=441599#p441599</link>
			<description><![CDATA[<p>Правильный путь /var/run/httpd/httpd.pid<br />Старт и стоп systemctl start httpd.service и systemctl stop httpd.service соответственно</p>]]></description>
			<author><![CDATA[null@example.com (Eof)]]></author>
			<pubDate>Thu, 22 Jan 2015 05:04:57 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=441599#p441599</guid>
		</item>
		<item>
			<title><![CDATA[Re: Centos 7, monit не работает как полагается]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=441396#p441396</link>
			<description><![CDATA[<p>Если решил - пиши и решение, вдруг кому пригодится.</p>]]></description>
			<author><![CDATA[null@example.com (Vascom)]]></author>
			<pubDate>Wed, 21 Jan 2015 06:59:35 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=441396#p441396</guid>
		</item>
		<item>
			<title><![CDATA[Re: Centos 7, monit не работает как полагается]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=441391#p441391</link>
			<description><![CDATA[<p>решено</p>]]></description>
			<author><![CDATA[null@example.com (Eof)]]></author>
			<pubDate>Wed, 21 Jan 2015 05:17:41 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=441391#p441391</guid>
		</item>
		<item>
			<title><![CDATA[Centos 7, monit не работает как полагается]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=441304#p441304</link>
			<description><![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>]]></description>
			<author><![CDATA[null@example.com (Eof)]]></author>
			<pubDate>Tue, 20 Jan 2015 13:33:01 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=441304#p441304</guid>
		</item>
	</channel>
</rss>
