一.实验描述
# vim /etc/apache2/httpd.conf \\在最后面添加一下内容
ScriptAlias /nagios/cgi-bin /usr/local/nagios/sbin
<Directory "/usr/local/nagios/sbin">
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
AuthName "nagios access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd
Require valid-user
</Directory>
Alias /nagios /usr/local/nagios/share
<Directory "/usr/local/nagios/share">
Options None
AllowOverride None
Order allow,deny
Allow from all
AuthName "nagios access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd
Require valid-user
</Directory>
|
define host {
host_name 192.168.1.1
alias Hillstone Firewall \\别名
address 192.168.1.1 \\填写被监控主机IP
contact_groups admins \\这个值是来自contacts.cfg文件里面,contactgroup_name后面的值
check_command check-host-alive
max_check_attempts 5
notification_interval 10
notification_period 24x7
notification_options d,u,r
}
|
define service {
host_name 192.168.1.1
service_description check-host-alive
check_period 24x7
max_check_attempts 4
normal_check_interval 3
retry_check_interval 2
contact_groups admins \\此处的值同上
notification_interval 10
notification_period 24x7
notification_options w,u,c,r
check_command check-host-alive \\检查主机是否存活
}
|
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。