Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ActiveMQ classic monitoring #12109

Merged
merged 17 commits into from
Apr 18, 2024
Merged
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
2 changes: 2 additions & 0 deletions .github/workflows/skywalking.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,8 @@ jobs:
config: test/e2e-v2/cases/rocketmq/e2e.yaml
- name: ClickHouse
config: test/e2e-v2/cases/clickhouse/clickhouse-prometheus-endpoint/e2e.yaml
- name: ActiveMQ
config: test/e2e-v2/cases/activemq/e2e.yaml

- name: UI Menu BanyanDB
config: test/e2e-v2/cases/menu/banyandb/e2e.yaml
Expand Down
4 changes: 4 additions & 0 deletions docs/en/changes/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@
* Fix `Memory Swap Usage`/`Virtual Memory Usage` display with UI init.(Linux/Windows)
* Fix inaccurate APISIX metrics
* Fix inaccurate MongoDB Metrics.
* Support Apache ActiveMQ server monitoring.
* Add Service Hierarchy auto matching layer relationships (upper -> lower) as following:
- ACTIVEMQ -> K8S_SERVICE

#### UI

Expand Down Expand Up @@ -166,5 +169,6 @@
* Remove `OpenTelemetry Exporter` support from meter doc, as this has been flagged as unmaintained on OTEL upstream.
* Add doc of one-line quick start script for different storage types.
* Add FAQ for `Why is Clickhouse or Loki or xxx not supported as a storage option?`.
* Add `SWIP-8 Support ActiveMQ Monitoring`.

All issues and pull requests are [here](https://github.com/apache/skywalking/milestone/202?closed=1)
107 changes: 107 additions & 0 deletions docs/en/setup/backend/backend-activemq-monitoring.md

Large diffs are not rendered by default.

100 changes: 100 additions & 0 deletions docs/en/swip/SWIP-8.md

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion docs/en/swip/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,11 @@ All accepted and proposed SWIPs can be found in [here](https://github.com/apache

## Known SWIPs

Next SWIP Number: 6
Next SWIP Number: 8

### Accepted SWIPs

- [SWIP-8 Support ActiveMQ Monitoring](SWIP-8.md)
- [SWIP-5 Support ClickHouse Monitoring](SWIP-5.md)
- [SWIP-4 Support available layers of service in the topology](SWIP-4.md)
- [SWIP-3 Support RocketMQ Monitoring](SWIP-3.md)
Expand Down
2 changes: 2 additions & 0 deletions docs/menu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,8 @@ catalog:
path: "/en/setup/backend/backend-pulsar-monitoring"
- name: "RocketMQ"
path: "/en/setup/backend/backend-rocketmq-monitoring"
- name: "ActiveMQ"
path: "/en/setup/backend/backend-activemq-monitoring"
- name: "Self Observability"
catalog:
- name: "OAP self telemetry"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,12 @@ public enum Layer {
/**
* A high-performance, column-oriented SQL database management system (DBMS) for online analytical processing (OLAP).
*/
CLICKHOUSE(36, true);
CLICKHOUSE(36, true),

/**
* ActiveMQ is a popular open source, multi-protocol, Java-based message broker.
*/
ACTIVEMQ(37, true);

private final int value;
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public class UITemplateInitializer {
Layer.NGINX.name(),
Layer.ROCKETMQ.name(),
Layer.CLICKHOUSE.name(),
Layer.ACTIVEMQ.name(),
"custom"
};
private final UITemplateManagementService uiTemplateManagementService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ receiver-otel:
selector: ${SW_OTEL_RECEIVER:default}
default:
enabledHandlers: ${SW_OTEL_RECEIVER_ENABLED_HANDLERS:"otlp-metrics,otlp-logs"}
enabledOtelMetricsRules: ${SW_OTEL_RECEIVER_ENABLED_OTEL_METRICS_RULES:"apisix,nginx/*,k8s/*,istio-controlplane,vm,mysql/*,postgresql/*,oap,aws-eks/*,windows,aws-s3/*,aws-dynamodb/*,aws-gateway/*,redis/*,elasticsearch/*,rabbitmq/*,mongodb/*,kafka/*,pulsar/*,bookkeeper/*,rocketmq/*,clickhouse/*"}
enabledOtelMetricsRules: ${SW_OTEL_RECEIVER_ENABLED_OTEL_METRICS_RULES:"apisix,nginx/*,k8s/*,istio-controlplane,vm,mysql/*,postgresql/*,oap,aws-eks/*,windows,aws-s3/*,aws-dynamodb/*,aws-gateway/*,redis/*,elasticsearch/*,rabbitmq/*,mongodb/*,kafka/*,pulsar/*,bookkeeper/*,rocketmq/*,clickhouse/*,activemq/*"}

receiver-zipkin:
selector: ${SW_RECEIVER_ZIPKIN:-}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ hierarchy:
PULSAR:
K8S_SERVICE: short-name

ACTIVEMQ:
K8S_SERVICE: short-name
Comment on lines +63 to +64
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about the virtual MQ with this? Is that proposal possible?


VIRTUAL_DATABASE:
MYSQL: lower-short-name-with-fqdn
POSTGRESQL: lower-short-name-with-fqdn
Expand Down Expand Up @@ -103,6 +106,7 @@ layer-levels:
RABBITMQ: 2
KAFKA: 2
PULSAR: 2
ACTIVEMQ: 2

MESH_DP: 1

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# 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.

# This will parse a textual representation of a duration. The formats
# accepted are based on the ISO-8601 duration format {@code PnDTnHnMn.nS}
# with days considered to be exactly 24 hours.
# <p>
# Examples:
# <pre>
# "PT20.345S" -- parses as "20.345 seconds"
# "PT15M" -- parses as "15 minutes" (where a minute is 60 seconds)
# "PT10H" -- parses as "10 hours" (where an hour is 3600 seconds)
# "P2D" -- parses as "2 days" (where a day is 24 hours or 86400 seconds)
# "P2DT3H4M" -- parses as "2 days, 3 hours and 4 minutes"
# "P-6H3M" -- parses as "-6 hours and +3 minutes"
# "-P6H3M" -- parses as "-6 hours and -3 minutes"
# "-P-6H+3M" -- parses as "+6 hours and -3 minutes"
# </pre>
filter: "{ tags -> tags.job_name == 'activemq-monitoring' }" # The OpenTelemetry job name
expSuffix: tag({tags -> tags.cluster = 'activemq::' + tags.cluster}).instance(['cluster'], ['brokerName'], Layer.ACTIVEMQ)
metricPrefix: meter_activemq_broker
metricsRules:
# Uptime of the broker in day.
- name: uptime
exp: org_apache_activemq_Broker_UptimeMillis.max(['cluster','brokerName','service_instance_id'])
# If slave broker 1 else 0.
- name: state
exp: org_apache_activemq_Broker_Slave.sum(['cluster','brokerName','service_instance_id'])
# The number of clients connected to the broker currently.
- name: current_connentions
exp: org_apache_activemq_Broker_CurrentConnectionsCount.sum(['cluster','brokerName','service_instance_id'])
# The number of producers currently attached to the broker.
- name: current_producer_count
exp: org_apache_activemq_Broker_ProducerCount.sum(['cluster','brokerName','service_instance_id'])
# The number of consumers consuming messages from the broker.
- name: current_consumer_count
exp: org_apache_activemq_Broker_ConsumerCount.sum(['cluster','brokerName','service_instance_id'])
# Number of message producers active on destinations.
- name: producer_count
exp: org_apache_activemq_Broker_TotalProducerCount.sum(['cluster','brokerName','service_instance_id']).increase("PT1M")
# Number of message consumers subscribed to destinations.
- name: consumer_count
exp: org_apache_activemq_Broker_TotalConsumerCount.sum(['cluster','brokerName','service_instance_id']).increase("PT1M")
# The total number of messages sent to the broker.
- name: enqueue_count
exp: org_apache_activemq_Broker_TotalEnqueueCount.sum(['cluster','brokerName','service_instance_id']).increase("PT1M")
# The total number of messages the broker has delivered to consumers.
- name: dequeue_count
exp: org_apache_activemq_Broker_TotalDequeueCount.sum(['cluster','brokerName','service_instance_id']).increase("PT1M")
# The total number of messages sent to the broker per second.
- name: enqueue_rate
exp: org_apache_activemq_Broker_TotalEnqueueCount.sum(['cluster','brokerName','service_instance_id']).rate("PT1M")
# The total number of messages the broker has delivered to consumers per second.
- name: dequeue_rate
exp: org_apache_activemq_Broker_TotalDequeueCount.sum(['cluster','brokerName','service_instance_id']).rate("PT1M")
# Percentage of configured memory used by the broker.
- name: memory_percent_usage
exp: org_apache_activemq_Broker_MemoryPercentUsage.sum(['cluster','brokerName','service_instance_id'])
# Memory used by undelivered messages in bytes.
- name: memory_usage
exp: org_apache_activemq_Broker_MemoryUsageByteCount.sum(['cluster','brokerName','service_instance_id'])
# Memory limited used for holding undelivered messages before paging to temporary storage.
- name: memory_limit
exp: org_apache_activemq_Broker_MemoryLimit.sum(['cluster','brokerName','service_instance_id'])
# Percentage of available disk space used for persistent message storage.
- name: store_percent_usage
exp: org_apache_activemq_Broker_StorePercentUsage.sum(['cluster','brokerName','service_instance_id'])
# Disk limited used for persistent messages before producers are blocked.
- name: store_limit
exp: org_apache_activemq_Broker_StoreLimit.sum(['cluster','brokerName','service_instance_id'])
# Percentage of available disk space used for non-persistent message storage.
- name: temp_percent_usage
exp: org_apache_activemq_Broker_TempPercentUsage.sum(['cluster','brokerName','service_instance_id'])
# Disk limited used for non-persistent messages and temporary data before producers are blocked.
- name: temp_limit
exp: org_apache_activemq_Broker_TempLimit.sum(['cluster','brokerName','service_instance_id'])
# Average message size on this broker.
- name: average_message_size
exp: org_apache_activemq_Broker_AverageMessageSize.avg(['cluster','brokerName','service_instance_id'])
# Max message size on this broker.
- name: max_message_size
exp: org_apache_activemq_Broker_MaxMessageSize.max(['cluster','brokerName','service_instance_id'])
# Number of messages on this broker that have been dispatched but not acknowledged.
- name: queue_size
exp: org_apache_activemq_Broker_QueueSize.sum(['cluster','brokerName','destinationName'])
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# 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.

# This will parse a textual representation of a duration. The formats
# accepted are based on the ISO-8601 duration format {@code PnDTnHnMn.nS}
# with days considered to be exactly 24 hours.
# <p>
# Examples:
# <pre>
# "PT20.345S" -- parses as "20.345 seconds"
# "PT15M" -- parses as "15 minutes" (where a minute is 60 seconds)
# "PT10H" -- parses as "10 hours" (where an hour is 3600 seconds)
# "P2D" -- parses as "2 days" (where a day is 24 hours or 86400 seconds)
# "P2DT3H4M" -- parses as "2 days, 3 hours and 4 minutes"
# "P-6H3M" -- parses as "-6 hours and +3 minutes"
# "-P6H3M" -- parses as "-6 hours and -3 minutes"
# "-P-6H+3M" -- parses as "+6 hours and -3 minutes"
# </pre>

filter: "{ tags -> tags.job_name == 'activemq-monitoring' }" # The OpenTelemetry job name
expSuffix: tag({tags -> tags.cluster = 'activemq::' + tags.cluster}).service(['cluster'], Layer.ACTIVEMQ)
metricPrefix: meter_activemq_cluster
metricsRules:
# The average system load, range:[0,10000].
- name: system_load_average
exp: java_lang_OperatingSystem_SystemLoadAverage.avg(['cluster','service_instance_id'])*10000
# Threads currently used by the JVM.
- name: thread_count
exp: java_lang_Threading_ThreadCount.sum(['cluster','service_instance_id'])
# The initial amount of heap memory available.
- name: heap_memory_usage_init
exp: java_lang_Memory_HeapMemoryUsage_init.sum(['cluster','service_instance_id'])
# The memory is guaranteed to be available for the JVM to use.
- name: heap_memory_usage_committed
exp: java_lang_Memory_HeapMemoryUsage_committed.sum(['cluster','service_instance_id'])
# The amount of JVM heap memory currently in use.
- name: heap_memory_usage_used
exp: java_lang_Memory_HeapMemoryUsage_used.sum(['cluster','service_instance_id'])
# The maximum possible size of the heap memory.
- name: heap_memory_usage_max
exp: java_lang_Memory_HeapMemoryUsage_max.sum(['cluster','service_instance_id'])
# The gc count of G1 Old Generation(JDK[9,17]).
- name: gc_g1_old_collection_count
exp: java_lang_G1_Old_Generation_CollectionCount.tagEqual('type','GarbageCollector').sum(['cluster','service_instance_id']).increase("PT1M")
# The gc count of G1 Young Generation(JDK[9,17]).
- name: gc_g1_young_collection_count
exp: java_lang_G1_Young_Generation_CollectionCount.tagEqual('type','GarbageCollector').sum(['cluster','service_instance_id']).increase("PT1M")
# The gc time spent in G1 Old Generation in milliseconds(JDK[9,17]).
- name: gc_g1_old_collection_time
exp: java_lang_G1_Old_Generation_CollectionTime.tagEqual('type','GarbageCollector').sum(['cluster','service_instance_id']).increase("PT1M")
# The gc time spent in G1 Young Generation in milliseconds(JDK[9,17]).
- name: gc_g1_young_collection_time
exp: java_lang_G1_Young_Generation_CollectionTime.tagEqual('type','GarbageCollector').sum(['cluster','service_instance_id']).increase("PT1M")
# The gc count of PS MarkSweep(JDK[6,8]).
- name: gc_parallel_old_collection_count
exp: java_lang_GarbageCollector_CollectionCount.tagEqual('name','PS MarkSweep').sum(['cluster','service_instance_id']).increase("PT1M")
# The gc count of PS Scavenge(JDK[6,8]).
- name: gc_parallel_young_collection_count
exp: java_lang_GarbageCollector_CollectionCount.tagEqual('name','PS Scavenge').sum(['cluster','service_instance_id']).increase("PT1M")
# The gc time spent in PS MarkSweep in milliseconds(JDK[6,8]).
- name: gc_parallel_old_collection_time
exp: java_lang_GarbageCollector_CollectionTime.tagEqual('name','PS MarkSweep').sum(['cluster','service_instance_id']).increase("PT1M")
# The gc time spent in PS Scavenge in milliseconds(JDK[6,8]).
- name: gc_parallel_young_collection_time
exp: java_lang_GarbageCollector_CollectionTime.tagEqual('name','PS Scavenge').sum(['cluster','service_instance_id']).increase("PT1M")
# Number of messages that have been sent to the broker per second.
- name: enqueue_rate
exp: org_apache_activemq_Broker_TotalEnqueueCount.sum((['cluster'])).rate("PT1M")
# Number of messages that have been acknowledged or discarded on the broker per second.
- name: dequeue_rate
exp: org_apache_activemq_Broker_TotalDequeueCount.sum(['cluster']).rate("PT1M")
# Number of messages that has been delivered to consumers per second.
- name: dispatch_rate
exp: org_apache_activemq_Broker_DispatchCount.sum(['cluster']).rate("PT1M")
# Number of messages that have been expired per second.
- name: expired_rate
exp: org_apache_activemq_Broker_ExpiredCount.sum(['cluster']).rate("PT1M")
# The average time a message was held on this cluster.
- name: average_enqueue_time
exp: org_apache_activemq_Broker_AverageEnqueueTime.avg(['cluster'])
# The max time a message was held on this cluster.
- name: max_enqueue_time
exp: org_apache_activemq_Broker_MaxEnqueueTime.max(['cluster'])
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# 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.

# This will parse a textual representation of a duration. The formats
# accepted are based on the ISO-8601 duration format {@code PnDTnHnMn.nS}
# with days considered to be exactly 24 hours.
# <p>
# Examples:
# <pre>
# "PT20.345S" -- parses as "20.345 seconds"
# "PT15M" -- parses as "15 minutes" (where a minute is 60 seconds)
# "PT10H" -- parses as "10 hours" (where an hour is 3600 seconds)
# "P2D" -- parses as "2 days" (where a day is 24 hours or 86400 seconds)
# "P2DT3H4M" -- parses as "2 days, 3 hours and 4 minutes"
# "P-6H3M" -- parses as "-6 hours and +3 minutes"
# "-P6H3M" -- parses as "-6 hours and -3 minutes"
# "-P-6H+3M" -- parses as "+6 hours and -3 minutes"
# </pre>
filter: "{ tags -> tags.job_name == 'activemq-monitoring' }" # The OpenTelemetry job name
expSuffix: tag({tags -> tags.cluster = 'activemq::' + tags.cluster}).endpoint(['cluster'], ['destinationName'], Layer.ACTIVEMQ)
metricPrefix: meter_activemq_destination
metricsRules:
# Number of producers attached to this destination.
- name: producer_count
exp: org_apache_activemq_Broker_ProducerCount.sum(['cluster','destinationName','destinationType'])
# Number of consumers subscribed to this destination.
- name: consumer_count
exp: org_apache_activemq_Broker_ConsumerCount.sum(['cluster','destinationName','destinationType'])
# Number of consumers subscribed to the topics.
- name: topic_consumer_count
exp: org_apache_activemq_Broker_ConsumerCount.tagEqual('destinationType','Topic').sum(['cluster','destinationName'])
# The number of messages that have not been acknowledged by a consumer.
- name: queue_size
exp: org_apache_activemq_Broker_QueueSize.sum(['cluster','destinationName','destinationType'])
# Percentage of configured memory used by the destination.
- name: memory_usage
exp: org_apache_activemq_Broker_MemoryUsageByteCount.sum(['cluster','destinationName','destinationType'])
# Percentage of configured memory used by the destination.
- name: memory_percent_usage
exp: org_apache_activemq_Broker_MemoryPercentUsage.sum(['cluster','destinationName','destinationType'])
# The number of messages sent to the destination.
- name: enqueue_count
exp: org_apache_activemq_Broker_EnqueueCount.sum(['cluster','destinationName','destinationType'])
# The number of messages the destination has delivered to consumers.
- name: dequeue_count
exp: org_apache_activemq_Broker_DequeueCount.sum(['cluster','destinationName','destinationType'])
# The average time a message was held on this destination.
- name: average_enqueue_time
exp: org_apache_activemq_Broker_AverageEnqueueTime.sum(['cluster','destinationName','destinationType'])
# The max time a message was held on this destination.
- name: max_enqueue_time
exp: org_apache_activemq_Broker_MaxEnqueueTime.sum(['cluster','destinationName','destinationType'])
# Number of messages that has been delivered to consumers.
- name: dispatch_count
exp: org_apache_activemq_Broker_DispatchCount.sum(['cluster','destinationName','destinationType'])
# Number of messages that have been expired.
- name: expired_count
exp: org_apache_activemq_Broker_ExpiredCount.sum(['cluster','destinationName','destinationType'])
# Number of messages that have been dispatched to but not acknowledged by consumers.
- name: inflight_count
exp: org_apache_activemq_Broker_InFlightCount.sum(['cluster','destinationName','destinationType'])
# Average message size on this destination.
- name: average_message_size
exp: org_apache_activemq_Broker_AverageMessageSize.avg(['cluster','destinationName','destinationType'])
# Max message size on this destination.
- name: max_message_size
exp: org_apache_activemq_Broker_MaxMessageSize.max(['cluster','destinationName','destinationType'])
Loading
Loading