标签: monit

Monit 系统管理系统的 M/Monit 界面的免费替代品

我真的很喜欢Monit系统管理系统,但我没有 IT 预算来购买 M/Monit 接口,该接口用于管理我们小型大学实验室的多台主机。我检查了基于 Ruby 的 monittr,我看到 Django 人正在做一些事情。谁能给我一些简单的包装器的建议,它可以帮助我从多个服务器中提取信息?

编辑:这个问题如何重复?我不是在问监控工具。在过去的两周里,我大概评估了其中的六个。我在问一个关于非常具体的监控工具的非常具体的问题。我承认,虽然我从ewwhite那里收到的评论可能令人不快, 但这是一个有效的观察。

monitoring monit

12
推荐指数
1
解决办法
2万
查看次数

监视配置重新加载 - 应该重新启动受监视的服务吗?

在 Ubuntu 服务器上运行 Monit 5.4。当我使用 时monit reload,它似乎会重新启动受监控的服务(在这种情况下为 Tomcat 7)。这是预期的行为吗?文档说

reload - 重新初始化正在运行的 Monit 守护进程,守护进程将重新读取其配置,关闭并重新打开日志文件。

我希望它不会重新启动任何服务,而只会重新加载它的配置,这样我就可以更改电子邮件警报和其他内容。

这是输出 monit status

The Monit daemon 5.4 uptime: 15h 0m 

Process 'tomcat7'
  status                            Running
  monitoring status                 Monitored
  pid                               38842
  parent pid                        1
  uptime                            14h 30m 
  children                          0
  memory kilobytes                  3445964
  memory kilobytes total            3445964
  memory percent                    10.4%
  memory percent total              10.4%
  cpu percent                       14.8%
  cpu percent total                 14.8%
  port response time                0.018s to localhost:80 [HTTP via TCP]
  data collected                    Tue, 17 …
Run Code Online (Sandbox Code Playgroud)

ubuntu daemon service monit

12
推荐指数
1
解决办法
2万
查看次数

重新启动崩溃进程的简单方法?

我需要监控在我的网络服务器上运行的几个进程。出于某种原因,清漆目前每天或每两天崩溃一次。我正在使用 monit 据称自动重新启动清漆,但它不起作用。这是我的 Varnish 的 monit.conf 条目。

check process varnish with pidfile /var/run/varnish.pid
    start program = "/etc/init.d/varnish start" with timeout 60 seconds
    stop program = "/etc/init.d/varnish stop"
    if failed host <my server ip> port 80 protocol http
        and request "/blank.html" then restart
    if 3 restarts within 5 cycles then timeout
    group server
Run Code Online (Sandbox Code Playgroud)

日志文件显示,在varnish停止运行后,尝试重新启动之后都失败了。然后最终 monit 停止监视清漆。

有人对我如何解决这个问题有建议吗?或者更好的是,您能否提出其他简单的自动监控和重启崩溃进程的方法?谢谢!

linux monitoring web-server varnish monit

11
推荐指数
1
解决办法
4万
查看次数

如何禁用 Monit 实例启动/停止警报?

每次 monit 守护程序停止或启动时,Monit 都会发送警报。这是令人讨厌且没有用的信息。

根据文档,我设置:

set alert user@mycompany.com but not on { instance }
Run Code Online (Sandbox Code Playgroud)

...应该向该电子邮件发送警报,除非它们属于定义为开始/停止的“实例”类别。

但是,我仍然收到警报。这超级烦人。显然,我一定是遗漏了什么。

我们正在运行 Monit 5.2.4

monit

11
推荐指数
3
解决办法
9617
查看次数

Monit 将 Apache 列为不受监控

我刚刚根据monit 文档安装和配置了 monit。除 Apache 之外的所有服务都列为 Running,但 Apache 表示Not Monitored

monit 配置中的相关行是:

check process apache with pidfile /var/run/httpd.pid
        group www
        start program = "/etc/init.d/httpd start"
        stop program = "/etc/init.d/httpd stop"
        if failed host localhost port 80
        protocol http then restart
        if 5 restarts within 5 cycles then timeout
Run Code Online (Sandbox Code Playgroud)

我可以从服务器访问http://localhost/server-statushttp://localhost。Monit 将 Apache 的监控模式列为active

服务器正在运行 CentOS 5.4。

PID 文件对于父 httpd 服务器是正确的:

[server ~]$ cat /var/run/httpd.pid
2905
[server ~]$ ps auxc | …
Run Code Online (Sandbox Code Playgroud)

monitoring monit apache-2.2

11
推荐指数
1
解决办法
1万
查看次数

监控连接测试频率

我想让 Monit 检查 Web 应用程序的健康状况,经常运行廉价/琐碎的检查,而不那么频繁地运行昂贵/非平凡的检查(例如 1/5 分钟)。我怎样才能告诉它以比每个监视间隔更少的频率检查给定的主机?

monit

8
推荐指数
1
解决办法
4585
查看次数

可以将 Monit 配置为从不取消监视/超时服务吗?

如果服务失败几次,Monit 似乎会放弃重新启动服务,并取消对其进行监控。我在文档中找不到任何关于时间或原因的细节。

我的 Monit 配置将设置如下:

set daemon 10
set logfile /var/log/monit.log
set statefile /var/lib/monit/monit.state
set alert foo@example.com not { nonexist, action, instance }
include /etc/monit/conf.d/*
Run Code Online (Sandbox Code Playgroud)

这是我正在使用的 Monit 规则集的示例:

check process myservice
  with pidfile /var/run/myservice/myservice.pid
  start program = "/home/myservice/current/start-myservice.sh"
    as uid myservice and gid myservice
  stop program = "/home/myservice/current/stop-myservice.sh"
    as uid myservice and gid myservice
  mode active
Run Code Online (Sandbox Code Playgroud)

在我的环境中,我希望它无限期地继续尝试轮询间隔。有没有办法将 monit 配置为从不停止监视服务,即使它没有成功启动?

linux monitoring monit

8
推荐指数
2
解决办法
6555
查看次数

将 runit 与 monit 结合使用有什么意义?

我看到很多人将 monit 与 runit 结合使用。那不是多余的吗?使用 runit 又有什么意义呢?是不是因为它在处理服务时更可靠(因为它不依赖于 pidfiles)?

谢谢!

linux unix monitoring monit runit

8
推荐指数
1
解决办法
1895
查看次数

monit 发送电子邮件不起作用

我正在尝试使用 monit,并使用 gmail 设置电子邮件服务器。配置文件是这样的:

set mailserver smtp.gmail.com port 587
username "someuser@gmail.com" password "password"
using tlsv1
with timeout 30 seconds
Run Code Online (Sandbox Code Playgroud)

我设置了一个警报来测试:

check file alerttest with path /.nonexistent
alert address@gmail.com with reminder on 500 cycles
Run Code Online (Sandbox Code Playgroud)

但是当我使用 monit validate 时,我得到的错误信息是这样的:

Sendmail: error receiving data from the mailserver 'smtp.gmail.com' -- Resource temporarily unavailable
Alert handler failed, retry scheduled for next cycle
'alerttest' file doesn't exist
Sendmail: error receiving data from the mailserver 'smtp.gmail.com' -- Resource temporarily unavailable
'alerttest' trying to restart
Run Code Online (Sandbox Code Playgroud)

任何人有任何想法?非常感谢

smtp gmail monit

8
推荐指数
2
解决办法
2万
查看次数

monit:无法连接到http接口

我正在一个新站点上设置 monit,在此问题中我将其称为 mywebsite.com。我已经设置了访问 monit 的 Web 界面页面的配置,但我无法连接到它。我有一个运行 iptables 的基本防火墙,我想我为 monit 开了一个洞,但我无法连接到 monit 的 Web 界面,我不知道为什么。

我还没有设置任何要监控的东西:我的 monit 配置如下所示:

## Start monit in the background (run as a daemon):
set daemon  120           # check services at 2-minute intervals

set httpd port 2812 and
  use address mywebsite.com  
  allow localhost      
  allow admin:password
Run Code Online (Sandbox Code Playgroud)

我已经用这些规则重新启动了 monit。

我在我的 iptables 配置中为 monit 制定了一条规则,如下所示:

#monit interface
-A OUTPUT -p tcp --dport 2812 -j ACCEPT
-A INPUT -p tcp --dport 2812 -j ACCEPT
Run Code Online (Sandbox Code Playgroud)

然后我将这些规则导入到/sbin/iptables-restore. 当我这样做时,我可以看到 monit 条目 …

linux http iptables monit

8
推荐指数
1
解决办法
2万
查看次数

标签 统计

monit ×10

monitoring ×5

linux ×4

apache-2.2 ×1

daemon ×1

gmail ×1

http ×1

iptables ×1

runit ×1

service ×1

smtp ×1

ubuntu ×1

unix ×1

varnish ×1

web-server ×1