设为首页收藏本站

LinuxTone | 运维专家网论坛 - 最棒的Linux运维与开源架构技术交流社区!

 找回密码
 注册

用新浪微博连接

一步搞定

QQ登录

只需一步,快速开始

查看: 3198|回复: 23

【Nagios-3.2】安装与配置-PDF   [复制链接]

Rank: 6Rank: 6

签到
26
注册时间
2010-8-13
最后登录
2012-1-19
在线时间
47 小时
阅读权限
70
积分
1802
帖子
21
主题
7
精华
0
UID
10099
发表于 2010-9-9 12:54:08 |显示全部楼层
本帖最后由 wbftp 于 2010-9-9 13:12 编辑

   

软件下载
Nagios             http://sourceforge.net/projects/nagios/files/nagios-3.x/nagios-3.2.1/nagios-3.2.1.tar.gz
Nagios-plugins  http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.15.tar.gz
Pnp4nagios      http://sourceforge.net/projects/pnp4nagios/files/PNP-0.6/pnp4nagios-0.6.6.tar.gz/download
Nrpe                http://prdownloads.sourceforge.net/sourceforge/nagios/nrpe-2.12.tar.gz


Nagios服务端安装

Nagios安装
  1. # useradd nagios -s /sbin/nologin
  2. # tar jxvf nagios-cn-3.2.0.tar.bz2
  3. # cd nagios-cn-3.2.0
  4. # ./configure --prefix=/usr/local/nagios \
  5.                    --with-nagios-user=nagios \
  6.                    --with-nagios-group=nagios
  7. # make all
  8. # make install
  9. # make install-commandmode
  10. # make install-config
复制代码

Nagios-plugins 安装
  1. # tar zxvf  nagios-plugins-1.4.15.tar.gz   
  2. # cd nagios-plugins-1.4.15
  3. # ./configure --prefix=/usr/local/nagios
  4. # make
  5. # make install
复制代码
Nrpe 安装

  1. # tar zxvf nrpe-2.12.tar.gz
  2. # cd nrpe-2.12
  3. # ./configure --prefix=/usr/local/nrpe
  4. # make
  5. # make install
复制代码


权限设置
# chown –R nagios:nagios /usr/local/nagios


......
附件: 你需要登录才可以下载或查看附件。没有帐号?注册

Rank: 8Rank: 8

注册时间
2009-11-17
最后登录
2012-2-4
在线时间
304 小时
阅读权限
90
积分
18682
帖子
388
主题
21
精华
0
UID
6686
发表于 2010-9-9 17:43:39 |显示全部楼层
楼主3.2.1_cn 里面的张XXX的信息是怎么去掉的,他汉化的 居然还搞名字在里面................

使用道具 举报

Rank: 8Rank: 8

注册时间
2009-11-17
最后登录
2012-2-4
在线时间
304 小时
阅读权限
90
积分
18682
帖子
388
主题
21
精华
0
UID
6686
发表于 2010-9-9 17:48:35 |显示全部楼层
楼主贴下word 嘎嘎

使用道具 举报

Rank: 8Rank: 8

注册时间
2009-11-17
最后登录
2012-2-4
在线时间
304 小时
阅读权限
90
积分
18682
帖子
388
主题
21
精华
0
UID
6686
发表于 2010-9-9 21:13:25 |显示全部楼层
我记得3.2cn汉化版装好之后有汉化作者的相关信息,并且他还添加了他自己的 田朝阳家用机什么的,看楼主用的汉化版没有,不知道是去掉了呢,(如果去掉该改哪里)还是版本不一样,期待解答下

使用道具 举报

Rank: 6Rank: 6

注册时间
2010-8-13
最后登录
2012-1-19
在线时间
47 小时
阅读权限
70
积分
1802
帖子
21
主题
7
精华
0
UID
10099
发表于 2010-9-10 11:38:41 |显示全部楼层
回复 4# huangxiaolu


   配置文件不要他自带的,自已添加配置文件就是了!

使用道具 举报

Rank: 1

注册时间
2009-9-1
最后登录
2011-6-21
在线时间
5 小时
阅读权限
10
积分
18
帖子
4
主题
0
精华
0
UID
5134
发表于 2010-9-10 11:46:29 |显示全部楼层
原来有汉化版啊...

使用道具 举报

Rank: 8Rank: 8

注册时间
2008-11-13
最后登录
2012-2-3
在线时间
168 小时
阅读权限
90
积分
3848
帖子
64
主题
2
精华
0
UID
548
发表于 2010-9-11 11:45:53 |显示全部楼层
文档是我见过,写得比较好的哈!帮你顶起。

使用道具 举报

Rank: 2

注册时间
2010-4-20
最后登录
2011-11-10
在线时间
25 小时
阅读权限
20
积分
159
帖子
43
主题
0
精华
0
UID
8954
发表于 2010-9-12 17:59:19 |显示全部楼层
sms没email配置

使用道具 举报

Rank: 2

注册时间
2010-4-20
最后登录
2011-11-10
在线时间
25 小时
阅读权限
20
积分
159
帖子
43
主题
0
精华
0
UID
8954
发表于 2010-9-12 19:23:40 |显示全部楼层
[root@nagios-S bin]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg -d

Nagios Core 3.2.0
Copyright (c) 2009 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-12-2009
License: GPL

Website: http://www.nagios.org
Reading configuration data...
   Read main config file okay...
Processing object config file '/usr/local/nagios/etc/objects/commands.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/contacts.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/timeperiods.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/templates.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/localhost.cfg'...
Processing object config directory '/usr/local/nagios/etc/linux'...
Error: Template ' host-pnp' specified in host definition could not be not found (config file '/usr/local/nagios/etc/objects/templates.cfg', starting on line 204)
   Error processing object config files!


***> One or more problems was encountered while processing the config files...

     Check your configuration file(s) to ensure that they contain valid
     directives and data defintions.  If you are upgrading from a previous
     version of Nagios, you should be aware that some variables/definitions
     may have been removed or modified in this version.  Make sure to read
     the HTML documentation regarding the config files, as well as the
     'Whats New' section to find out what has changed.

使用道具 举报

Rank: 2

注册时间
2010-4-20
最后登录
2011-11-10
在线时间
25 小时
阅读权限
20
积分
159
帖子
43
主题
0
精华
0
UID
8954
发表于 2010-9-12 19:25:20 |显示全部楼层
全部是按照PDF里面做的!  根本都没办法启动哦~~~

使用道具 举报

Rank: 2

注册时间
2010-4-20
最后登录
2011-11-10
在线时间
25 小时
阅读权限
20
积分
159
帖子
43
主题
0
精华
0
UID
8954
发表于 2010-9-12 19:31:44 |显示全部楼层
[root@nagios-S bin]# ./nagios start

Nagios Core 3.2.0
Copyright (c) 2009 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-12-2009
License: GPL

Website: http://www.nagios.org
Error: Cannot open main configuration file '/usr/local/nagios/bin/start' for reading!
Nagios 3.2.0 starting... (PID=19389)
Local time is Sun Sep 12 19:08:47 CST 2010
Bailing out due to one or more errors encountered in the configuration files. Run Nagios from the command line with the -v option to verify your config before restarting. (PID=19389)

使用道具 举报

Rank: 2

注册时间
2010-4-20
最后登录
2011-11-10
在线时间
25 小时
阅读权限
20
积分
159
帖子
43
主题
0
精华
0
UID
8954
发表于 2010-9-12 19:34:02 |显示全部楼层
[root@nagios-S bin]# ./nagiostats

Nagios Stats 3.2.0
Copyright (c) 2003-2008 Ethan Galstad (www.nagios.org)
Last Modified: 08-12-2009
License: GPL

CURRENT STATUS DATA
------------------------------------------------------
Status File:                            /usr/local/nagios/var/status.dat
Status File Age:                        14864d 11h 11m 2s
Status File Version:                    (null)

Program Running Time:                   14864d 11h 11m 2s
Nagios PID:                             0
Used/High/Total Command Buffers:        0 / 0 / 0

Total Services:                         0
Services Checked:                       0
Services Scheduled:                     0
Services Actively Checked:              0
Services Passively Checked:             0
Total Service State Change:             0.000 / 0.000 / 0.000 %
Active Service Latency:                 0.000 / 0.000 / 0.000 sec
Active Service Execution Time:          0.000 / 0.000 / 0.000 sec
Active Service State Change:            0.000 / 0.000 / 0.000 %
Active Services Last 1/5/15/60 min:     0 / 0 / 0 / 0
Passive Service Latency:                0.000 / 0.000 / 0.000 sec
Passive Service State Change:           0.000 / 0.000 / 0.000 %
Passive Services Last 1/5/15/60 min:    0 / 0 / 0 / 0
Services Ok/Warn/Unk/Crit:              0 / 0 / 0 / 0
Services Flapping:                      0
Services In Downtime:                   0

Total Hosts:                            0
Hosts Checked:                          0
Hosts Scheduled:                        0
Hosts Actively Checked:                 0
Host Passively Checked:                 0
Total Host State Change:                0.000 / 0.000 / 0.000 %
Active Host Latency:                    0.000 / 0.000 / 0.000 sec
Active Host Execution Time:             0.000 / 0.000 / 0.000 sec
Active Host State Change:               0.000 / 0.000 / 0.000 %
Active Hosts Last 1/5/15/60 min:        0 / 0 / 0 / 0
Passive Host Latency:                   0.000 / 0.000 / 0.000 sec
Passive Host State Change:              0.000 / 0.000 / 0.000 %
Passive Hosts Last 1/5/15/60 min:       0 / 0 / 0 / 0
Hosts Up/Down/Unreach:                  0 / 0 / 0
Hosts Flapping:                         0
Hosts In Downtime:                      0

Active Host Checks Last 1/5/15 min:     0 / 0 / 0
   Scheduled:                           0 / 0 / 0
   On-demand:                           0 / 0 / 0
   Parallel:                            0 / 0 / 0
   Serial:                              0 / 0 / 0
   Cached:                              0 / 0 / 0
Passive Host Checks Last 1/5/15 min:    0 / 0 / 0
Active Service Checks Last 1/5/15 min:  0 / 0 / 0
   Scheduled:                           0 / 0 / 0
   On-demand:                           0 / 0 / 0
   Cached:                              0 / 0 / 0
Passive Service Checks Last 1/5/15 min: 0 / 0 / 0

External Commands Last 1/5/15 min:      0 / 0 / 0

使用道具 举报

Rank: 2

注册时间
2010-4-20
最后登录
2011-11-10
在线时间
25 小时
阅读权限
20
积分
159
帖子
43
主题
0
精华
0
UID
8954
发表于 2010-9-12 19:35:02 |显示全部楼层
/usr/local/nagios/var/status.dat这个文件需要自己创建!
/usr/local/apache/bin/htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
这个也没有!

使用道具 举报

Rank: 2

注册时间
2010-4-20
最后登录
2011-11-10
在线时间
25 小时
阅读权限
20
积分
159
帖子
43
主题
0
精华
0
UID
8954
发表于 2010-9-12 19:40:47 |显示全部楼层
崩溃了!!!

使用道具 举报

Rank: 6Rank: 6

注册时间
2010-8-13
最后登录
2012-1-19
在线时间
47 小时
阅读权限
70
积分
1802
帖子
21
主题
7
精华
0
UID
10099
发表于 2010-9-13 09:24:06 |显示全部楼层
回复 9# bacis1


    Error: Template ' host-pnp' specified in host definition could not be not found (config file '/usr/local/nagios/etc/objects/templates.cfg', starting on line 204)
   Error processing object config files!


你的/usr/local/nagios/etc/objects/templates.cfg配置文件里没有下面配置吧。
define host {
            name host-pnp
            register 0
            action_url /pnp4nagios/index.php?host=$HOSTNAME$
           }

加上在启动,试试!

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

IT运维专家网感谢红之盟网络提供带宽支持

合作联系: QQ:67888954/MSN:cnseek@msn.com/mail:netseek@linuxtone.org

Archiver|手机版|感谢所有关心和支持过LinuxTone的朋友们 转载本站内容请注明原作者名及出处 ( 京ICP备08103151 )   |

GMT+8, 2012-2-4 19:10 , Processed in 0.086273 second(s), 12 queries , Memcache On.

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部