Solaris 10 5/08 x86 的安装

2008-09-19 16:25  |  分类:操作系统

安装过程很简单,照着提示一步一步来就是了。
为了体验下 Java Desktop , 安装类型选择了最终用户,但是还是去掉了一些用不着的包。
核心安装就不会安装桌面系统了。
下面是安装摘要的截图:
全文阅读 »

CentOS4.6 安装配置 GFS

2008-08-28 15:28  |  分类:存储备份, 操作系统

在 /etc/hosts 文件添加:
192.168.0.171 centos4-1
192.168.0.172 centos4-2

添加 yum 源
cd /etc/yum.repos.d/
wget http://mirror.centos.org/centos/4/csgfs/CentOS-csgfs.repo

更新系统
yum -y update

安装 Red Hat Cluster Suite with DLM 所需要的包:
yum install ccs cman-kernel-smp dlm dlm-kernel-smp fence iddev magma magma-plugins gulm perl-Net-Telnet

安装 Red Hat GFS 所需要的包:
yum install GFS GFS-kernel-smp lvm2-cluster
全文阅读 »

1. 使用 SMTP 发送邮件
objects/commands.cfg 中有邮件提醒命令的设置
如要通过 SMTP 发送邮件,可以使用 sendEmail:
http://caspian.dotconf.net/menu/Software/SendEmail/

安装
wget http://caspian.dotconf.net/menu/Software/SendEmail/sendEmail-v1.55.tar.gz
tar zxvf sendEmail-v1.55.tar.gz
mv sendEmail-v1.55/sendEmail /usr/local/bin/

发送邮件的示例:
sendEmail -f nagios@test.com -t admin@test.com -s smtp.test.com -u "test" -xu nagios@test.com -xp password -m "test."

vi objects/commands.cfg
把 notify-host-by-email 和 notify-service-by-email 的邮件发送部分改为:

/usr/local/bin/sendEmail -f nagios@test.com -t $CONTACTEMAIL$ -s smtp.test.com -u "$HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$" -xu nagios@test.com -xp password

全文阅读 »

Nagios 札记之三:安装配置 NRPE

2008-07-16 15:20  |  分类:应用技术

监控平台上的安装:
先安装 openssl-devel
yum install openssl-devel
Installing for dependencies: e2fsprogs-devel krb5-devel

再安装 NRPE:
tar zxvf nrpe-2.12.tar.gz
cd nrpe-2.12
./configure
make all
make install-plugin

在 objects/commands.cfg 中定义 check_nrpe 使用的命令:

# 'check_nrpe' command definition
define command{
        command_name    check_nrpe
        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
        }

被监控主机的安装:
同样需要安装 openssl-devel
创建 nagios 用户和组
groupadd nagios
useradd -g nagios -d /usr/local/nagios -s /sbin/nologin nagios

先安装 nagios-plugin:
tar zxvf nagios-plugins-1.4.12.tar.gz
cd nagios-plugins-1.4.12
./configure --prefix=/usr/local/nagios
make
make install

再安装 NRPE:
tar zxvf nrpe-2.12.tar.gz
cd nrpe-2.12
./configure
make all
make install-plugin
make install-daemon
make install-daemon-config

chown -R nagios:nagios /usr/local/nagios

配置 NRPE:
vi /usr/local/nagios/etc/nrpe.cfg
allowed_hosts=127.0.0.1,$Nagios监控平台的地址或域名

启动 NRPE 守护进程:
/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d
可以将此命令加入 /etc/rc.local ,以便开机自动启动。

检查 NRPE 是否正常:
在被监控主机上
/usr/local/nagios/libexec/check_nrpe -H 127.0.0.1
在监控平台上
/usr/local/nagios/libexec/check_nrpe -H $目标主机地址
都应该可以输出 NRPE 的版本: NRPE v2.12

在被监控端的 nrpe.cfg 文件中,可以看到这样的配置:
command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20
这是用来检查 CPU 负载的。

这样,就可以在监控平台上定义如下服务来监控被监控端的 CPU 负载了:

define service{
host_name remotehost
service_description check_load
...
check_command check_nrpe!check_load }

Nagios 札记之二:配置

2008-07-15 12:13  |  分类:应用技术

主配置文件 nagios.cfg 需要更改的地方:
#cfg_file=/usr/local/nagios/etc/objects/localhost.cfg
interval_length=1 ; 间隔时间基准由 60s 改为 1s
command_check_interval=10s ; 命令检查时间间隔,-1 表示尽可能频繁的进行检查
date_format=iso8601 ; 日期格式

objects/contacts.cfg 用来定义联系人:

define contact {
contact_name sa
alias System Administrator
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,u,r
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
email admin@test.com
}

再定义联系人组

define contactgroup {
contactgroup_name admins
alias Administrator Group
members sa    ; 添加其它联系人用 "," 分隔
}

全文阅读 »

页码: 上一页 1 2 3 4 5 6 7 8 ...11 12 13 下一页