[agent] - start
This commit is contained in:
@@ -0,0 +1,84 @@
|
|||||||
|
package io.wdd.agent.initial.beans;
|
||||||
|
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@SuperBuilder(toBuilder = true)
|
||||||
|
public class ServerInfo {
|
||||||
|
|
||||||
|
private String serverName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* server public ipv4
|
||||||
|
|
||||||
|
*/
|
||||||
|
private String serverIpPbV4;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* server inner ipv4
|
||||||
|
|
||||||
|
*/
|
||||||
|
private String serverIpInV4;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* server public ipv6
|
||||||
|
|
||||||
|
*/
|
||||||
|
private String serverIpPbV6;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* server inner ipv6
|
||||||
|
|
||||||
|
*/
|
||||||
|
private String serverIpInV6;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private String location;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private String provider;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* split by ,
|
||||||
|
*/
|
||||||
|
private String managePort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private Integer cpuCore;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private String cpuBrand;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private String osInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private String osKernelInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private String comment;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
12
agent/src/main/java/io/wdd/agent/initial/bootup.sh
Normal file
12
agent/src/main/java/io/wdd/agent/initial/bootup.sh
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
get_system_uuid(){
|
||||||
|
|
||||||
|
cat /sys/class/dmi/id/product_uuid
|
||||||
|
|
||||||
|
cat /etc/machine-id
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package io.wdd.agent.initial.bootup;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.core.env.Environment;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
public class collectSystemInfo {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
Environment environment;
|
||||||
|
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public void initialReadingEnvironment(){
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
2
pom.xml
2
pom.xml
@@ -22,7 +22,7 @@
|
|||||||
<module>agent</module>
|
<module>agent</module>
|
||||||
<module>server</module>
|
<module>server</module>
|
||||||
<module>common</module>
|
<module>common</module>
|
||||||
<module>localEnvironment</module>
|
<module>source</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
|||||||
@@ -11,9 +11,9 @@
|
|||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<groupId>io.wdd</groupId>
|
<groupId>io.wdd</groupId>
|
||||||
<artifactId>localEnvironment</artifactId>
|
<artifactId>source</artifactId>
|
||||||
|
|
||||||
<name>localEnvironment</name>
|
<name>source</name>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user