“UbuntuHelp:Nagios2”的版本间的差异
来自Ubuntu中文
小 |
小 |
||
第1行: | 第1行: | ||
{{From|https://help.ubuntu.com/community/Nagios2}} | {{From|https://help.ubuntu.com/community/Nagios2}} | ||
{{Languages|UbuntuHelp:Nagios2}} | {{Languages|UbuntuHelp:Nagios2}} | ||
− | |||
− | |||
This page describes how to install and configure Nagios2 on Edgy Eft. To my knowledge, Nagios2 is not in the Dapper Drake repositories. Since Monitoring should be carried out by a separate host, it should not be a hardship to use Edgy, even if all your other servers run Dapper. Your situation may be different. The information in this guide '''might''' be useful for a Dapper configuration. | This page describes how to install and configure Nagios2 on Edgy Eft. To my knowledge, Nagios2 is not in the Dapper Drake repositories. Since Monitoring should be carried out by a separate host, it should not be a hardship to use Edgy, even if all your other servers run Dapper. Your situation may be different. The information in this guide '''might''' be useful for a Dapper configuration. | ||
− | |||
== Introduction == | == Introduction == | ||
− | |||
Nagios is an open source host, service and network monitoring program. The official homepage is http://nagios.org/ | Nagios is an open source host, service and network monitoring program. The official homepage is http://nagios.org/ | ||
− | |||
== Installation == | == Installation == | ||
Nagios is in the Universe repository. To install: | Nagios is in the Universe repository. To install: | ||
第15行: | 第10行: | ||
</nowiki></pre> | </nowiki></pre> | ||
== Initial Configuration == | == Initial Configuration == | ||
− | |||
This is the basic configuration to get Nagios2 running before you add your site specific tests. | This is the basic configuration to get Nagios2 running before you add your site specific tests. | ||
− | + | * Setup htpasswd file for web access | |
− | + | ||
The configuration for authentication is in /etc/nagios2/apache2.conf. The default htpasswd file is /etc/nagios2/htpasswd.users, which does '''not''' exist upon installation. | The configuration for authentication is in /etc/nagios2/apache2.conf. The default htpasswd file is /etc/nagios2/htpasswd.users, which does '''not''' exist upon installation. | ||
<pre><nowiki> | <pre><nowiki> | ||
第24行: | 第17行: | ||
sudo htpasswd -c htpasswd.users nagiosadmin | sudo htpasswd -c htpasswd.users nagiosadmin | ||
</nowiki></pre> | </nowiki></pre> | ||
− | + | * If you want to use something other then nagiosadmin as your user, that is fine, just make the necessary adjustments to /etc/nagios2/cgi.cfg. Wherever it says nagiosadmin change it. | |
− | + | ||
That's all to get it running! Navigate to http://nagios_server/nagios2 and log in to see your systems monitor. By default it monitors the machine it runs on and it's gateway to the Internet. | That's all to get it running! Navigate to http://nagios_server/nagios2 and log in to see your systems monitor. By default it monitors the machine it runs on and it's gateway to the Internet. | ||
− | |||
== Further Configuration == | == Further Configuration == | ||
− | + | * Add a custom directory for your *.cfg files | |
− | + | ||
<pre><nowiki> | <pre><nowiki> | ||
sudo mkdir /etc/nagios2/mysite | sudo mkdir /etc/nagios2/mysite | ||
</nowiki></pre> | </nowiki></pre> | ||
− | + | * Tell nagios where to look for your *.cfg files. Add the following to /etc/nagios2/nagios.cfg, near the similar options: | |
<pre><nowiki> | <pre><nowiki> | ||
cfg_dir=/etc/nagios2/mysite | cfg_dir=/etc/nagios2/mysite | ||
</nowiki></pre> | </nowiki></pre> | ||
− | |||
I have included below a sample config file which you would put in your mysite directory. I don't know if this is the best way, but this is how I finally got up and going. | I have included below a sample config file which you would put in your mysite directory. I don't know if this is the best way, but this is how I finally got up and going. | ||
− | |||
<pre><nowiki> | <pre><nowiki> | ||
define host{ | define host{ | ||
第49行: | 第37行: | ||
use generic-host | use generic-host | ||
} | } | ||
− | |||
define service{ | define service{ | ||
host_name myotherhost | host_name myotherhost | ||
第57行: | 第44行: | ||
} | } | ||
</nowiki></pre> | </nowiki></pre> | ||
− | |||
For more information, refer to http://nagios.sourceforge.net/docs/2_0/xodtemplate.html | For more information, refer to http://nagios.sourceforge.net/docs/2_0/xodtemplate.html | ||
− | |||
---- | ---- | ||
[[category:CategoryDocumentation]] | [[category:CategoryDocumentation]] | ||
[[category:UbuntuHelp]] | [[category:UbuntuHelp]] |
2007年11月30日 (五) 20:45的版本
点击翻译: |
English |
请不要直接编辑翻译本页,本页将定期与来源同步。 |
This page describes how to install and configure Nagios2 on Edgy Eft. To my knowledge, Nagios2 is not in the Dapper Drake repositories. Since Monitoring should be carried out by a separate host, it should not be a hardship to use Edgy, even if all your other servers run Dapper. Your situation may be different. The information in this guide might be useful for a Dapper configuration.
Introduction
Nagios is an open source host, service and network monitoring program. The official homepage is http://nagios.org/
Installation
Nagios is in the Universe repository. To install:
sudo apt-get install nagios2 nagios-plugins nagios-images
Initial Configuration
This is the basic configuration to get Nagios2 running before you add your site specific tests.
- Setup htpasswd file for web access
The configuration for authentication is in /etc/nagios2/apache2.conf. The default htpasswd file is /etc/nagios2/htpasswd.users, which does not exist upon installation.
cd /etc/nagios2/ sudo htpasswd -c htpasswd.users nagiosadmin
- If you want to use something other then nagiosadmin as your user, that is fine, just make the necessary adjustments to /etc/nagios2/cgi.cfg. Wherever it says nagiosadmin change it.
That's all to get it running! Navigate to http://nagios_server/nagios2 and log in to see your systems monitor. By default it monitors the machine it runs on and it's gateway to the Internet.
Further Configuration
- Add a custom directory for your *.cfg files
sudo mkdir /etc/nagios2/mysite
- Tell nagios where to look for your *.cfg files. Add the following to /etc/nagios2/nagios.cfg, near the similar options:
cfg_dir=/etc/nagios2/mysite
I have included below a sample config file which you would put in your mysite directory. I don't know if this is the best way, but this is how I finally got up and going.
define host{ host_name myotherhost alias My Other Host address 192.168.1.101 parents localhost use generic-host } define service{ host_name myotherhost service_description PING check_command check_ping!100.0,20%!500.0,60% use generic-service }
For more information, refer to http://nagios.sourceforge.net/docs/2_0/xodtemplate.html