Solaris下的nagios监控系统
文将介绍Nagios在Solaris10操做系统下的安装过程,其中包括,源码的编译、安装;Apache的安装、Nagios CGI的配置;Nagios监控配置等。
Solaris下的nagios监控系统介绍如下:
图-nagios
文将介绍Nagios在Solaris10操做系统下的安装过程,其中包括,源码的编译、安装;Apache的安装、Nagios CGI的配置;Nagios监控配置等。
环境、资源准备
gcc-3.4.6-sol10-x86-local.gz
libiconv-1.11-sol10-x86-local.gz
libintl-3.4.0-sol10-x86-local.gz
make-3.81-sol10-x86-local.gz
openssl-0.9.8h-sol10-x86-local.gz
gd-2.0.35-sol10-x86-local.gz
httpd-2.2.4.tar.gz
nagios-3.0.3.tar.gz
nagios-plugins-1.4.11.tar.gz
nrpe-2.12.tar.gz
1.安装Nagios
# groupadd nagios # useradd -g nagios -d /usr/local/nagios nagios # gunzip ./nagios-3.0.6.tar.gz # tar xvf ./nagios-3.0.6.tar.gz # cd ./nagios-3.0.6.tar.gz # ./configure --prefix=/usr/local/nagios --with-nagios-user=nagios
--with-nagios-group=nagios --with-gd-lib=/usr/sfw/lib
--with-gd-inc=/usr/sfw/include
# make all # make fullinstall # make install-config
2.安装openssl
# gunzip ./openssl-0.9.8j-sol10-sparc-local.gz # pkgadd -d ./openssl-0.9.8j-sol10-sparc-local # export LD_LIBRARY_PATH=/usr/local/ssl/lib:$LD_LIBRARY_PATH
3.安装Nagios Plugins
# gunzip ./nagios-plugins-1.4.13.tar.gz # tar xvf ./nagios-plugins-1.4.13.tar # cd nagios-plugins-1.4.13 # ./configure --without-mysql --prefix=/usr/local/nagios --with-openssl=/usr/local/ssl # make # make install # make clean # chown -R nagios:nagios /usr/local/nagios/libexec
4.配置Apache
在/etc/apache2/httpd.conf文件追加如下内容
#setting for nagios
ScriptAlias /nagios/cgi-bin /usr/local/nagios/sbin
AuthType Basic
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
AuthName "Nagios Access"
AuthUserFile /usr/local/nagios/etc/htpasswd
Require valid-user
Alias /nagios /usr/local/nagios/share
AuthType Basic
Options None
AllowOverride None
Order allow,deny
Allow from all
AuthName "nagios Access"
AuthUserFile /usr/local/nagios/etc/htpasswd
Require valid-user
5.生成登录用户和验证口令
# /usr/apache2/bin/htpasswd -c /usr/local/nagios/etc/htpasswd
此处的user_name为登录Nagios Web应用需要输入的用户名www.britepic.org
按照提示输入要设置的口令即可
配置/usr/local/nagios/etc/cgi.cfg,添加用户edison
................. .................
# SYSTEM/PROCESS INFORMATION ACCESS
# This option is a comma-delimited list of all usernames that
# have access to viewing the Nagios process information as
# provided by the Extended Information CGI (extinfo.cgi). By
# default, *no one* has access to this unless you choose to
# not use authorization. You may use an asterisk (*) to
# authorize any user who has authenticated to the web server.
authorized_for_system_information=nagiosadmin,edison
# CONFIGURATION INFORMATION ACCESS
# This option is a comma-delimited list of all usernames that
# can view ALL configuration information (hosts, commands, etc).
# By default, users can only view configuration information
# for the hosts and services they are contacts for. You may use
# an asterisk (*) to authorize any user who has authenticated
# to the web server.
authorized_for_configuration_information=nagiosadmin,edison
# SYSTEM/PROCESS COMMAND ACCESS
# This option is a comma-delimited list of all usernames that
# can issue shutdown and restart commands to Nagios via the
# command CGI (cmd.cgi). Users in this list can also change
# the program mode to active or standby. By default, *no one*
# has access to this unless you choose to not use authorization.
# You may use an asterisk (*) to authorize any user who has
# authenticated to the web server.
authorized_for_system_commands=nagiosadmin,edison
# GLOBAL HOST/SERVICE VIEW ACCESS
# These two options are comma-delimited lists of all usernames that
# can view information for all hosts and services that are being
# monitored. By default, users can only view information
# for hosts or services that they are contacts for (unless you
# you choose to not use authorization). You may use an asterisk (*)
# to authorize any user who has authenticated to the web server.
authorized_for_all_services=nagiosadmin,edison
authorized_for_all_hosts=nagiosadmin,edison
# GLOBAL HOST/SERVICE COMMAND ACCESS
# These two options are comma-delimited lists of all usernames that
# can issue host or service related commands via the command
# CGI (cmd.cgi) for all hosts and services that are being monitored.
# By default, users can only issue commands for hosts or services
# that they are contacts for (unless you you choose to not use
# authorization). You may use an asterisk (*) to authorize any
# user who has authenticated to the web server.
authorized_for_all_service_commands=nagiosadmin,edison
authorized_for_all_host_commands=nagiosadmin,edison
怎么删除c盘的垃圾文件(电脑怎么清理c盘垃圾)
1、打开此电脑,在系统盘盘符上单击右键,选择“属性”。2、在属性界面“常规”选卡中,单击“磁盘清理”。3、等待磁盘清理工具搜索磁盘中可以清理的文件。4、在磁盘清理界面,勾选需要清理的项目,点击“清理系统文件”。5、然后点(53)人阅读时间:2024-10-05如何将页眉上的横杠去掉(如何将页眉上的横线去掉)
1、首先在页眉处双击,进入页眉页脚编辑状态。2、把页眉中所有内容全部选中。3、单击“开始”菜单选项卡,在工具栏中找到“边框”按钮,在弹出的下拉列表中选择“无边框”即可。4、单击“设计”菜单选项卡中的“关闭页眉页脚”,退出(47)人阅读时间:2024-10-05翻墙什么意思哦
1、翻墙,汉语词语,读音fan qiang,比喻人或动物等不走门,越墙出入。2、网络上的翻墙,是指通过一些软件进入外国网站。即绕过相应的IP封锁、内容过滤、域名劫持、流量限制等,实现对网络内容的访问。(48)人阅读时间:2024-10-05手机贴膜是不是真的有用 手机贴膜有用处吗
1、手机贴膜有百害而无一利。2、说液晶屏有辐射的都是生产贴膜或做贴膜生意的商家忽悠消费者。液晶屏发光是靠LED发光二极管,现在家用照明都采用的LED,其功率和亮度远远大于液晶屏所产生的光。3、贴一层膜即使所谓最好最贵的,(43)人阅读时间:2024-10-05怎么删除c盘的垃圾文件(电脑怎么清理c盘垃圾)
1、打开此电脑,在系统盘盘符上单击右键,选择“属性”。2、在属性界面“常规”选卡中,单击“磁盘清理”。3、等待磁盘清理工具搜索磁盘中可以清理的文件。4、在磁盘清理界面,勾选需要清理的项目,点击“清理系统文件”。5、然后点..2024-10-05如何将页眉上的横杠去掉(如何将页眉上的横线去掉)
1、首先在页眉处双击,进入页眉页脚编辑状态。2、把页眉中所有内容全部选中。3、单击“开始”菜单选项卡,在工具栏中找到“边框”按钮,在弹出的下拉列表中选择“无边框”即可。4、单击“设计”菜单选项卡中的“关闭页眉页脚”,退出..2024-10-05翻墙什么意思哦
1、翻墙,汉语词语,读音fan qiang,比喻人或动物等不走门,越墙出入。2、网络上的翻墙,是指通过一些软件进入外国网站。即绕过相应的IP封锁、内容过滤、域名劫持、流量限制等,实现对网络内容的访问。..2024-10-05手机贴膜是不是真的有用 手机贴膜有用处吗
1、手机贴膜有百害而无一利。2、说液晶屏有辐射的都是生产贴膜或做贴膜生意的商家忽悠消费者。液晶屏发光是靠LED发光二极管,现在家用照明都采用的LED,其功率和亮度远远大于液晶屏所产生的光。3、贴一层膜即使所谓最好最贵的,..2024-10-05