Skip to content
Open
Show file tree
Hide file tree
Changes from 5 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
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,11 @@ To expose metrics for Prometheus scraping, update your WSO2 Integrator: MI Helm

```yaml
wso2:
config:
synapseHandlers:
- name: MetricHandler
class: org.wso2.micro.integrator.observability.metric.handler.MetricHandler
config:
synapseHandlers:
- name: MetricHandler
class: org.wso2.micro_integrator.observability.metric.handler.MetricHandler

```

For details, refer to the [Configure Helm charts for WSO2 Integrator: MI]({{base_path}}/install-and-setup/setup/deployment/configuring-helm-charts/) guide.
Expand All @@ -143,9 +144,10 @@ To expose metrics for Prometheus scraping, update your WSO2 Integrator: MI Helm

```yaml
wso2:
deployment:
envs:
JAVA_OPTS: "-DenablePrometheusApi=true"
deployment:
envs:
JAVA_OPTS: "-DenablePrometheusApi=true"

```

This enables the `/metric-service/metrics` endpoint exposed by WSO2 Integrator: MI for Prometheus scraping.
Expand All @@ -156,11 +158,12 @@ To expose metrics for Prometheus scraping, update your WSO2 Integrator: MI Helm

```yaml
wso2:
deployment:
annotations:
prometheus.io/wso2-path: "/metric-service/metrics"
prometheus.io/wso2-port: "9201"
prometheus.io/wso2-scrape: "true"
deployment:
annotations:
prometheus.io/wso2-path: "/metric-service/metrics"
prometheus.io/wso2-port: "9201"
prometheus.io/wso2-scrape: "true"

```

### Set up the Prometheus Agent
Expand Down Expand Up @@ -198,11 +201,7 @@ To deploy the Prometheus Agent in your Kubernetes cluster, you need to create a
name: prometheus-agent
rules:
- apiGroups: [""]
resources:
- pods
- nodes
- services
- endpoints
resources: ["pods", "nodes", "services", "endpoints"]
verbs: ["get", "list", "watch"]
---
apiVersion: rbac.authorization.k8s.io/v1
Expand Down Expand Up @@ -238,10 +237,8 @@ To deploy the Prometheus Agent in your Kubernetes cluster, you need to create a
prometheus.yml: |
global:
scrape_interval: 15s

remote_write:
- url: "http://host.docker.internal:9090/api/v1/write"

scrape_configs:
- job_name: 'kubernetes-pods-wso2-integration'
kubernetes_sd_configs:
Expand Down Expand Up @@ -457,7 +454,7 @@ config:
[PARSER]
Name mi_log
Format regex
Regex ^\[(?<time>[^\]]+)\] \[\] : mi :\s+(?<level>\w+)\s+\{(?<class>[^\}]+)\} - (?<message>.*)
Regex ^\[(?<time>[^\]]+)\] \[\] : mi :\s+(?<level>\w+)\s+\{(?<class>[^\}]+)\} - (<message>.*)
Time_Key time
Time_Format %Y-%m-%d %H:%M:%S,%L

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,14 @@ In a clustered deployment, you can view the list of WSO2 Integrator: MI instance

To enable observability for the WSO2 Integrator: MI servers, add the following Synapse handler to the `deployment.toml` file (stored in the `<MI_HOME>/conf/` folder).

### Step 1.5 - Enable XML Declaration in Payloads

If you want your outgoing messages to include the XML declaration, add the following Axis2 property to your Synapse configuration:

```xml
<property name="WRITE_XML_DECLARATION" scope="axis2" value="true"/>


```toml
[[synapse_handlers]]
name="CustomObservabilityHandler"
Expand Down