translated

This commit is contained in:
theo-l 2015-03-07 00:40:02 -03:00
parent 28e0d097d5
commit 360df62ba5
2 changed files with 172 additions and 185 deletions

View File

@ -1,185 +0,0 @@
theo-l Translating
Monitoring Your Network And Servers With Observium
使用Observium来监控你的网络和服务器
================================================================================
### Introduction ###
### 简介###
You have a problem while monitoring your servers, switches or physical machines. **Observium** fits your need. As a free monitoring system, it helps you to monitor your servers remotely. It is an auto-discovering SNMP based network monitoring platform written in PHP which includes support for a wide range of network hardware and operating systems including Cisco, Windows, Linux, HP, NetApp and many other. I will give you the steps to follow while setting up an **Observium** server on Ubuntu 12.04.
在监控你的服务器,交换机或者物理机器时有过问题吗?, **Observium**可以满足你的需求.作为一个免费的监控系统,可以帮助你远程监控你的服务器.它是一个由PHP编写的基于自动发现SNMP的网络监控平台,支持非常广泛的网络硬件和操作系统,包括 Cisco,Windows,Linux,HP,NetApp等.在此我会通过在Ubuntu12.04上设置一个**Observium**服务器的同时提供相应的步骤.
![](https://www.unixmen.com/wp-content/uploads/2015/03/Capture1.png)
Currently there are two different versions of **observium**.
目前存在两种不同的**observium**版本.
- The observium Community is a free tool and licensed under the QPL Open Source license. This version is the best solution for small deployments. It gets security updates each 6 months.
- Observium 社区版本是一个在QPL开源许可证下的免费工具,这个版本时对于较小部署的最好解决方案. 该版本每6个月得到一次安全性更新.
- While the second version, the Observium Professional is distributed under SVN based release mechanism. And it gets daily security updates. This tool is the best for Service Provider and enterprises deployments.
- 第2个版本是Observium Professional, 该版本在基于SVN的发布机制下的发行版. 会得到每日安全性更新. 该工具适用于服务提供商和企业级部署.
For more information you can visit the offcial [website of Observium][1].
更多信息可以通过其官网获得[website of Observium][1].
### System Requirements ###
### 系统需求###
In order to install **Observium** , its necessary to have a server with a fresh installation. The development of **Observium** takes place on Ubuntu LTS and Debian systems, so its recommended to install **Observium** on Ubuntu or Debian because may be issues with other platforms.
为了安装 **Observium**,
This article will guide you on how to install **Observium** on Ubuntu 12.04. For a small **Observium** installation is recommended to use 256MB for the memory and dual core for the process.
### Installing Prerequisites ###
Before installing **Observium** you need to make sure to install all dependencies.
First step is to update your server
sudo apt-get update
Then you need to install all packages required to run Observium.
Observuim need this list of software the run correctly:
- LAMP server
- fping
- Net-SNMP 5.4+
- RRDtool 1.3+
- Graphviz
Requirements for optional features:
- Ipmitool Only if you want to poll IPMI baseboard controllers on servers
- Libvirt-bin Only if you want to monitor remote VM hosts using libvirt
sudo apt-get install libapache2-mod-php5 php5-cli php5-mysql php5-gd php5-mcrypt php5-json php-pear snmp fping mysql-server mysql-client python-mysqldb rrdtool subversion whois mtr-tiny ipmitool graphviz imagemagick libvirt ipmitool
### Creation MySQL Database and User for Observium ###
Now you need to log into MySQL and create database for **Observuim**:
mysql -u root -p
After successful authenticated, you need to create the database.
CREATE DATABASE observium;
The database Name is **Observium**. You will need this information later.
Now, you should create the database administrator.
CREATE USER observiumadmin@localhost IDENTIFIED BY 'observiumpassword';
Next, you need to give this user permissions to administer the database you created.
GRANT ALL PRIVILEGES ON observium.* TO observiumadmin@localhost;
You need to flush the privilege information to disk to activate the new MySQL user:
FLUSH PRIVILEGES;
exit
### Downloading and Installing Observium ###
Now that our system is ready, we can start the installation of Observium.
First step to do is, creating the directory Observium is going to operate out of:
mkdir -p /opt/observium && cd /opt
For the purpose of this tutorial, were going to be using the Community/Open Source Edition of Observium. Download and unpack it.
wget http://www.observium.org/observium-community-latest.tar.gz
tar zxvf observium-community-latest.tar.gz
Now go under Observium directory
cd observium
Copy the default configuration file **config.php.default** to **config.php** and fill out the database config options:
cp config.php.default config.php
nano config.php
----------
/ Database config
$config['db_host'] = 'localhost';
$config['db_user'] = 'observiumadmin';
$config['db_pass'] = 'observiumpassword';
$config['db_name'] = 'observium';
Lets setup the default schema for the MySQL Database:
php includes/update/update.php
Now you need to create directory to store rrd file and change permission to let apache write into the file .
mkdir rrd
chown apache:apache rrd
To help you troubleshooting on case of problem, you need to create logs file.
mkdir -p /var/log/observium
chown apache:apache /var/log/observium
Now you have to create the virtual host configuration for Observium
<VirtualHost *:80>
DocumentRoot /opt/observium/html/
ServerName observium.domain.com
CustomLog /var/log/observium/access_log combined
ErrorLog /var/log/observium/error_log
<Directory "/opt/observium/html/">
AllowOverride All
Options FollowSymLinks MultiViews
</Directory>
</VirtualHost>
Next, you need to enable rewrite functionality for your Apache server.
To enable `mod_rewrite` modules, type this command:
sudo a2enmod rewrite
This module will be enable the next after reboot of Apache service.
sudo service apache2 restart
### Configuring Observium ###
Before log into the web interface, you need to create administrator account (level 10) to Observium
# cd /opt/observium
# ./adduser.php admin adminpassword 10
User admin added successfully.
Next set a cron jobs for the discovery and the poller jobs, create a new file **/etc/cron.d/observium** and add the following contents.
33 */6 * * * root /opt/observium/discovery.php -h all >> /dev/null 2>&1
*/5 * * * * root /opt/observium/discovery.php -h new >> /dev/null 2>&1
*/5 * * * * root /opt/observium/poller-wrapper.py 1 >> /dev/null 2>&1
Reload cron process to take new entries.
# /etc/init.d/cron reload
Youve installed Observium Server! Log into Observium using your browser **http://<Server IP>** and be on your way.
![](https://www.unixmen.com/wp-content/uploads/2015/03/Capture.png)
Enjoy!
--------------------------------------------------------------------------------
via: https://www.unixmen.com/monitoring-network-servers-observium/
作者:[anismaj][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:https://www.unixmen.com/author/anis/
[1]:http://www.observium.org/

View File

@ -0,0 +1,172 @@
使用Observium来监控你的网络和服务器
================================================================================
### 简介###
在监控你的服务器,交换机或者物理机器时有过问题吗?, **Observium**可以满足你的需求.作为一个免费的监控系统,可以帮助你远程监控你的服务器.它是一个由PHP编写的基于自动发现SNMP的网络监控平台,支持非常广泛的网络硬件和操作系统,包括 Cisco,Windows,Linux,HP,NetApp等.在此我会通过在Ubuntu12.04上设置一个**Observium**服务器的同时提供相应的步骤.
![](https://www.unixmen.com/wp-content/uploads/2015/03/Capture1.png)
目前存在两种不同的**observium**版本.
- Observium 社区版本是一个在QPL开源许可证下的免费工具,这个版本时对于较小部署的最好解决方案. 该版本每6个月得到一次安全性更新.
- 第2个版本是Observium Professional, 该版本在基于SVN的发布机制下的发行版. 会得到每日安全性更新. 该工具适用于服务提供商和企业级部署.
更多信息可以通过其官网获得[website of Observium][1].
### 系统需求###
为了安装 **Observium**, 需要具有一个最新安装的服务器。**Observium**是在Ubuntu LTS和Debian系统上进行开发的所以推荐在Ubuntu或Debian上安装**Observium**,因为可能在别的平台上会有一些小问题。
该文章会知道你如何在Ubuntu12.04上进行安装**Observium**。对于小型的**Observium**安装推荐的基础配置要有256MB内存和双核处理器。
### 安装需求 ###
在安装**Observuim**之前,你需要确认安装所有的依赖关系包。
首先,使用下面的命令更新的服务器:
sudo apt-get update
然后你需要安装运行Observuim 所需的全部包。
Observium需要使用下面所列出的软件才能正确的运行
- LAMP server
- fping
- Net-SNMP 5.4+
- RRDtool 1.3+
- Graphviz
对于可选特性的要求:
- Ipmitool - 只有当你想要探寻IPMIIntelligent Platform Management Interface智能平台管理接口基板控制器。
- Libvirt-bin - 只有当你想要使用libvirt进行远程VM主机监控时。
sudo apt-get install libapache2-mod-php5 php5-cli php5-mysql php5-gd php5-mcrypt php5-json php-pear snmp fping mysql-server mysql-client python-mysqldb rrdtool subversion whois mtr-tiny ipmitool graphviz imagemagick libvirt ipmitool
### 为Observium创建MySQL 数据库和用户。
现在你需要登录到MySQL中并为**Observium**创建数据库:
mysql -u root -p
在用户验证成功之后,你需要按照下面的命令创建该数据库。
CREATE DATABASE observium;
数据库名为**Observium**,稍后你会需要这个信息。
现在你需要创建数据库管理员用户。
CREATE USER observiumadmin@localhost IDENTIFIED BY 'observiumpassword';
接下来,你需要给该管理员用户相应的权限来管理创建的数据库。
GRANT ALL PRIVILEGES ON observium.* TO observiumadmin@localhost;
你需要将权限信息写回到磁盘中来激活新的MySQL用户
FLUSH PRIVILEGES;
exit
### 下载并安装 Observium###
现在我们的系统已经准备好了, 可以开始Observium的安装了。
第一步创建Observium将要使用的文件目录
mkdir -p /opt/observium && cd /opt
为了达到本教程的目的我们将会使用Observium的社区/开源版本。使用下面的命令下载并解压:
wget http://www.observium.org/observium-community-latest.tar.gz
tar zxvf observium-community-latest.tar.gz
现在进入到Observium目录。
cd observium
将默认的配置文件'**config.php.default**'复制到'**config.php**',并将数据库配置选项填充到配置文件中:
cp config.php.default config.php
nano config.php
----------
/ Database config
$config['db_host'] = 'localhost';
$config['db_user'] = 'observiumadmin';
$config['db_pass'] = 'observiumpassword';
$config['db_name'] = 'observium';
现在为MySQL数据库设置默认的数据库模式
php includes/update/update.php
现在你需要创建一个文件目录来存储rrd文件并修改其权限以便让apache能将写入到文件中。
mkdir rrd
chown apache:apache rrd
为了在出现问题时进行问题修理,你需要创建日志文件。
mkdir -p /var/log/observium
chown apache:apache /var/log/observium
现在你需要为Observium创建虚拟主机配置。
<VirtualHost *:80>
DocumentRoot /opt/observium/html/
ServerName observium.domain.com
CustomLog /var/log/observium/access_log combined
ErrorLog /var/log/observium/error_log
<Directory "/opt/observium/html/">
AllowOverride All
Options FollowSymLinks MultiViews
</Directory>
</VirtualHost>
下一步你需要让你的Apache服务器的rewrite(重写)功能生效。
为了让'mod_rewrite'生效,输入以下命令:
sudo a2enmod rewrite
该模块在下一次Apache服务重启之后就会生效。
sudo service apache2 restart
###配置Observium###
在登入网络接口之前你需要为Observium创建一个管理员账户级别10
# cd /opt/observium
# ./adduser.php admin adminpassword 10
User admin added successfully.
下一步为发现和探寻工作设置一个cron任务创建一个新的文件**/etc/cron.d/observium** 并在其中添加以下的内容。
33 */6 * * * root /opt/observium/discovery.php -h all >> /dev/null 2>&1
*/5 * * * * root /opt/observium/discovery.php -h new >> /dev/null 2>&1
*/5 * * * * root /opt/observium/poller-wrapper.py 1 >> /dev/null 2>&1
重载cron进程来获取系的人物实体。
# /etc/init.d/cron reload
好啦你已经完成了Observium服务器的安装拉 使用你的浏览器登录到**http://<Server IP>**,然后上路巴。
![](https://www.unixmen.com/wp-content/uploads/2015/03/Capture.png)
尽情享受吧!
--------------------------------------------------------------------------------
via: https://www.unixmen.com/monitoring-network-servers-observium/
作者:[anismaj][a]
译者:[theo-l](https://github.com/theo-l)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:https://www.unixmen.com/author/anis/
[1]:http://www.observium.org/