finish translating by GitFuture

This commit is contained in:
gitfuture 2016-07-11 12:32:06 +08:00
parent 015283e8d7
commit 3dce8e6bd0
2 changed files with 112 additions and 115 deletions

View File

@ -1,115 +0,0 @@
Translating by GitFuture
Monitor Linux With Netdata
===
Netdata is a real-time resource monitoring tool with a friendly web front-end developed and maintained by [FireHOL][1]. With this tool, you can read charts representing resource utilization of things like CPUs, RAM, disks, network, Apache, Postfix and more. It is similar to other monitoring software like Nagios; however, Netdata is only for real-time monitoring via a web interface.
### Understanding Netdata
Theres currently no authentication, so if youre concerned about someone getting information about the applications youre running on your system, you should restrict who has access via a firewall policy. The UI is simplified in a way anyone could look at the graphs and understand what theyre seeing, or at least be impressed by your flashy setup.
The web front-end is very responsive and requires no Flash plugin. The UI doesnt clutter things up with unneeded features, but sticks to what it does. At first glance, it may seem a bit much with the hundreds of charts you have access to, but luckily the most commonly needed charts (i.e. CPU, RAM, network, and disk) are at the top. If you wish to drill deeper into the graphical data, all you have to do is scroll down or click on the item in the menu to the right. Netdata even allows you to control the chart with play, reset, zoom and resize with the controls on the bottom right of each chart.
![](https://fedoramagazine.org/wp-content/uploads/2016/06/Capture-1.png)
>Netdata chart control
When it comes down to system resources, the software doesnt need too much either. The creators choose to write the software in C. Netdata doesnt use much more than ~40MB of RAM.
![](https://fedoramagazine.org/wp-content/uploads/2016/06/Capture.png)
>Netdata memory usage
### Download Netdata
To download this software, you can head over to [Netdata GitHub page][2]. Then click the “Clone or download” green button on the left of the page. You should then be presented with two options.
#### Via the ZIP file
One option is to download the ZIP file. This will include everything in the repository; however, if the repository is updated then you will need to download the ZIP file again. Once you download the ZIP file, you can use the `unzip` tool in the command line to extract the contents. Running the following command will extract the contents of the ZIP file into a “`netdata`” folder.
```
$ cd ~/Downloads
$ unzip netdata-master.zip
```
![](https://fedoramagazine.org/wp-content/uploads/2016/06/Capture-2.png)
>Netdata unzipped
ou dont need to add the `-d` option in unzip because their content is inside a folder at the root of the ZIP file. If they didnt have that folder at the root, unzip would have extracted the contents in the current directory (which can be messy).
#### Via git
The next option is to download the repository via git. You will, of course, need git installed on your system. This is usually installed by default on Fedora. If not, you can install git from the command line with the following command.
```
$ sudo dnf install git
```
After installing git, you will need to “clone” the repository to your system. To do this, run the following command.
```
$ git clone https://github.com/firehol/netdata.git
```
This will then clone (or make a copy of) the repository in the current working directory.
### Install Netdata
There are some packages you will need to build Netdata successfully. Luckily, its a single line to install the things you need ([as stated in their installation guide][3]). Running the following command in the terminal will install all of the dependencies you need to use Netdata.
```
$ dnf install zlib-devel libuuid-devel libmnl-devel gcc make git autoconf autogen automake pkgconfig
```
Once the required packages are installed, you will need to cd into the netdata/ directory and run the netdata-installer.sh script.
```
$ sudo ./netdata-installer.sh
```
You will then be prompted to press enter to build and install the program. If you wish to continue, press enter to be on your way!
![](https://cdn.fedoramagazine.org/wp-content/uploads/2016/06/Capture-3-600x341.png)
>Netdata install.
If all goes well, you will have Netdata built, installed, and running on your system. The installer will also add an uninstall script in the same folder as the installer called `netdata-uninstaller.sh`. If you change your mind later, running this script will remove it from your system.
You can see it running by checking its status via systemctl.
```
$ sudo systemctl status netdata
```
### Accessing Netdata
Now that we have Netdata installed and running, you can access the web interface via port 19999. I have it running on a test machine, as shown in the screenshot below.
![](https://cdn.fedoramagazine.org/wp-content/uploads/2016/06/Capture-4-768x458.png)
>An overview of what Netdata running on your system looks like
Congratulations! You now have successfully installed and have access to beautiful displays, graphs, and advanced statistics on the performance of your machine. Whether its for a personal machine so you can show it off to your friends or for getting deeper insight into the performance of your server, Netdata delivers on performance reporting for any system you choose.
--------------------------------------------------------------------------------
via: https://fedoramagazine.org/monitor-linux-netdata/
作者:[Martino Jones][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://fedoramagazine.org/monitor-linux-netdata/
[1]: https://firehol.org/
[2]: https://github.com/firehol/netdata
[3]: https://github.com/firehol/netdata/wiki/Installation

View File

@ -0,0 +1,112 @@
用 Netdata 监控 Linux
=======
Netdata 是一个实时的资源监控工具,它拥有基于 web 的友好界面,由 [FireHQL][1] 开发和维护。通过这个工具,你可以通过图表来了解 CPURAM硬盘网络Apache Postfix等软硬件的资源使用情况。它很像 Nagios 等别的监控软件但是Netdata 仅仅支持通过网络接口进行实时监控。
### 了解 Netdata
目前 Netdata 还没有验证机制如果你担心别人能从你的电脑上获取相关信息的话你应该设置防火墙规则来限制访问。UI 是简化版的,以便用户查看和理解他们看到的表格数据,至少你能够记住它的快速安装。
它的 web 前端响应很快,而且不需要 Flash 插件。 UI 很整洁,保持着 Netdata 应有的特性。粗略的看,你能够看到很多图表,幸运的是绝大多数常用的图表数据(像 CPURAM网络和硬盘都在顶部。如果你想深入了解图形化数据你只需要下滑滚动条或者点击在右边菜单的项目。通过每个图表的右下方的按钮 Netdata 还能让你控制图表的显示,重置,缩放。
![](https://fedoramagazine.org/wp-content/uploads/2016/06/Capture-1.png)
>Netdata 图表控制
Netdata 并不会占用多少系统资源,它占用的内存不会超过 40MB。因为这个软件是作者用 C 语言写的。
![](https://fedoramagazine.org/wp-content/uploads/2016/06/Capture.png)
>Netdata 显示的内存使用情况
### 下载 Netdata
要下载这个软件,你可以从访问 [Netdata GitHub page][2]。然后点击页面左边绿色的 "Clone or download" 按钮 。你应该能看到两个选项。
#### 通过 ZIP 文件下载
另一种方法是下载 ZIP 文件。它包含在仓库的所有东西。但是如果仓库更新了,你需要重新下载 ZIP 文件。下载完 ZIP 文件后,你要用 `unzip` 命令行工具来解压文件。运行下面的命令能把 ZIP 文件的内容解压到 `netdata` 文件夹。
```
$ cd ~/Downloads
$ unzip netdata-master.zip
```
![](https://fedoramagazine.org/wp-content/uploads/2016/06/Capture-2.png)
>解压 Netdata
没必要在 unzip 命令后加上 `-d` 选项,因为文件都是是放在 ZIP 文件里的一个文件夹里面。如果没有那个文件夹, unzip 会把所有东西都解压到当前目录下面(这会让文件非常混乱)。
#### 通过 Git 下载
还有一种方式是通过 git 下载整个仓库。当然,你的系统需要安装 git。Git 在 Fedora 系统是默认安装的。如果没有安装,你可以用下面的命令在命令行里安装 git。
```
$ sudo dnf install git
```
安装好 git 后,你要把仓库 “clone” 到你的系统里。运行下面的命令。
```
$ git clone https://github.com/firehol/netdata.git
```
这个命令会在当前工作目录克隆(或者说复制一份)仓库。
### 安装 Netdata
有些软件包是你成功构造 Netdata 时候需要的。 还好,一行命令就可以安装你所需要的东西([as stated in their installation guide][3])。在命令行运行下面的命令就能满足安装 Netdata 需要的所有依赖关系。
```
$ dnf install zlib-devel libuuid-devel libmnl-devel gcc make git autoconf autogen automake pkgconfig
```
当所有需要的软件包都安装好了,你就 cd 到 netdata/ 目录,运行 netdata-installer.sh 脚本。
```
$ sudo ./netdata-installer.sh
```
然后就会提示你按回车键,开始安装程序。如果要继续的话,就按下回车吧。
![](https://cdn.fedoramagazine.org/wp-content/uploads/2016/06/Capture-3-600x341.png)
>Netdata 的安装。
如果一切顺利,你的系统上就已经安装并且运行了 Netdata。安装脚本还会在相应的文件夹里添加一个卸载脚本叫做 `netdata-uninstaller.sh`。如果你以后不想使用 Netdata运行这个脚本可以从你的系统里面卸载掉 Netdata。
你可以通过 systemctl 查看它的运行状态。
```
$ sudo systemctl status netdata
```
### 使用 Netdata
既然我们已经安装并且运行了 Netdata你就能够通过 19999 端口来访问 web 界面。下面的截图是我在一个测试机器上运行的 Netdata。
![](https://cdn.fedoramagazine.org/wp-content/uploads/2016/06/Capture-4-768x458.png)
>关于 Netdata 运行时的概览
恭喜你已经成功安装并且能够看到关于你的机器性能的完美显示图形和高级的统计数据。无论是否是你个人的机器你都可以向你的朋友们炫耀因为你能够深入的了解你的服务器性能Netdata 在任何机器上的性能报告都非常出色。
--------------------------------------------------------------------------------
via: https://fedoramagazine.org/monitor-linux-netdata/
作者:[Martino Jones][a]
译者:[GitFuture](https://github.com/GitFuture)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://fedoramagazine.org/monitor-linux-netdata/
[1]: https://firehol.org/
[2]: https://github.com/firehol/netdata
[3]: https://github.com/firehol/netdata/wiki/Installation