Nagios Add host group, service groups, contact Group

Source: Internet
Author: User

1. Define a host group (this file does not exist and must be defined by itself)

[Email protected] objects]# vim hostgroups.cfg
Define Hostgroup{
Hostgroup_name Node1 #主机组名
Alias Tingyun #别名
Members hostname 1, host name 2 #组中的成员 (host name of each host)
}

Define Hostgroup{
Hostgroup_name Node2
Alias goods
Members hostname 3, hostname 4
}
[Email protected] objects]# vim/usr/local/nagios-4.1.1/etc/nagios.cfg
Cfg_file=/usr/local/nagios-4.1.1/etc/objects/hostgroups.cfg #加载定义主机组的配置文件
[Email protected] objects]# #重启nagios服务

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M01/82/2D/wKiom1dNVIrBntGcAAB57Cyc7xQ742.png-wh_500x0-wm_3 -wmp_4-s_1737321358.png "title=" 1.png "alt=" Wkiom1dnvirbntgcaab57cyc7xq742.png-wh_50 "/>

2. Define a service group (this file does not exist and must be defined by itself)

[Email protected] objects]# vim servicegroups.cfg
Define Servicegroup{
Servicegroup_name Service Group Name

Alias aliases
Members 1, service 1, Member 2, service 2
}
[Email protected] objects]# vim/usr/local/nagios-4.1.1/etc/nagios.cfg
Cfg_file=/usr/local/nagios-4.1.1/etc/objects/servicegroups.cfg #添加文件
[Email protected] objects]#

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M02/82/2C/wKioL1dNYFnSiTzZAAAxuxc2nbk091.png-wh_500x0-wm_3 -wmp_4-s_3390503810.png "title=" 2.png "alt=" Wkiol1dnyfnsitzzaaaxuxc2nbk091.png-wh_50 "/>


This article is from the "Days Together" blog, please be sure to keep this source http://tongcheng.blog.51cto.com/6214144/1784951

Nagios Add host Group, service group, contact Group

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.