您好,登錄后才能下訂單哦!
一.實驗描述
# 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進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。