`
zyz
  • 浏览: 25437 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

MMonit安装

 
阅读更多
监控机安装M/Monit
1、安装M/Monit
M/Monit是一个管理monit的web-interface,M/Monit解压后就能运行。目前最新为M/Monit 2.4。

cd /root
wget http://mmonit.com/dist/mmonit-2.4-linux-x86.tar.gz
tar -zxvf mmonit-2.4-linux-x86.tar.gz
mv mmonit-2.4 mmonit

2、运行mmonit

cd /root/mmonit
./bin/mmonit


浏览器访问http://监控机IP:8080,默认用户名、密码:admin swordfish登陆。数据库使用自带的sqlite。

这是简单安装,如果你要使用比较高级的配置,例如不用数据库,使用其他数据库等

这个时候可以打开http:监控机(就是安装了M/Monit的那台机器):8080

就出现了登陆界面

默认用户名是:admin 密码是:swordfish

也可以用monit,monit登录,但是这个权限不是管理员权限,主要是用来给客户机使用链接MMonit的

如此登陆之后只有空界面,没有任何机器在被监控,

注意MMonit客户端支持的只有5.2以后的版本,之前的 版本不支持


还需要在客户机设置,打开monitrc配置文件,然后设在set mmonit http://monit:monit@10.10.17.159:8080/collector

如此MMonit就能够监控这个客户机了




这次出现一个问题,打开客户机,发现配置文件是从/etc/monit/monitrc,而不是从/usr/local/monit/etc/monitrc加载的(我用的是monit 5.3.2版本)

起初是在后者这个配置文件修改的,发现reload之后没有效果,所以察看了一下客户机是从那里加载上来,原因正是如此,然后又把前者的配置文件修改了,reload之后就可以了




配置文件如下:


[plain] view plaincopyprint?
############################################################################### 
## Monit control file 
############################################################################### 
## 
## Comments begin with a '#' and extend through the end of the line. Keywords 
## are case insensitive. All path's MUST BE FULLY QUALIFIED, starting with '/'. 
## 
## Below you will find examples of some frequently used statements. For  
## information about the control file and a complete list of statements and  
## options, please have a look in the Monit manual. 
## 
## 
############################################################################### 
## Global section 
############################################################################### 
## 
## Start Monit in the background (run as a daemon): 

  set daemon 60            # check services at 2-minute intervals 
#   with start delay 240    # optional: delay the first check by 4-minutes (by  
#                           # default Monit check immediately after Monit start) 


## Set syslog logging with the 'daemon' facility. If the FACILITY option is 
## omitted, Monit will use 'user' facility by default. If you want to log to  
## a standalone log file instead, specify the full path to the log file 

# set logfile syslog facility log_daemon                        
  set logfile /var/log/monit.log 


## Set the location of the Monit id file which stores the unique id for the 
## Monit instance. The id is generated and stored on first Monit start. By  
## default the file is placed in $HOME/.monit.id. 

# set idfile /var/.monit.id 
  set idfile /var/lib/monit/id 

## Set the list of mail servers for alert delivery. Multiple servers may be  
## specified using a comma separator. If the first mail server fails, Monit  
# will use the second mail server in the list and so on. By default Monit uses  
# port 25 - it is possible to override this with the PORT option. 

set mailserver localhost  # primary mailserver 
#                backup.bar.baz port 10025,  # backup mailserver on port 10025 
#               localhost                   # fallback relay 


## By default Monit will drop alert events if no mail servers are available.  
## If you want to keep the alerts for later delivery retry, you can use the  
## EVENTQUEUE statement. The base directory where undelivered alerts will be  
## stored is specified by the BASEDIR option. You can limit the maximal queue 
## size using the SLOTS option (if omitted, the queue is limited by space  
## available in the back end filesystem). 

  set eventqueue 
      basedir /var/lib/monit/events # set the base directory where events will be stored 
      slots 100                     # optionally limit the queue size 


## Send status and events to M/Monit (for more informations about M/Monit  
## see http://mmonit.com/). By default Monit registers credentials with  
## M/Monit so M/Monit can smoothly communicate back to Monit and you don't 
## have to register Monit credentials manually in M/Monit. It is possible to 
## disable credential registration using the commented out option below.  
## Though, if safety is a concern we recommend instead using https when 
## communicating with M/Monit and send credentials encrypted. 

set mmonit http://monit:monit@10.10.17.159:8080/collector 
#     # and register without credentials     # Don't register credentials 


## You can set alert recipients whom will receive alerts if/when a  
## service defined in this file has errors. Alerts may be restricted on  
## events by using a filter as in the second example below.  
set alert lai6803695@163.com                       # receive all alerts 
# set alert manager@foo.bar only on { timeout }  # receive just service- 
#                                                # timeout alert 


## Monit has an embedded web server which can be used to view status of  
## services monitored and manage services from a web interface. See the 
## Monit Wiki if you want to enable SSL for the web server.  

set httpd port 2812 and 
    use address localhost  # only accept connection from localhost 
   allow localhost        # allow localhost to connect to the server andi 
   allow 10.10.17.159 
   allow admin:monit      # require user 'admin' with password 'monit' 
#  allow @monit           # allow users of group 'monit' to connect (rw) 
#  allow @users readonly  # allow users of group 'users' to connect readonly 

分享到:
评论

相关推荐

    mmonit监控工具(服务端)

    在CentOS 6.5环境下,mmonit服务端的安装和配置相对简单,使得系统监控变得更加便捷。 ### 1. 安装mmonit服务端 首先,你需要从mmonit官方网站获取最新版本的软件包。对于Linux x64系统,可以下载`mmonit-3.1.2-...

    mmonit_suit.7z

    两个安装程序均为官网原版下载包,为了方便所以才打包在一起。 解压mmonit-3.7.2包,将cr_mmonit372.py放在其目录中(不是bin目录中),在此目录命令行中运行chmod a+x cr_mmonit372.py,再运行./cr_mmonit372.py ...

    mmonit_manual.pdf

    - **安装**:M/Monit提供了详细的安装指南,包括从源代码编译安装、通过包管理器安装以及使用二进制文件安装等多种方式。 - **升级**:随着新版本的发布,用户可以通过手动下载最新版本并覆盖安装,或者使用内置的...

    PyMMonit:用Python编写的MMonit API包装器

    **PyMMonit:Python实现的MMonit API封装库** PyMMonit是一个基于Python编写的库,其主要功能是作为MMonit监控系统的API包装器。MMonit是一款强大的开源监控工具,用于实时监控网络设备、服务器、应用程序等,并在...

    mmonit-mock-listener:用 NodeJS 和 ExpressJS 制作的一个非常简单的 Monit 模拟监听器

    Monit 收集器模拟侦听器 一个非常简单的 nodejs 控制台记录器,记录 Monit 发送给收集器的内容。 有没有想过 Monit 发送给收藏家的...在安装了 nodejs 和 npm 并克隆此项目的 VM 上,执行以下操作: npm install npm

    centos上搭建mobit

    wget http://mmonit.com/monit/dist/monit-5.5.tar.gz tar zxvf monit-5.5.tar.gz cd monit-5.5 ``` 2. **编译安装**: ```bash ./configure --prefix=/usr make make install ``` 在配置过程中可能会遇到...

    IT运维工程师的23个细节进阶.doc

    - Bootstrapping:如使用Kickstart或Cobbler自动化安装操作系统。 - 配置管理工具:Capistrano、Chef、Puppet、Func、SaltStack、Ansible和Rundeck用于自动化部署和配置更新。 2. **监控系统**: - 网络监控:...

    IT-运维工程师的23个细节-进阶.pdf

    1. **自动化工具**:Bootstrapping是自动安装系统的工具,如Kickstart和Cobbler。此外,运维工程师会使用rpmbuild构建RPM包,以及虚拟化技术如Xen、KVM、LXC,以及云平台OpenStack、CloudStack、OpenNebula、...

    IT-运维工程师的23个细节-进阶.doc.docx

    - **Mmonit、Supervisor**:监控进程状态并自动重启异常服务。 ### 日志管理系统 - **Logstash**:用于收集、解析和存储来自不同来源的日志数据。 - **Scribe**:Facebook开发的日志聚合系统,适合大规模部署。 #...

    IT-运维工程师的23个细节-进阶 (2).pdf

    - Bootstrapping:如Kickstart和Cobbler,用于自动化Linux系统的安装过程。 - 配置管理工具:Capistrano、Chef、Puppet、Func、SaltStack、Ansible和Rundeck,用于自动化服务器配置和部署。 2. **虚拟化与云计算*...

    IT-运维工程师的23个细节-进阶 (2).docx

    - Bootstrapping:例如Kickstart和Cobbler用于自动化Linux系统的安装,简化服务器的部署过程。 - 包构建工具:rpmbuild用于构建RPM软件包,方便管理和分发。 - 虚拟化技术:Xen、KVM、LXC提供不同的虚拟化解决...

    最新IT-运维工程师的23个细节-进阶.pdf

    1. **自动化部署与配置**:Bootstrapping工具如Kickstart和Cobbler简化了系统安装过程,而Capistrano、Chef、Puppet、Ansible等配置管理工具则用于自动化应用部署和系统配置,提高效率和一致性。 2. **虚拟化与...

    IT-运维工程师的23个细节-进阶.docx

    1. **Bootstrapping**: Bootstrapping是指自动化系统初始化的过程,例如使用Kickstart、Cobbler等工具进行无人值守安装,以及虚拟化技术如Xen、KVM、LXC,以及云计算平台Openstack、Cloudstack、Opennebula、...

    IT-运维工程师的23个细节-进阶.doc.pdf

    - Bootstrapping技术如Kickstart和Cobbler可以帮助自动安装操作系统,提高效率。 - 软件构建工具如rpmbuild用于构建RPM软件包,简化分发和更新过程。 2. **虚拟化与云计算**: - Xen和KVM是流行的开源虚拟化平台...

Global site tag (gtag.js) - Google Analytics