Host Group reference
9.0.21.115 This page provides information for creating payload JSON files or reviewing responses to API commands that are involved in the configuration of Agent host groups.
The following code sample shows the definitions of an Agent host in a configuration file that you can submit using the config server:hostgroup:agent::add API command.
"host": "agent2",
"tag": "abcd",
"participationRules": [
{
"ruleType": "EVENT",
"event": {
"name": "ABCD",
"runDate": "1208"
}
},
{
"ruleType": "DATE_TIME",
"dateTime": {
"date": {
"betweenDate": {
"fromDate": "20221104",
"toDate": "20221108"
}
},
"time": {
"betweenTime": {
"fromTime": "1400",
"toTime": "1500"
}
}
}
}
]
}
The following code sample shows the definitions of multiple Agent hosts in a configuration file that you can submit using the config server:hostgroup::update API command.
"tag": "abcd",
"agentslist": [
{
"host": "Agent1",
"participationRules": [
{
"ruleType": "EVENT",
"event": {
"name": "aaa1",
"runDate": "1208"
}
}
]
},
{
"host": "Agent2",
"participationRules": [
{
"ruleType": "DATE_TIME",
"dateTime": {
"date": {
"betweenDate": {
"fromDate": "20221104",
"toDate": "20221108"
}
},
"time": {
"betweenTime": {
"fromTime": "1400",
"toTime": "1500"
}
}
}
}
]
}
]
}
General host properties
The following table lists the properties that are available for Control-M/Agents defined in the configuration file:
Property | Description |
---|---|
tag | Defines an optional tag associated with the host group and each of the Control-M/Agents in it, used in Role-Based Administration (RBA). Note that you can define a tag only during the creation of a host group. You cannot change the tag after the host group is created. Tags can contain alphanumeric characters, as well as the underscore character, and can be up to 85 characters long. |
host | Defines the host name or alias of the Control-M/Agent. This is the logical name of the Control-M/Agent. |
participationRules | Lists the defined rules that limit the inclusion of the Agent host in the host group to scheduled dates and times or in response to events. |
ruleType | Determines the type of participation rule:
|
DateTime rule properties
The following table lists the properties that define DateTime rules under a dateTime object:
Property | Description |
---|---|
date | Defines dates for inclusion of the Agent host in the host group. Under date, use ONE of the following types of date definitions:
|
allDays | Schedules the inclusion of the Agent host in the host group on all days. Values: true|false If you set allDays to false, you must include a second date definition. |
everyWeekDays | Schedules week days for the inclusion of the Agent host in the host group. Values: At least one of the following: "SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT" Example: "everyWeekDays": ["MON", "WED", "FRI"] |
betweenDate | Schedules the inclusion of the Agent host in the host group to a range of calendar dates, between a fromDate and a toDate. Format: YYYYMMDD Example: "betweenDate": { "fromDate": "20221104", "toDate": "20221108" } |
betweenDateTime | Schedules the inclusion of the Agent host in the host group to a time range between specified calendar dates and times. Format:
Example: "betweenDateTime": { "fromDate": "20221104", "fromTime": "1230", "toDate": "20221104", "toTime": "1430" } |
betweenWeekDayTime | Schedules the inclusion of the Agent host in the host group to a time range between specified week days and times. Format:
Example: "betweenWeekDayTime": { "fromWeekDay": "MON", "fromTime": "1230", "toWeekDay": "TUE", "toTime": "1430" } |
onDates | Defines specific calendar dates for the inclusion of the Agent host in the host group. Format: At least one YYYYMMDD date; up to 100 dates Example: "onDates": ["20221116", "20221123"] |
time | Defines a time range on the scheduled dates for inclusion of the Agent host in the host group. You can combine time definitions with the following date definitions:
Under time, use ONE of the following types of time definitions:
|
allHours | Schedules the inclusion of the Agent host in the host group at all hours of the day (for the specified dates). Values: true|false If you set allHours to false, you must also include the betweenTime property. |
betweenTime | Schedules the inclusion of the Agent host in the host group to a time range, between a fromTime and a toTime. Format: hhmm, where mm is rounded to a quarter of the hour (00, 15, 30, or 45) Example: "betweenTime": { "fromTime": "1415", "toTime": "1545" } |
Event rule properties
The following table lists the properties that define event-type rules under an event object:
Property | Description |
---|---|
name | Determines the name of the event. |
runDate | Determines the date to schedule the event.
|