Nagios是一款开源的免费网络监视工具,能有效监控Windows、Linux和Unix的主机状态,交换机路由器等网络设置,打印机等。在系统或服务状态异常时发出邮件或短信报警第一时间通知网站运维人员,在状态恢复后发出正常的邮件或短信通知。

Nagiosql 安装的配置方法(一个web配置nagios的工具)

NagiosQL 本人已经在使用中,它本身的导入功能非常强大,不用自己去处理以前的nagios配置文件,它会自己就处理出来,每台主机hosts是一个配 置,services都在一个配置文件里,一开始用起来不是很习惯,但是当你发现了他的好处你就会爱上他的,那么现在就跟我一起探索nagiosql的神 秘之旅吧。

官网网站  http://www.nagiosql.org/

nagiosql是一个web配置nagios的工具,可以用web页面里添加主机、服务、主机组、服务组、命令、通知组。。。。。等等首先我们在已经安装好apache、php、nagios目录位置如下:apache /home/nagios/httpd
php /home/nagios/php
nagios /home/nagios/nagios先按nagiosql官方的需求说明:
Requirements
Webserver e.g. Apache 1.x or above
PHP 4.3 or above
MySQL 4.1 or above
Nagios 2 or above
PEAR Module: HTML_Template_IT 1.1 or above
PHP Extension: gettext –with-gettext使用这个参数启用
PHP Extension: mysql –with-mysql使用这个参数启用
PHP Extension: ftp –enable-ftp使用这个参数启用
Javascript enabled at your Webbrowser
1、 注意在编译php时候要将gettext、mysql、ftp三个扩展启用。2、安装pear模块方法如下:[nagios@test-22 ~]$ /home/nagios/php/bin/pear install HTML_Template_IT3、下载nagiosql并解压到htdocs目录中,下载地址如下http://www.nagiosql.org /download.html4、创建nagiosql的配置文件目录[nagios@test-22 ~]$ mkdir /home/nagios/nagiosql; \
mkdir /home/nagios/nagiosql/hosts; \
mkdir /home/nagios/nagiosql/services; \
mkdir /home/nagios/nagiosql/backup; \
mkdir /home/nagios/nagiosql/backup/hosts; \
mkdir /home/nagios/nagiosql/backup/services; \
mkdir /home/nagios/nagiosql/import5、先使用旧的配置文件,/home/nagios/nagios/etc /nagios.cfg文件配置文件使用原来的。(hosts和services配置同以前手动配置相 同)################################################################
cfg_file=/home/nagios/nagios/etc/objects/commands.cfg
cfg_file=/home/nagios/nagios/etc/objects/contacts.cfg
cfg_file=/home/nagios/nagios/etc/objects/timeperiods.cfg
cfg_file=/home/nagios/nagios/etc/objects/templates.cfg
################################################################
cfg_file=/home/nagios/nagios/etc/objects/gzmachine_services.cfg
cfg_file=/home/nagios/nagios/etc/objects/gzmachine_hosts.cfg
cfg_file=/home/nagios/nagios/etc/objects/gzmachine_hostgroup.cfg
cfg_file=/home/nagios/nagios/etc/objects/gzmachine_servicegroup.cfg
################################################################6、 将nagiosql解压到htdocs目录中[nagios@test-22 ~]$ cd /home/nagios/httpd/htdocs
[nagios@test-22 htdocs]$ rm -rf nagiosql3
[nagios@test-22 htdocs]$ unzip ~/pkgs/nagiosql303.zip
7、在nagiosql的install目录中touch一个ENABLE_INSTALLER文件(该文件启用安装向导)
[nagios@test-22 htdocs]$ cd nagiosql3/install/
[nagios@test-22 install]$ touch ENABLE_INSTALLER8、选择语言
在出现的向导页面中的Setup Language项选择Chinese(Simplified)》点击开始新安装9、安装检查
向导会自动检查php环境和系统权限。都通过就》点击下一步
10、系统设置部分(按下面的格式填入配置,然后》点击下一步)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
MySQL服务器 127.0.0.1
MySQL服务器端口 3306
数据库名 db_nagiosql_v3
NagiosQL数据库用户 nagiosql_user
NagiosQL数据库密码 nagiosql_pass
如果数据库存在是否删除? (如果是第一次安装不需要打勾)
Mysql管理用户 root
MySQL管理密码 root
初始Nagios登录 admin
初始NagiosQL密码 admin
请重复输入密码 admin
Nagios参考配置文件
导入Nagios参考配置 (如果是新手,可以导入进行学习)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++11、 提示安装完成NagiosQL Installation: 完成安装12、删除ENABLE_INSTALLER后》点击完成
[nagios@test-22 install]$ rm /home/nagios/httpd/htdocs/nagiosql3/install/ENABLE_INSTALLER
13、 导入现有nagios的配置文件到nagiosql配置文件中访问http://192.168.4.131:8080/nagiosql3 /index.php访问你安装好的nagiosql14、配置nagios和nagiosql的关联(配置路径)点击管理》域》点击右边的 localhost进行修改
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++域* localhost
描述* Local installation
服务器名* localhost
方法 Fileaccess配置目录
基目录* /home/nagios/nagiosql
主机目录* /home/nagios/nagiosql/hosts/
服务目录* /home/nagios/nagiosql/services/
备份目录* /home/nagios/nagiosql/backup/
主机备份目录* /home/nagios/nagiosql/backup/hosts/
服务备份目录* /home/nagios/nagiosql/backup/services/
Nagios基目录* /home/nagios/nagios/etc
导入路径 /home/nagios/nagiosql/import/Nagios命令文件 /home/nagios/nagios/var/rw/nagios.cmd
Nagios执行文件 /home/nagios/nagios/bin/nagios
Nagios 进程文件 /home/nagios/nagios/var /nagios.lock++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 完成上面的填入后》点击完成。15、导入Nagios配置到nagiosql中点击工具》导入数据》按住Crtl后多先以下这些文件》点击导入。
commands.cfg gzmachine_hostgroup.cfg gzmachine_servicegroup.cfg templates.cfg
contacts.cfg gzmachine_hosts.cfg gzmachine_services.cfg timeperiods.cfg16、为nagiosql添加好权限
[nagios@test-22 ~]$ chown -R nagios.nagios /home/nagios/nagiosql
[nagios@test-22 ~]$ chmod -R 775 /home/nagios/nagiosql
17、写入nagiosql配置文件17.1、写入检测数据(会根据所导入的数据生成hosts、hostgroup、services、servicegroup之类文件)点击工具》Nagios控制》写入检测数据》提交
此时会在/home/nagios/nagiosql目录中生成如下文件
hostgroups.cfg
hosttemplates.cfg
servicegroups.cfg
servicetemplates.cfg
在/home/nagios/nagiosql/hosts目录生成对应已有主机台数数量的主机配置文件
在/home/nagios/nagiosql/services目录中生成services的文件
17.2、写入其他数据(会根据所导入的数据生成command、timeperiods.cfg、contacts.cfg 等文件)点击工具》Nagios控制》写入其它数据》提交此时会在/home/nagios/nagiosql目录中生成如下文件
commands.cfg
contacts.cfg
timeperiods.cfg
servicetemplates.cfg
.
.
.
.18、关闭nagios配置文件,应用nagiosql配置文件
[nagios@test-22 ~]$ vim /home/nagios/nagios/etc/nagios.cfg将以下项注释掉(nagios原来的配置文件,因为已经导入到nagiosql配 置中,所以需要关 闭)################################################################
#cfg_file=/home/nagios/nagios/etc/objects/commands.cfg
#cfg_file=/home/nagios/nagios/etc/objects/contacts.cfg
#cfg_file=/home/nagios/nagios/etc/objects/timeperiods.cfg
#cfg_file=/home/nagios/nagios/etc/objects/templates.cfg
################################################################
#cfg_file=/home/nagios/nagios/etc/objects/gzmachine_services.cfg
#cfg_file=/home/nagios/nagios/etc/objects/gzmachine_hosts.cfg
#cfg_file=/home/nagios/nagios/etc/objects/gzmachine_hostgroup.cfg
#cfg_file=/home/nagios/nagios/etc/objects/gzmachine_servicegroup.cfg
################################################################将以下项打开(naigosql配置文件,用于替代nagios的配置文件)
################################################################
cfg_dir=/home/nagios/nagiosql/hosts/
cfg_dir=/home/nagios/nagiosql/services/

cfg_file=/home/nagios/nagiosql/commands.cfg
cfg_file=/home/nagios/nagiosql/contactgroups.cfg
cfg_file=/home/nagios/nagiosql/contacts.cfg
cfg_file=/home/nagios/nagiosql/contacttemplates.cfg
cfg_file=/home/nagios/nagiosql/hostdependencies.cfg
cfg_file=/home/nagios/nagiosql/hostescalations.cfg
cfg_file=/home/nagios/nagiosql/hostextinfo.cfg
cfg_file=/home/nagios/nagiosql/hostgroups.cfg
cfg_file=/home/nagios/nagiosql/hosttemplates.cfg
cfg_file=/home/nagios/nagiosql/servicedependencies.cfg
cfg_file=/home/nagios/nagiosql/serviceescalations.cfg
cfg_file=/home/nagios/nagiosql/serviceextinfo.cfg
cfg_file=/home/nagios/nagiosql/servicegroups.cfg
cfg_file=/home/nagios/nagiosql/servicetemplates.cfg
cfg_file=/home/nagios/nagiosql/timeperiods.cfg
################################################################

19、登入nagiosql的web界面,http://IP>/ nagiosQL,就可以添加主机和服务了。下面我们试着添加一台主机:19.1、上图了

保存后》写入配置》管理》工具》Nagios控制》写入检测数据》提交》重新启动Nagios》提交
我们添加的主机就出现了

--------------------------------------

nagiosql是一个web配置nagios的工具,可以用web页面里添加主机、服务、主机组、服务组、命令、通知组。。。。。等等

首先我们在已经安装好apache、php、nagios目录位置如下:

apache    /home/nagios/httpd
php       /home/nagios/php
nagios    /home/nagios/nagios

先按nagiosql官方的需求说明:

Requirements

  • Webserver e.g. Apache 1.x or above

  • PHP 4.3 or above

  • MySQL 4.1 or above

  • Nagios 2 or above

  • PEAR Module: HTML_Template_IT 1.1 or above

  • PHP Extension: gettext --with-gettext使用这个参数启用

  • PHP Extension: mysql --with-mysql使用这个参数启用

  • PHP Extension: ftp --enable-ftp使用这个参数启用

  • Javascript enabled at your Webbrowser

1、注意在编译php时候要将gettext、mysql、ftp三个扩展启用。

2、安装pear模块方法如下:

[nagios@test-22 ~]$ /home/nagios/php/bin/pear install HTML_Template_IT

3、下载nagiosql并解压到htdocs目录中,下载地址如下

http://www.nagiosql.org/download.html

4、创建nagiosql的配置文件目录

[nagios@test-22 ~]$ mkdir /home/nagios/nagiosql; \
mkdir /home/nagios/nagiosql/hosts; \
mkdir /home/nagios/nagiosql/services; \
mkdir /home/nagios/nagiosql/backup; \
mkdir /home/nagios/nagiosql/backup/hosts; \
mkdir /home/nagios/nagiosql/backup/services; \
mkdir /home/nagios/nagiosql/import

5、先使用旧的配置文件,/home/nagios/nagios/etc/nagios.cfg文件配置文件使用原来的。(hosts和services配置同以前手动配置相同)

################################################################
cfg_file=/home/nagios/nagios/etc/objects/commands.cfg
cfg_file=/home/nagios/nagios/etc/objects/contacts.cfg
cfg_file=/home/nagios/nagios/etc/objects/timeperiods.cfg
cfg_file=/home/nagios/nagios/etc/objects/templates.cfg
################################################################
cfg_file=/home/nagios/nagios/etc/objects/gzmachine_services.cfg
cfg_file=/home/nagios/nagios/etc/objects/gzmachine_hosts.cfg
cfg_file=/home/nagios/nagios/etc/objects/gzmachine_hostgroup.cfg
cfg_file=/home/nagios/nagios/etc/objects/gzmachine_servicegroup.cfg
################################################################

6、将nagiosql解压到htdocs目录中

[nagios@test-22 ~]$ cd /home/nagios/httpd/htdocs
[nagios@test-22 htdocs]$ rm -rf nagiosql3
[nagios@test-22 htdocs]$ unzip ~/pkgs/nagiosql303.zip
7、在nagiosql的install目录中touch一个ENABLE_INSTALLER文件(该文件启用安装向导)
[nagios@test-22 htdocs]$ cd nagiosql3/install/
[nagios@test-22 install]$ touch ENABLE_INSTALLER

8、选择语言
在出现的向导页面中的Setup Language项选择Chinese(Simplified)》点击开始新安装

9、安装检查
向导会自动检查php环境和系统权限。都通过就》点击下一步
10、系统设置部分(按下面的格式填入配置,然后》点击下一步)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
MySQL服务器                    127.0.0.1
MySQL服务器端口                3306
数据库名                       db_nagiosql_v3
NagiosQL数据库用户             nagiosql_user
NagiosQL数据库密码             nagiosql_pass
如果数据库存在是否删除?       (如果是第一次安装不需要打勾)
Mysql管理用户                  root
MySQL管理密码                  root

初始Nagios登录             admin
初始NagiosQL密码               admin
请重复输入密码                 admin

Nagios参考配置文件
导入Nagios参考配置             (如果是新手,可以导入进行学习)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

11、提示安装完成

NagiosQL Installation: 完成安装

12、删除ENABLE_INSTALLER后》点击完成
[nagios@test-22 install]$ rm /home/nagios/httpd/htdocs/nagiosql3/install/ENABLE_INSTALLER

13、导入现有nagios的配置文件到nagiosql配置文件中

访问http://192.168.4.131:8080/nagiosql3/index.php访问你安装好的nagiosql

14、配置nagios和nagiosql的关联(配置路径)

点击管理》域》点击右边的localhost进行修改
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

域*                        localhost
描述*                      Local installation
服务器名*                  localhost
方法                       Fileaccess

配置目录
基目录*                    /home/nagios/nagiosql
主机目录*                  /home/nagios/nagiosql/hosts/
服务目录*                  /home/nagios/nagiosql/services/
备份目录*                  /home/nagios/nagiosql/backup/
主机备份目录*              /home/nagios/nagiosql/backup/hosts/
服务备份目录*              /home/nagios/nagiosql/backup/services/
Nagios基目录*              /home/nagios/nagios/etc
导入路径                   /home/nagios/nagiosql/import/

Nagios命令文件             /home/nagios/nagios/var/rw/nagios.cmd
Nagios执行文件             /home/nagios/nagios/bin/nagios
Nagios进程文件             /home/nagios/nagios/var/nagios.lock

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

完成上面的填入后》点击完成。

15、导入Nagios配置到nagiosql中

点击工具》导入数据》按住Crtl后多先以下这些文件》点击导入。
commands.cfg  gzmachine_hostgroup.cfg  gzmachine_servicegroup.cfg  templates.cfg
contacts.cfg  gzmachine_hosts.cfg      gzmachine_services.cfg      timeperiods.cfg

16、为nagiosql添加好权限
[nagios@test-22 ~]$ chown -R nagios.nagios /home/nagios/nagiosql
[nagios@test-22 ~]$ chmod -R 775 /home/nagios/nagiosql

17、写入nagiosql配置文件

17.1、写入检测数据(会根据所导入的数据生成hosts、hostgroup、services、servicegroup之类文件)

点击工具》Nagios控制》写入检测数据》提交
此时会在/home/nagios/nagiosql目录中生成如下文件
hostgroups.cfg
hosttemplates.cfg
servicegroups.cfg
servicetemplates.cfg
在/home/nagios/nagiosql/hosts目录生成对应已有主机台数数量的主机配置文件
在/home/nagios/nagiosql/services目录中生成services的文件
17.2、写入其他数据(会根据所导入的数据生成command、timeperiods.cfg、contacts.cfg 等文件)

点击工具》Nagios控制》写入其它数据》提交

此时会在/home/nagios/nagiosql目录中生成如下文件
commands.cfg
contacts.cfg
timeperiods.cfg
servicetemplates.cfg
.
.
.
.

18、关闭nagios配置文件,应用nagiosql配置文件
[nagios@test-22 ~]$ vim /home/nagios/nagios/etc/nagios.cfg

将以下项注释掉(nagios原来的配置文件,因为已经导入到nagiosql配置中,所以需要关闭)

################################################################
#cfg_file=/home/nagios/nagios/etc/objects/commands.cfg
#cfg_file=/home/nagios/nagios/etc/objects/contacts.cfg
#cfg_file=/home/nagios/nagios/etc/objects/timeperiods.cfg
#cfg_file=/home/nagios/nagios/etc/objects/templates.cfg
################################################################
#cfg_file=/home/nagios/nagios/etc/objects/gzmachine_services.cfg
#cfg_file=/home/nagios/nagios/etc/objects/gzmachine_hosts.cfg
#cfg_file=/home/nagios/nagios/etc/objects/gzmachine_hostgroup.cfg
#cfg_file=/home/nagios/nagios/etc/objects/gzmachine_servicegroup.cfg
################################################################

将以下项打开(naigosql配置文件,用于替代nagios的配置文件)
################################################################
cfg_dir=/home/nagios/nagiosql/hosts/
cfg_dir=/home/nagios/nagiosql/services/
 
cfg_file=/home/nagios/nagiosql/commands.cfg
cfg_file=/home/nagios/nagiosql/contactgroups.cfg
cfg_file=/home/nagios/nagiosql/contacts.cfg
cfg_file=/home/nagios/nagiosql/contacttemplates.cfg
cfg_file=/home/nagios/nagiosql/hostdependencies.cfg
cfg_file=/home/nagios/nagiosql/hostescalations.cfg
cfg_file=/home/nagios/nagiosql/hostextinfo.cfg
cfg_file=/home/nagios/nagiosql/hostgroups.cfg
cfg_file=/home/nagios/nagiosql/hosttemplates.cfg
cfg_file=/home/nagios/nagiosql/servicedependencies.cfg
cfg_file=/home/nagios/nagiosql/serviceescalations.cfg
cfg_file=/home/nagios/nagiosql/serviceextinfo.cfg
cfg_file=/home/nagios/nagiosql/servicegroups.cfg
cfg_file=/home/nagios/nagiosql/servicetemplates.cfg
cfg_file=/home/nagios/nagiosql/timeperiods.cfg
################################################################

19、登入nagiosql的web界面,就可以添加主机和服务了。

下面我们试着添加一台主机:

19.1、点击管理》监督》主机》添加

保存后》写入配置》管理》工具》Nagios控制》写入检测数据》提交》重新启动Nagios》提交
我们添加的主机就出现了。。。。哈哈

通过nagiosQL管理nagios非常方便,简单

1.环境: 
ubuntu         9.04 x86_64 
nagios        3.2.1 
nagios-plugins    1.4.14 
lighttpd    1.4.19

2.下载地址 
http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.2.1.tar.gz 
http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.14.tar.gz

web admins 
http://downloads.sourceforge.net/project/nagiosql/nagiosql/NagiosQL%203.0.3/nagiosql303.zip?use_mirror=nchc

3.安装依赖包 
apt-get install  build-essential lighttpd php5-cgi php5-cli php5-curl php5-gd php5-mysql php-html-template-it unzip

4.添加相关用户

useradd nagios passwd nagios usermod -G nagios nagios groupadd nagcmd usermod -G nagcmd nagios usermod -G nagcmd www-data

5.编译安装Nagios

tar xvzf nagios-3.2.1.tar.gz

./configure –with-command-group=nagcmd

make all

make install

make install-init

make install-config

make install-commandmode

cp sample-config/httpd.conf /etc/apache2/sites-enabled/nagios.conf

6.编译安装Nagios插件

tar xvzf nagios-plugins-1.4.14.tar.gz

./configure –with-nagios-user=nagios –with-nagios-group=nagios

make

make install

7.验证Nagios配置文件,启动

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

/etc/init.d/nagios start

8.lighttpd配置

生成auth key

htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin  #回车后输入2次密码

启用php fastcgi

lighty-enable-mod fastcgi

修改Lighttpd主配置文件,添加nagios支持

vi /etc/lighttpd/lighttpd.conf

server.modules              = (

"mod_access",

"mod_alias",

"mod_cgi",

"mod_setenv",

"mod_auth",

"mod_compress"

)

static-file.exclude-extensions = ( ".php", ".pl", ".fcgi", ".cgi" )

alias.url += (

"/nagios/cgi-bin" => "/usr/local/nagios/sbin",

"/nagios"       =>      "/usr/local/nagios/share/"

)

$HTTP["url"] =~ "^/nagios/cgi-bin" {

cgi.assign = ( "" => "" )

}

$HTTP["url"] =~ "^/nagios" {

auth.backend = "htpasswd"

auth.backend.htpasswd.userfile = "/usr/local/nagios/etc/htpasswd.users"

auth.require = ( "" => (

"method" => "basic",

"realm" => "nagios",

"require" => "user=nagiosadmin"

)

)

setenv.add-environment = ( "REMOTE_USER" => "user" )

}

9.安装配置nagiosql

unzip nagiosql303.zip

mv nagiosql3 /www/web/nagadmin

chown -R www-data:www-data /www/web/nagadmin/

cd /www/web/nagadmin/install

touch ENABLE_INSTALLER

http://gaojinbo.com/nagadmin  安装sample数据

lighttpd.conf

alias添加一行,修改为:

alias.url += (

"/nagios/cgi-bin" => "/usr/local/nagios/sbin",

"/nagios"       =>      "/usr/local/nagios/share/",

"/nagadmin"             =>      "/www/web/nagadmin"

)

10.通过web访问配置nagios

http://gaojinbo.com/nagadmin

建立文件夹

mkdir -p /etc/nagiosql/backup/hosts

mkdir -p /etc/nagiosql/backup/services

mkdir -p /etc/nagiosql/hosts

mkdir -p /etc/nagiosql/services

mkdir /etc/nagios

mkdir /etc/nagios/import

touch /etc/nagios/nagios.cfg

touch /etc/nagios/cgi.cfg

Permissions权限设置

chgrp www-data /etc/nagios

chgrp www-data /etc/nagios/nagios.cfg

chgrp www-data /etc/nagios/cgi.cfg

chmod 775 /etc/nagios

chmod 664 /etc/nagios/nagios.cfg

chmod 664 /etc/nagios/cgi.cfg

chgrp www-data /usr/local/nagios/etc/nagios.cfg

chgrp www-data /usr/local/nagios/etc/cgi.cfg

chmod 664 /usr/local/nagios/etc/nagios.cfg

chmod 664 /usr/local/nagios/etc/cgi.cfg

chmod 6755 /etc/nagiosql

chown www-data.nagios /etc/nagiosql

chmod 6755 /etc/nagiosql/hosts

chown www-data.nagios /etc/nagiosql/hosts

chmod 6755 /etc/nagiosql/services

chown www-data.nagios /etc/nagiosql/services   
chmod 6755 /etc/nagiosql/backup

chown www-data.nagios /etc/nagiosql/backup

chmod 6755 /etc/nagiosql/backup/hosts

chown www-data.nagios /etc/nagiosql/backup/hosts

chmod 6755 /etc/nagiosql/backup/services

chown www-data.nagios /etc/nagiosql/backup/services

chmod 644 /etc/nagiosql/*.cfg

chown www-data.nagios /etc/nagiosql/*.cfg

chmod 644 /etc/nagiosql/hosts/*.cfg

chown www-data.nagios /etc/nagiosql/hosts/*.cfg   
chmod 644 /etc/nagiosql/services/*.cfg

chown www-data.nagios /etc/nagiosql/services/*.cfg

修改/usr/local/nagios/etc/nagios.cfg

注释掉所有cfg_file,cfg_dir开始的行,添加以内容到文件最后

#change for hugwww

cfg_file=/etc/nagiosql/contacttemplates.cfg

cfg_file=/etc/nagiosql/contactgroups.cfg

cfg_file=/etc/nagiosql/contacts.cfg

cfg_file=/etc/nagiosql/timeperiods.cfg

cfg_file=/etc/nagiosql/commands.cfg

cfg_file=/etc/nagiosql/hostgroups.cfg

cfg_file=/etc/nagiosql/servicegroups.cfg

cfg_dir=/etc/nagiosql/hosts

cfg_dir=/etc/nagiosql/services

cfg_file=/etc/nagiosql/hosttemplates.cfg

cfg_file=/etc/nagiosql/servicetemplates.cfg

cfg_file=/etc/nagiosql/servicedependencies.cfg

cfg_file=/etc/nagiosql/serviceescalations.cfg

cfg_file=/etc/nagiosql/hostdependencies.cfg

cfg_file=/etc/nagiosql/hostescalations.cfg

cfg_file=/etc/nagiosql/hostextinfo.cfg

cfg_file=/etc/nagiosql/serviceextinfo.cfg

Administration -> Domains -> 修改

Nagios base directory* /usr/local/nagios/etc/

完成!

----------------------------------------------------------------------

Nagios Plugin for Cacti 简称 npc,是cacti的一个插件,这篇文章主要介绍如何在cacti中使用npc插件。

测试环境:
操作系统:rhel4u4 php4.4.4 mysql-4.1.22 httpd-2.2.4
npc主页:http://www.divagater.com/npc/
npc 当前版本:NPC 0.1.1a
nagios 主页:http://www.nagios.org
nagios 当前版本:nagios-2.7
nagios 插件当前版本:nagios-plugins-1.4.6
fruity::图形化配置nagios的工具,需要php5.x版本才能运行

http://fruity.sourceforge.net/
http://heanet.dl.sourceforge.net/sourceforge/fruity/
http://pear.php.net/get/HTML_TreeMenu-1.2.0.tgz
http://puzzle.dl.sourceforge.net/sourceforge/adodb/adodb471-1.tgz
将HTML_TreeMenu-1.2.0.tgz和adodb471-1.tgz直接解压复制到fruity 下 分别改名为HTML 和adodb 其他不做修改
修改 fruity/includes下的config.ifg,需要更改的地方有,路径,mysql信息
mysql 添加fruity 数据库和user,password.
这样,就可以用fruity来进行配置了。
注意:
在cacti服务器上的mysql版本必须是4.1以上,因为npc是以mysql4.1为基础进行开发的。

web配置nagios工具的更多相关文章

  1. 详解Parcel:快速,零配置web应用打包工具。

    译者按: 新一代Web应用打包工具Parcel横空出世,快速.零配置的特点让人眼前一亮. 原文: Everything You Need To Know About Parcel: The Blazi ...

  2. Nagios+pnp4nagios+rrdtool 安装配置nagios(一)

    基于的软件版本 Apache-2.0.63  php-5.3.2 nagios-3.2.3  nagios-plugins-1.4.15  rrdtool-1.4.5 nrpe-2.12 pnp4na ...

  3. CentOS 6.7 安装配置 nagios

    一.简介    Nagios是一款开源的免费网络监视工具,能有效监控Windows.Linux和Unix的主机状态,交换机路由器等网络设置,打印机等.在系统或服务状态异常时发出邮件或短信报警,第一时间 ...

  4. HTTPS Web配置举例

    http://www.h3c.com.cn/Products___Technology/Technology/Security_Encrypt/Other_technology/Representat ...

  5. 跨平台web调试代理工具---whistle

    whistle是基于Node实现的跨平台web调试代理工具,支持windows.mac.linux等所有安装了Node的操作系统,可以部署在本地机器.虚拟机或远程服务器,并通过本地网页查看或修改HTT ...

  6. 如何配置 URLScan 工具

    本文分步说明如何配置 URLScan 工具以防止 Web 服务器受到攻击和利用. 安装 URLScan 要安装 URLScan,请访问下面的 Microsoft Developer Network ( ...

  7. Nikto是一款Web安全扫描工具,可以扫描指定主机的web类型,主机名,特定目录,cookie,特定CGI漏洞,XSS漏洞,SQL注入漏洞等,非常强大滴说。。。

    Nikto是一款Web安全扫描工具,可以扫描指定主机的web类型,主机名,特定目录,cookie,特定CGI漏洞,XSS漏洞,SQL注入漏洞等,非常强大滴说... root@xi4ojin:~# cd ...

  8. 小白日记28:kali渗透测试之Web渗透-扫描工具-Nikto

    扫描工具-Nikto #WEB渗透 靶机:metasploitable 靶场:DVWA[默认账号/密码:admin/password] #新手先将DVWA的安全性,调到最低,可容易发现漏洞 侦察[减少 ...

  9. python的web压力测试工具-pylot安装使用

    http://blog.csdn.net/chenggong2dm/article/details/10106517 pylot是python编写的一款web压力测试工具.使用比较简单.而且测试结果相 ...

随机推荐

  1. Uva 1354 Mobile Computing

    题目链接 题意: 在一个宽为r 的房间里, 有s个砝码, 每个天平的一端要么挂砝码, 要么挂另一个天平, 并且每个天平要保持平衡. 求使得所有砝码都放在天平上, 且总宽度不超过房间宽度的最大值. 思路 ...

  2. LightOj_1321 Sending Packets

    题目链接 题意: 给一个数据大小为S的数据包, 每一次发送需要K秒(单向),现在要从节点0 发送到节点 n-1. 其中有n - 1条路径, 每条路径都有一个传输成功率. 问传输成功所需最小时间的期望. ...

  3. jquery点击图片选中特效

    jquery点击图片选中特效 点击在线预览效果

  4. 为什么 API 监控对于任何业务来说都重要?

    对于商务运算来说一个比较稳定的趋势在于对 API 日渐增长的依赖性,几乎每一个代码级交互过程都会调用 API 来收集数据或触发某些关键过程.没有 API ,你将无法与同伴进行文件交流,没有 API , ...

  5. POJ 2528 Mayor's posters(线段树)

    点我看题目 题意 :建一堵墙粘贴海报,每个候选人只能贴一张海报,海报的高度与墙一样高,一张海报的宽度是整数个单位,墙被划分为若干个部分,每个部分的宽度为一个单位,每张海报完全的覆盖一段连续的墙体,墙体 ...

  6. 一个简单的DDraw应用程序

        阅读排行榜 1. C/C++ 笔试.面试题目大汇总(72915) 2. [STL]list基础(21718) 3. COM笔记-CoCreateInstance(14842) 4. C/C++ ...

  7. [转贴]从零开始学C++之STL(一):STL六大组件简介

    一.STL简介 (一).泛型程序设计 泛型编程(generic programming) 将程序写得尽可能通用 将算法从数据结构中抽象出来,成为通用的 C++的模板为泛型程序设计奠定了关键的基础 (二 ...

  8. SEH and C++ Exceptions,自定义CSeException

    Description of CSeException CSeException class is based on CException class provided by MFC. I overw ...

  9. Lua的function、closure和upvalue

    Lua中的函数是一阶类型值(first-class value),定义函数就象创建普通类型值一样(只不过函数类型值的数据主要是一条条指令而已),所以在函数体中仍然可以定义函数.假设函数f2定义在函数f ...

  10. Hadoop RPC简单实例

    1.导入Hadoop-Common-2.6.0.jar导入工程,里面的IPC实现RPC需要的文件. 2.服务器端  (1)服务接口 package com.neu.rpc.server; /** * ...