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. APNs推送, 处理通知

    设备接到apns发来的通知,应用处理通知有以下几种情况: 1. 应用还没有加载 这时如果点击通知的显示按钮,会调用didFinishLaunchingWithOptions,不会调用didReceiv ...

  2. caffe之(一)卷积层

    在caffe中,网络的结构由prototxt文件中给出,由一些列的Layer(层)组成,常用的层如:数据加载层.卷积操作层.pooling层.非线性变换层.内积运算层.归一化层.损失计算层等:本篇主要 ...

  3. Xcode8和iOS10的适配问题

    本文转自:http://www.jianshu.com/p/90d5323cf510 =================== 一.遇到的问题 1.权限以及相关设置 iOS10系统下调用系统相册.相机功 ...

  4. 意犹未尽而来的第一篇Android 逆向

    游戏:咕噜王国大冒险 平台:android 目标: 1. 去除乱七八糟提示(本篇目标) 2. 去除google弹窗 3. 破解“all stages” 破文开始: 1. 使用APKIDE反编译:搜索字 ...

  5. 第 12 章 命令模式【Command Pattern】

    以下内容出自:<<24种设计模式介绍与6大设计原则>> 今天讲命令模式,这个模式从名字上看就很简单,命令嘛,老大发命令,小兵执行就是了,确实是这个意思,但是更深化了,用模式来描 ...

  6. uva 1400 - "Ray, Pass me the dishes!"

    又是一道线段树区间更新的题: #include<cstdio> #include<algorithm> #include<cstring> #define ll l ...

  7. QLGame 2d Engine源码地址

    QLGame 2d Engine源码地址已经提交到github上,地址为:https://github.com/wsgzxl/QLGame2dEngine

  8. 高远介绍的好东东--django-celery

    终于可以到异步消息机制的高档产品啦~~~ 不知能不能代替AJAX.. 参照官方文档试下: 中文文档: http://docs.jinkan.org/docs/celery/getting-starte ...

  9. CAS单点登录配置[2]:证书生成

    上一篇介绍了准备工作,本片将介绍如何生成证书. 服务器端证书 1 我们在F盘下建立一个cas文件夹,在此文件夹中生成证书文件,打开命令窗口,进入此目录下,如图: 2 生成服务器端证书, 此命令用于在当 ...

  10. 常用模式之Command模式入门

    package com.zhao.cmd.a; /** * 客户端调用 * 烧烤摊 * * @author LuZhao * */ public class App { public static v ...