Solaris下的nagios监控系统

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

(0)

相关推荐

  • 大屏监控系统数据可视化界面设计

    随着社会信息化的高速增长,信息的可视化需求也急剧扩大,特别是一些监控中心.指挥中心.调度中心等重要场所,大屏幕显示系统已经成为信息可视化不可或缺的核心基础系统.下面我们来一起分析下大屏监控系统数据可视 ...

  • Linux中以sar命令监控系统的使用教程

    sar(System Activity Reporter系统活动情况报告)是目前 Linux 上最为全面的系统性能分析工具之一,可以从多方面对系统的活动进行报告, 包括:文件的读写情况.系统调用的使用 ...

  • 小区监控系统方案设计

    小区视频监控报警系统需求分析 在小区的室外公共场所.围栏等重点部位安装高清晰度摄像机,覆盖整个公寓区域,力争做到无死角又不浪费摄像机的基础上,使系统的设计合理并达到最优.控制中心应采用全数字视频监控主 ...

  • 怎样下载和使用中维高清监控系统?

    现在的小偷比较多,为了防止自己的家中被盗窃,小编家里就安装了一个摄像头,这样就算家里失窃,还可以查出凶手是谁,但是有了摄像头还要有监控系统,不然摄像头记录的东西也看不到,所以小编就写了一篇如何下载和安 ...

  • 安防监控系统

    安防监控系统是应用光纤.同轴电缆或微波在其闭合的环路内传输视频信号,并从摄像到图像显示和记录构成独立完整的系统.它能实时.形象.真实地反映被监控对象,它可以在恶劣的环境下代替人工进行长时间监视,通过录 ...

  • 一码通母婴用品微商渠道监控系统

    微商越来越火热,也越来越多的人挤入微商的行业,母婴用品行业微商的一个个痛点也就接踵而来,针对微商窜货,乱价,渠道监管不做等痛点母婴行业应该怎么办.其实,现在已经有很多行业开始使用微商渠道监控系统,下面 ...

  • 基于GSM短信模块的路灯监控系统

    操作方法 01 一.智能路灯监控系统的概述 随着时代的发展,城市现代化建设步伐不断加快,对城市道路照明及城市亮化工程需求也更大,而能源的供需矛盾也越来越突出,节电节能.绿色照明的要求越来越迫切,越来越 ...

  • 教你认识无线视频监控系统方案

    操作方法 01 一.市场趋势 02 随着无线通信技术的日益发展,传输带宽不断提高,通信终端的实时信息处理能力飞速增强,无线多媒体应用日渐成为业内关注的焦点,也成为人们的必然需求.其主流应用之一是便利. ...

  • 怎样做一个好的电视监控系统

    电视监控系统在现代建筑中具有独特作用,它能被广泛应用的重要原因是它能实时.形象.真实地反映被监视对象的画面,它已成为人们在现代化管理中进行监视控制的一种极为有效的工具. 步骤/方法 01 控制方式及控 ...