This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new de4293ef3ee CAMEL-20105: camel-micromemter - Make it easier to use
from camel-jbang
de4293ef3ee is described below
commit de4293ef3ee278d8d7c7286561a713953ee0ac4e
Author: Claus Ibsen <[email protected]>
AuthorDate: Fri Nov 17 16:40:39 2023 +0100
CAMEL-20105: camel-micromemter - Make it easier to use from camel-jbang
---
.../examples/json/micrometer-prometheus.json | 1 +
docs/components/modules/others/nav.adoc | 1 +
.../others/pages/micrometer-prometheus.adoc | 1 +
.../modules/ROOT/pages/camel-jbang.adoc | 42 ++++++++++++++++++++++
4 files changed, 45 insertions(+)
diff --git
a/docs/components/modules/others/examples/json/micrometer-prometheus.json
b/docs/components/modules/others/examples/json/micrometer-prometheus.json
new file mode 120000
index 00000000000..db6bc23154f
--- /dev/null
+++ b/docs/components/modules/others/examples/json/micrometer-prometheus.json
@@ -0,0 +1 @@
+../../../../../../components/camel-micrometer-prometheus/src/generated/resources/micrometer-prometheus.json
\ No newline at end of file
diff --git a/docs/components/modules/others/nav.adoc
b/docs/components/modules/others/nav.adoc
index 7c0864796dd..940308373db 100644
--- a/docs/components/modules/others/nav.adoc
+++ b/docs/components/modules/others/nav.adoc
@@ -32,6 +32,7 @@
** xref:mail-microsoft-oauth.adoc[Mail Microsoft Oauth]
** xref:main.adoc[Main]
** xref:observation.adoc[Micrometer Observability]
+** xref:micrometer-prometheus.adoc[Micrometer Prometheus]
** xref:microprofile-config.adoc[Microprofile Config]
** xref:microprofile-fault-tolerance.adoc[Microprofile Fault Tolerance]
** xref:microprofile-health.adoc[Microprofile Health]
diff --git a/docs/components/modules/others/pages/micrometer-prometheus.adoc
b/docs/components/modules/others/pages/micrometer-prometheus.adoc
new file mode 120000
index 00000000000..ec45e39d853
--- /dev/null
+++ b/docs/components/modules/others/pages/micrometer-prometheus.adoc
@@ -0,0 +1 @@
+../../../../../components/camel-micrometer-prometheus/src/main/docs/micrometer-prometheus.adoc
\ No newline at end of file
diff --git a/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc
b/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc
index 802cd744d62..c9996a0a3fa 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc
@@ -1458,6 +1458,48 @@ And finally the integration comes with embedded web
console (started with the `-
NOTE: For a service to be listed then Camel components must be able to
advertise the services using xref:camel-console.adoc[].
+==== Observability with metrics
+
+Camel JBang comes with support for using Micrometer for metrics that easily
can be made available.
+
+You simply either run with `--metrics` option, or enable and have more control
of the configuration in the `application.properties` file as shown below:
+
+[source,properties]
+----
+# enable HTTP server with metrics
+camel.server.enabled=true
+camel.server.metricsEnabled=true
+
+# turn on micrometer metrics
+camel.metrics.enabled=true
+# include more camel details
+camel.metrics.enableMessageHistory=true
+# include additional out-of-the-box micrometer metrics for cpu, jvm and used
file descriptors
+camel.metrics.binders=processor,jvm-info,file-descriptor
+----
+
+Then you can access metrics from the web browser at:
http://localhost:8080/q/metrics
+
+You can also see metrics from the CLI as shown below:
+
+[source,bash]
+----
+$ camel get metric
+ PID NAME TYPE METRIC ROUTE
VALUE MEAN MAX TOTAL
+ 11562 MyCoolCamel timer camel.exchange.event.notifier
3 12 27 35
+ 11562 MyCoolCamel timer camel.exchange.event.notifier
3 1 2 3
+ 11562 MyCoolCamel gauge camel.routes.added
3
+ 11562 MyCoolCamel gauge camel.routes.running
3
+ 11562 MyCoolCamel gauge jvm.info
1
+ 11562 MyCoolCamel gauge process.cpu.usage
0.0045185067010171795
+ 11562 MyCoolCamel gauge process.files.max
10240
+ 11562 MyCoolCamel gauge process.files.open
288
+ 11562 MyCoolCamel gauge system.cpu.count
8
+ 11562 MyCoolCamel gauge system.cpu.usage
0.15222772277227722
+ 11562 MyCoolCamel gauge system.load.average.1m
3.58935546875
+----
+
+
==== Listing state of Circuit Breakers
If your Camel integration uses
xref:components:eips:circuitBreaker-eip.adoc[Circuit Breaker] then