diff --git a/pom.xml b/pom.xml index 980af97..be00b1e 100644 --- a/pom.xml +++ b/pom.xml @@ -1,33 +1,34 @@ - 4.0.0 - + - org.springframework.boot - spring-boot-starter-parent - 2.3.3.RELEASE - - - + org.springframework.boot + spring-boot-starter-parent + 2.3.3.RELEASE + + + net.geedge olp_exporter 1.0 jar - + olp_exporter olp_exporter - - - 8 - UTF-8 - 1.8 - 1.8 - UTF-8 - UTF-8 - - + + 8 + UTF-8 + 1.8 + 1.8 + UTF-8 + UTF-8 + + + aliyun Aliyun Central Repository @@ -46,40 +47,50 @@ - + - - - - org.springframework.boot - spring-boot-starter-actuator - - - io.micrometer - micrometer-registry-prometheus - - - org.springframework.boot - spring-boot-starter - - - org.springframework.boot - spring-boot-starter-web - - + + + + org.springframework.boot + spring-boot-starter-actuator + + + io.micrometer + micrometer-registry-prometheus + + + org.springframework.boot + spring-boot-starter + + + org.springframework.boot + spring-boot-starter-web + + com.google.guava guava 23.6-jre - + - ${project.artifactId} + ${project.artifactId} + + + src/main/resources + + **/application-* + /build/** + + + - + org.springframework.boot spring-boot-maven-plugin + true org.projectlombok @@ -87,8 +98,7 @@ - - + \ No newline at end of file diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index caf4dfc..93e0e89 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -1,3 +1,28 @@ +server: + port: 10095 + servlet: + context-path: / spring: - profiles: - active: dev \ No newline at end of file + application: + name: olp_exporter + +management: + metrics: + binders: + jvm: + enabled: false + files: + enabled: false + integration: + enabled: false + logback: + enabled: false + processor: + enabled: false + uptime: + enabled: false + endpoints: + web: + base-path: / + exposure: + include: [info,health,heapdump,threaddump,env,mappings,probePrometheus] diff --git a/src/main/resources/banner.txt b/src/main/resources/banner.txt new file mode 100644 index 0000000..3e9aad7 --- /dev/null +++ b/src/main/resources/banner.txt @@ -0,0 +1,8 @@ + _______ _ _______ _______ _______ _______ _______ _________ _______ _______ +( ___ )( \ ( ____ ) ( ____ \|\ /|( ____ )( ___ )( ____ )\__ __/( ____ \( ____ ) +| ( ) || ( | ( )| | ( \/( \ / )| ( )|| ( ) || ( )| ) ( | ( \/| ( )| +| | | || | | (____)| | (__ \ (_) / | (____)|| | | || (____)| | | | (__ | (____)| +| | | || | | _____) | __) ) _ ( | _____)| | | || __) | | | __) | __) +| | | || | | ( | ( / ( ) \ | ( | | | || (\ ( | | | ( | (\ ( +| (___) || (____/\| ) | (____/\( / \ )| ) | (___) || ) \ \__ | | | (____/\| ) \ \__ +(_______)(_______/|/ (_______/|/ \||/ (_______)|/ \__/ )_( (_______/|/ \__/ \ No newline at end of file diff --git a/src/main/resources/build/README b/src/main/resources/build/README new file mode 100644 index 0000000..a117bb2 --- /dev/null +++ b/src/main/resources/build/README @@ -0,0 +1,10 @@ +################################## 1.INSTALL ####################################### +# +# Execute install.sh script +# ./install.sh +# +################################## 2、CHECK ######################################## +# +# Browser or CURL visit http://[IP]:10095/health ,response {"status":"UP"} is OK +# + diff --git a/src/main/resources/build/install.sh b/src/main/resources/build/install.sh new file mode 100644 index 0000000..181edab --- /dev/null +++ b/src/main/resources/build/install.sh @@ -0,0 +1,26 @@ +#!/bin/bash +CUR_PATH=`pwd` +echo "install path: $CUR_PATH" +echo "install olp_exporter as a systemd service" + +chmod +x $CUR_PATH/olp_exporter +cat > /etc/systemd/system/olp_exporter.service <