Logtail machine groups
Configuration parameters and complete resource examples for machines and machine groups.
Machines
After Logtail is installed and the server is restarted, the server is automatically associated with the user specified in the Logtail configurations.
Each server has the following properties:
{
"ip" : "testip1",
"machine-uniqueid" : "testuuid1",
"userdefined-id" : "testuserdefinedid1",
"lastHeartbeatTime":1397781420
}
The following table describes server properties.
|
Parameter Name |
Type |
Description |
|
ip |
string |
The IP address corresponding to the server hostname. |
|
uuid |
string |
The unique primary key that identifies the server, uploaded by Logtail. |
|
userdefined-id |
string |
The custom ID of the server, uploaded by Logtail. |
|
lastHeartbeatTime |
integer |
The last heartbeat time of the server. The value is a UNIX timestamp in seconds. |
Machine groups
Simple Log Service uses Logtail collection configurations to collect logs from multiple servers. You can add servers to a machine group and apply the Logtail collection configuration to the group. Machine groups can be defined in one of the following ways:
-
IP address: Identify servers by their IP addresses.
-
Custom ID: Assign a custom identifier to the machine group and configure it on the servers.
A machine group name must meet the following requirements:
-
Contain only lowercase letters, digits, hyphens (-), and underscores (_).
-
Start and end with a lowercase letter or a digit.
-
Be 2 to 128 bytes in length.
Complete resource example
{ "groupName" : "testgroup",
"groupType" : "",
"groupAttribute" : {
"externalName" : "testgroup",
"groupTopic": "testgrouptopic"
},
"machineIdentifyType": "ip",
"machineList" : [
"ip1",
"ip2"
...
],
"createTime": 1431705075,
"lastModifyTime" : 1431705075
}
The following table describes machine group parameters.
|
Property |
Type |
Required |
Description |
|
groupName |
string |
Yes |
The name of the machine group. The name must be unique within a project. |
|
groupType |
string |
No |
The machine group type. Default value: empty. |
|
machineIdentifyType |
string |
Yes |
The machine identity type. Valid values: IP and userdefined. |
|
groupAttribute |
object |
Yes |
The machine group properties. Default value: empty. |
|
machineList |
array |
Yes |
The machine identifiers, which can be IP addresses or custom IDs. |
|
createTime |
int |
No |
The creation time of the machine group. |
|
lastModifyTime |
int |
No |
The last modification time of the machine group. |
The following table describes groupAttribute parameters.
|
Property name |
Type |
Required |
Description |
|
groupTopic |
string |
No |
The machine group topic. Default value: empty. |
|
externalName |
string |
No |
The external management identity of the machine group. Default value: empty. |