bin
|
Nagios
执行程序所在目录,这个目录只有一个文件
nagios
|
etc
|
Nagios
配置文件位置,初始安装完后,只有几个
*.cfg-sample
文件
|
sbin
|
Nagios Cgi
文件所在目录,也就是执行外部命令所需文件所在的目录
|
Share
|
Nagios
网页文件所在的目录
|
Var
|
Nagios
日志文件、
spid
等文件所在的目录
|
#setting for nagios
ScriptAlias /nagios/cgi-bin /usr/local/nagios/sbin
<Directory "/usr/local/nagios/sbin"> //
Cgi
文件所在目录
AuthType Basic
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
AuthName "Nagios Access"
AuthUserFile /usr/local/nagios/etc/htpasswd //
验证文件路径
Require valid-user
</Directory>
Alias /nagios /usr/local/nagios/share
<Directory "/usr/local/nagios/share"> //
nagios
页面文件目录
AuthType Basic
Options None
AllowOverride None
Order allow,deny
Allow from all
AuthName "nagios Access"
AuthUserFile /usr/local/nagios/etc/htpasswd //
验证文件路径
Require valid-user
</Directory>
|
cfg_file=/usr/local/nagios/etc/contactgroups.cfg //
联系组配置文件路径
cfg_file=/usr/local/nagios/etc/contacts.cfg //
联系人配置文件路径
cfg_file=/usr/local/nagios/etc/hostgroups.cfg //
主机组配置文件路径
cfg_file=/usr/local/nagios/etc/hosts.cfg //
主机配置文件路径
cfg_file=/usr/local/nagios/etc/services.cfg //
服务配置文件路径
cfg_file=/usr/local/nagios/etc/timeperiods.cfg //
监视时段配置文件路径
|
authorized_for_system_information=nagiosadmin,sery
authorized_for_configuration_information=nagiosadmin,sery
authorized_for_system_commands=sery //
多个用户之间用逗号隔开
authorized_for_all_services=nagiosadmin,sery
authorized_for_all_hosts=nagiosadmin,sery
authorized_for_all_service_commands=nagiosadmin,sery
authorized_for_all_host_commands=nagiosadmin,sery
|
#host-notify-by-sms //
发送短信报警
define command {
command_name host-notify-by-sms
command_line /usr/local/bin/sms_send "Host $HOSTSTATE$ alert for $HOSTNAME$! on '$DATETIME$' " $CONTACTPAGER$
}
#service notify by sms //
发送短信报警
define command {
command_name service-notify-by-sms
command_line /usr/local/bin/sms_send "'$HOSTADDRESS$' $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$" $CONTACTPAGER$
}
|