This topic describes the servers and machine groups that are associated with log collection. It also provides an example of server and machine group configurations.


After a server is installed with Logtail and then restarted, the server is automatically associated with the user that is specified in the Logtail configurations.

The following example is sample configurations for a server:
    "ip" : "testip1",
    "machine-uniqueid" : "testuuid1",
    "userdefined-id" : "testuserdefinedid1",
The following table lists attributes of a server.
Parameter Type Description
ip String The IP address that is associated with the hostname of the server.
uuid String The unique primary key marked by the machine. The primary key is uploaded by Logtail.
userdefined-id String The user-defined identifier of the server that is uploaded by Logtail.
lastHeartbeatTime Integer The last heartbeat time of the server. The value is a UNIX timestamp representing the number of seconds that have elapsed since the epoch time.

Machine groups

You can create a machine group and add servers to the machine group in the Log Service console. Then you can create Logtail configurations for log collection and apply the configurations to the machine group. This way, you can collect logs from the servers based on the configurations. To identify a machine group, you can use one of the following methods:
  • IP address: Add the IP addresses of all servers to the identifier of a machine group. Each server in the group can be identified by using its unique IP address.
  • User-defined identifier: Customize an identifier for a machine group and use the same identifier for servers in the machine group.
The name of a machine group must meet the following requirements:
  • The name can contain lowercase letters, digits, hyphens (-), and underscores (_).
  • The name must start and end with a lowercase letter or digit.
  • The name must be 3 to 128 bytes in length.


{    "groupName" : "testgroup",
    "groupType" : "",
    "groupAttribute" : {
        "externalName" : "testgroup",
        "groupTopic": "testgrouptopic"
    "machineIdentifyType": "ip",
    "machineList" : [
    "createTime": 1431705075,
    "lastModifyTime" : 1431705075
The following table describes the attributes of a machine group.
Attribute Type Required Description
groupName String Yes The name of the machine group. The name must be unique in a project.
groupType String No The type of the machine group. Default value: null.
machineIdentifyType String Yes The type of the machine identifier. Valid values: IP and userdefined-id.
groupAttribute Object Yes The attribute of the machine group. Default value: null.
machineList Array Yes The list of machine identifiers, which can be IP addresses or user-defined identifiers.
createTime Int No The time when the machine group was created.
lastModifyTime Int No The time when the machine group was updated.
The following table describes the attributes in the groupAttribute object.
Attribute Type Required Description
groupTopic String No The topic of the machine group. Default value: null.
externalName String No The external management identifier on which the machine group depends. Default value: null.