Skip to content
This repository was archived by the owner on Dec 12, 2022. It is now read-only.

6.x beta with es 5 #6

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ target
# git
*.orig
*.log
dist
37 changes: 37 additions & 0 deletions apm-dist/bin/oapServiceInit.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
@REM
@REM Licensed to the Apache Software Foundation (ASF) under one or more
@REM contributor license agreements. See the NOTICE file distributed with
@REM this work for additional information regarding copyright ownership.
@REM The ASF licenses this file to You under the Apache License, Version 2.0
@REM (the "License"); you may not use this file except in compliance with
@REM the License. You may obtain a copy of the License at
@REM
@REM http://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing, software
@REM distributed under the License is distributed on an "AS IS" BASIS,
@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@REM See the License for the specific language governing permissions and
@REM limitations under the License.

@echo off

setlocal
set OAP_PROCESS_TITLE=Skywalking-Collector
set OAP_HOME=%~dp0%..
set OAP_OPTS="-Xms256M -Xmx512M -Doap.logDir=%OAP_HOME%\logs"

set CLASSPATH=%OAP_HOME%\config;.;
set CLASSPATH=%OAP_HOME%\oap-libs\*;%CLASSPATH%

if defined JAVA_HOME (
set _EXECJAVA="%JAVA_HOME%\bin\java"
)

if not defined JAVA_HOME (
echo "JAVA_HOME not set."
set _EXECJAVA=java
)

start "%OAP_PROCESS_TITLE%" %_EXECJAVA% "%OAP_OPTS%" -cp "%CLASSPATH%" -Dmode=init org.apache.skywalking.oap.server.starter.OAPServerStartUp
endlocal
50 changes: 50 additions & 0 deletions apm-dist/bin/oapServiceInit.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

#!/usr/bin/env sh

PRG="$0"
PRGDIR=`dirname "$PRG"`
[ -z "$OAP_HOME" ] && OAP_HOME=`cd "$PRGDIR/.." >/dev/null; pwd`

OAP_LOG_DIR="${OAP_HOME}/logs"
JAVA_OPTS=" -Xms256M -Xmx512M"

if [ ! -d "${OAP_HOME}/logs" ]; then
mkdir -p "${OAP_LOG_DIR}"
fi

_RUNJAVA=${JAVA_HOME}/bin/java
[ -z "$JAVA_HOME" ] && _RUNJAVA=java

CLASSPATH="$OAP_HOME/config:$CLASSPATH"
for i in "$OAP_HOME"/oap-libs/*.jar
do
CLASSPATH="$i:$CLASSPATH"
done

OAP_OPTIONS=" -Doap.logDir=${OAP_LOG_DIR}"

eval exec "\"$_RUNJAVA\" ${JAVA_OPTS} ${OAP_OPTIONS} -classpath $CLASSPATH -Dmode=init org.apache.skywalking.oap.server.starter.OAPServerStartUp \
2>${OAP_LOG_DIR}/oap.log 1> /dev/null &"

if [ $? -eq 0 ]; then
sleep 1
echo "SkyWalking OAP started successfully!"
else
echo "SkyWalking OAP started failure!"
exit 1
fi
4 changes: 2 additions & 2 deletions apm-dist/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>apm</artifactId>
<groupId>org.apache.skywalking</groupId>
<version>6.0.0-alpha</version>
<version>6.0.0-beta</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down Expand Up @@ -55,4 +55,4 @@
</plugin>
</plugins>
</build>
</project>
</project>
29 changes: 24 additions & 5 deletions apm-dist/src/main/assembly/alarm-settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,47 @@ rules:
period: 10
count: 3
silence-period: 5
message: Response time of service {name} is more than 2000ms.
message: Response time of service {name} is more than 1000ms in last 3 minutes.
service_sla_rule:
# Indicator value need to be long, double or int
indicator-name: service_sla
op: "<"
threshold: 80
threshold: 8000
# The length of time to evaluate the metric
period: 10
# How many times after the metric match the condition, will trigger alarm
count: 2
# How many times of checks, the alarm keeps silence after alarm triggered, default as same as period.
silence-period: 3
message: Successful rate of service {name} is lower than 80%
message: Successful rate of service {name} is lower than 80% in last 2 minutes.
service_p90_sla_rule:
# Indicator value need to be long, double or int
indicator-name: service_sla
indicator-name: service_p90
op: ">"
threshold: 1000
period: 10
count: 3
silence-period: 5
message: 90% response time of service {name} is lower than 80%
message: 90% response time of service {name} is lower than 1000ms in last 3 minutes
service_instance_resp_time_rule:
indicator-name: service_instance_resp_time
op: ">"
threshold: 1000
period: 10
count: 2
silence-period: 5
message: Response time of service instance {name} is more than 1000ms in last 2 minutes.
# Active endpoint related metric alarm will cost more memory than service and service instance metric alarm.
# Because the number of endpoint is much more than service and instance.
#
# endpoint_avg_rule:
# indicator-name: endpoint_avg
# op: ">"
# threshold: 1000
# period: 10
# count: 2
# silence-period: 5
# message: Response time of endpoint {name} is more than 1000ms in last 2 minutes.

webhooks:
# - http://127.0.0.1/notify/
Expand Down
101 changes: 58 additions & 43 deletions apm-dist/src/main/assembly/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,68 +16,83 @@

cluster:
standalone:
# Please check your ZooKeeper is 3.5+, However, it is also compatible with ZooKeeper 3.4.x. Replace the ZooKeeper 3.5+
# library the oap-libs folder with your ZooKeeper 3.4.x library.
# zookeeper:
# hostPort: localhost:2181
# # Retry Policy
# baseSleepTimeMs: 1000 # initial amount of time to wait between retries
# maxRetries: 3 # max number of times to retry
# nameSpace: ${SW_NAMESPACE:""}
# hostPort: ${SW_CLUSTER_ZK_HOST_PORT:localhost:2181}
# #Retry Policy
# baseSleepTimeMs: ${SW_CLUSTER_ZK_SLEEP_TIME:1000} # initial amount of time to wait between retries
# maxRetries: ${SW_CLUSTER_ZK_MAX_RETRIES:3} # max number of times to retry
# kubernetes:
# watchTimeoutSeconds: 60
# namespace: default
# labelSelector: app=collector,release=skywalking
# uidEnvName: SKYWALKING_COLLECTOR_UID
# watchTimeoutSeconds: ${SW_CLUSTER_K8S_WATCH_TIMEOUT:60}
# namespace: ${SW_CLUSTER_K8S_NAMESPACE:default}
# labelSelector: ${SW_CLUSTER_K8S_LABEL:app=collector,release=skywalking}
# uidEnvName: ${SW_CLUSTER_K8S_UID:SKYWALKING_COLLECTOR_UID}
# consul:
# serviceName: ${SW_SERVICE_NAME:"SkyWalking_OAP_Cluster"}
# Consul cluster nodes, example: 10.0.0.1:8500,10.0.0.2:8500,10.0.0.3:8500
# hostPort: ${SW_CLUSTER_CONSUL_HOST_PORT:localhost:8500}
core:
default:
restHost: 0.0.0.0
restPort: 12800
restContextPath: /
gRPCHost: 0.0.0.0
gRPCPort: 11800
restHost: ${SW_CORE_REST_HOST:0.0.0.0}
restPort: ${SW_CORE_REST_PORT:12800}
restContextPath: ${SW_CORE_REST_CONTEXT_PATH:/}
gRPCHost: ${SW_CORE_GRPC_HOST:0.0.0.0}
gRPCPort: ${SW_CORE_GRPC_PORT:11800}
downsampling:
- Hour
- Day
- Month
# Set a timeout on metric data. After the timeout has expired, the metric data will automatically be deleted.
recordDataTTL: 90 # Unit is minute
minuteMetricsDataTTL: 90 # Unit is minute
hourMetricsDataTTL: 36 # Unit is hour
dayMetricsDataTTL: 45 # Unit is day
monthMetricsDataTTL: 18 # Unit is month
recordDataTTL: ${SW_CORE_RECORD_DATA_TTL:90} # Unit is minute
minuteMetricsDataTTL: ${SW_CORE_MINUTE_METRIC_DATA_TTL:90} # Unit is minute
hourMetricsDataTTL: ${SW_CORE_HOUR_METRIC_DATA_TTL:36} # Unit is hour
dayMetricsDataTTL: ${SW_CORE_DAY_METRIC_DATA_TTL:45} # Unit is day
monthMetricsDataTTL: ${SW_CORE_MONTH_METRIC_DATA_TTL:18} # Unit is month
storage:
# h2:
# driver: org.h2.jdbcx.JdbcDataSource
# url: jdbc:h2:mem:skywalking-oap-db
# user: sa
# h2:
# driver: ${SW_STORAGE_H2_DRIVER:org.h2.jdbcx.JdbcDataSource}
# url: ${SW_STORAGE_H2_URL:jdbc:h2:mem:skywalking-oap-db}
# user: ${SW_STORAGE_H2_USER:sa}
elasticsearch-5x:
clusterName: OAPStorageCluster
clusterNodes: localhost:9300
indexShardsNumber: 2
indexReplicasNumber: 0
clusterName: ${SW_STORAGE_ES_CLUSTER_NAME:elasticsearch}
#nameSpace: ${SW_NAMESPACE:""}
clusterNodes: ${SW_STORAGE_ES_CLUSTER_NODES:localhost:9300}
indexShardsNumber: ${SW_STORAGE_ES_INDEX_SHARDS_NUMBER:2}
indexReplicasNumber: ${SW_STORAGE_ES_INDEX_REPLICAS_NUMBER:0}
# Batch process setting, refer to https://www.elastic.co/guide/en/elasticsearch/client/java-api/5.5/java-docs-bulk-processor.html
bulkActions: 2000 # Execute the bulk every 2000 requests
bulkSize: 20 # flush the bulk every 20mb
flushInterval: 10 # flush the bulk every 10 seconds whatever the number of requests
concurrentRequests: 2 # the number of concurrent requests
bulkActions: ${SW_STORAGE_ES_BULK_ACTIONS:2000} # Execute the bulk every 2000 requests
bulkSize: ${SW_STORAGE_ES_BULK_SIZE:20} # flush the bulk every 20mb
flushInterval: ${SW_STORAGE_ES_FLUSH_INTERVAL:10} # flush the bulk every 10 seconds whatever the number of requests
concurrentRequests: ${SW_STORAGE_ES_CONCURRENT_REQUESTS:2} # the number of concurrent requests
# mysql:
receiver-register:
default:
receiver-trace:
default:
bufferPath: ../trace-buffer/ # Path to trace buffer files, suggest to use absolute path
bufferOffsetMaxFileSize: 100 # Unit is MB
bufferDataMaxFileSize: 500 # Unit is MB
bufferFileCleanWhenRestart: false
bufferPath: ${SW_RECEIVER_BUFFER_PATH:../trace-buffer/} # Path to trace buffer files, suggest to use absolute path
bufferOffsetMaxFileSize: ${SW_RECEIVER_BUFFER_OFFSET_MAX_FILE_SIZE:100} # Unit is MB
bufferDataMaxFileSize: ${SW_RECEIVER_BUFFER_DATA_MAX_FILE_SIZE:500} # Unit is MB
bufferFileCleanWhenRestart: ${SW_RECEIVER_BUFFER_FILE_CLEAN_WHEN_RESTART:false}
sampleRate: ${SW_TRACE_SAMPLE_RATE:10000} # The sample rate precision is 1/10000. 10000 means 100% sample in default.
receiver-jvm:
default:
service-mesh:
default:
bufferPath: ../mesh-buffer/ # Path to mesh telemetry data buffer files, suggest to use absolute path
bufferOffsetMaxFileSize: 100 # Unit is MB
bufferDataMaxFileSize: 500 # Unit is MB
bufferFileCleanWhenRestart: false
istio-telemetry:
default:
#service-mesh:
# default:
# bufferPath: ${SW_SERVICE_MESH_BUFFER_PATH:../mesh-buffer/} # Path to trace buffer files, suggest to use absolute path
# bufferOffsetMaxFileSize: ${SW_SERVICE_MESH_OFFSET_MAX_FILE_SIZE:100} # Unit is MB
# bufferDataMaxFileSize: ${SW_SERVICE_MESH_BUFFER_DATA_MAX_FILE_SIZE:500} # Unit is MB
# bufferFileCleanWhenRestart: ${SW_SERVICE_MESH_BUFFER_FILE_CLEAN_WHEN_RESTART:false}
#istio-telemetry:
# default:
#receiver_zipkin:
# default:
# host: ${SW_RECEIVER_ZIPKIN_HOST:0.0.0.0}
# port: ${SW_RECEIVER_ZIPKIN_PORT:9411}
# contextPath: ${SW_RECEIVER_ZIPKIN_CONTEXT_PATH:/}
query:
graphql:
path: /graphql
path: ${SW_QUERY_GRAPHQL_PATH:/graphql}
alarm:
default:
11 changes: 11 additions & 0 deletions apm-dist/src/main/assembly/component-libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,15 @@ http:
rpc:
id: 50
languages: Java,C#,Node.js
RabbitMQ:
id: 51
languages: Java
rabbitmq-producer:
id: 52
languages: Java
rabbitmq-consumer:
id: 53
languages: Java

# .NET/.NET Core components
# [3000, 4000) for C#/.NET only
Expand Down Expand Up @@ -252,6 +261,8 @@ Component-Server-Mappings:
kafka-consumer: Kafka
activemq-producer: ActiveMQ
activemq-consumer: ActiveMQ
rabbitmq-producer: RabbitMQ
rabbitmq-consumer: RabbitMQ
postgresql-jdbc-driver: PostgreSQL
Xmemcached: Memcached
Spymemcached: Memcached
Expand Down
4 changes: 2 additions & 2 deletions apm-dist/src/main/assembly/log4j2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
</Properties>
<Appenders>
<RollingFile name="RollingFile" fileName="${log-path}/skywalking-oap-server.log"
filePattern="${log-path}/skywalking-oap-server-%d{yyyy-MM-dd}-%i.log" >
filePattern="${log-path}/skywalking-oap-server-%d{yyyy-MM-dd}-%i.log" >
<PatternLayout>
<pattern>%d - %c -%-4r [%t] %-5p %x - %m%n</pattern>
<pattern>%d - %c - %L [%t] %-5p %x - %m%n</pattern>
</PatternLayout>
<Policies>
<SizeBasedTriggeringPolicy size="102400KB" />
Expand Down
6 changes: 3 additions & 3 deletions apm-webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>apm</artifactId>
<groupId>org.apache.skywalking</groupId>
<version>6.0.0-alpha</version>
<version>6.0.0-beta</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -18,7 +18,7 @@
<frontend-maven-plugin.version>1.6</frontend-maven-plugin.version>

<ui.path>${project.parent.basedir}/skywalking-ui</ui.path>
<webapp.version>6.0.0-alpha</webapp.version>
<webapp.version>6.0.0-beta</webapp.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -61,4 +61,4 @@
</plugin>
</plugins>
</build>
</project>
</project>
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>org.apache.skywalking</groupId>
<artifactId>apm</artifactId>
<version>6.0.0-alpha</version>
<version>6.0.0-beta</version>
<modules>
<module>apm-webapp</module>
<module>storage-elasticsearch5x-plugin</module>
Expand Down Expand Up @@ -49,9 +49,9 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<compiler.version>1.8</compiler.version>
<core.version>6.0.0-beta-SNAPSHOT</core.version>
<core.version>6.0.0-beta</core.version>
<lombok.version>1.18.0</lombok.version>
<elasticsearch.version>5.5.2</elasticsearch.version>
<elasticsearch.version>5.4.0</elasticsearch.version>
<maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
</properties>

Expand Down Expand Up @@ -133,4 +133,4 @@
</plugin>
</plugins>
</build>
</project>
</project>
Loading