This repository has been archived by the owner on Jan 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 222
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
290 additions
and
15 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
### JSON Logger configuration ### | ||
|
||
# Indicate which fields should not be logged | ||
json.logger.disabledFields= | ||
|
||
# Modify timestamp dateformat / timezone | ||
# - DateTime: Defaults to ISO format | ||
# - TimeZone: Defaults to UTC. Refer to https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for valid timezones | ||
#json.logger.dateformat=yyyy-MM-dd HH:mm:ss.SSS | ||
#json.logger.timezone=US/Eastern | ||
|
||
# [DO NOT EDIT] To be replaced by Maven build | ||
json.logger.application.name=${project.artifactId} | ||
json.logger.application.version=${project.version} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<form> | ||
<label>Average Response Times</label> | ||
<fieldset submitButton="false"> | ||
<input type="dropdown" searchWhenChanged="true" token="env"> | ||
<label>Environments</label> | ||
<choice value="dev">Development</choice> | ||
<choice value="test">Test</choice> | ||
<choice value="prod">Production</choice> | ||
<default>dev</default> | ||
<initialValue>dev</initialValue> | ||
</input> | ||
<input type="time" token="timestamp"> | ||
<label>Time Frame</label> | ||
<default> | ||
<earliest>@d</earliest> | ||
<latest>now</latest> | ||
</default> | ||
</input> | ||
</fieldset> | ||
<row> | ||
<panel> | ||
<chart> | ||
<title>Customer 360 Process API</title> | ||
<search> | ||
<query>host="splunk-json-logger.localtunnel.me" environment=$env$ applicationName=proc-customer360-api tracePoint=END | stats avg(elapsed) as elapsed min(elapsed) as min max(elapsed) as max | gauge elapsed 0 250 450 650</query> | ||
<earliest>$timestamp.earliest$</earliest> | ||
<latest>$timestamp.latest$</latest> | ||
<refresh>5s</refresh> | ||
<refreshType>delay</refreshType> | ||
</search> | ||
<option name="charting.axisTitleX.visibility">visible</option> | ||
<option name="charting.axisTitleY.visibility">visible</option> | ||
<option name="charting.axisTitleY2.visibility">visible</option> | ||
<option name="charting.chart">radialGauge</option> | ||
<option name="charting.chart.rangeValues">[0,250,450,650]</option> | ||
<option name="charting.chart.style">minimal</option> | ||
<option name="charting.gaugeColors">["0x33cc7a","0xf2be24","0xd1344e"]</option> | ||
<option name="charting.legend.placement">right</option> | ||
<option name="refresh.display">progressbar</option> | ||
</chart> | ||
</panel> | ||
<panel> | ||
<chart> | ||
<title>CRM Customer System API</title> | ||
<search> | ||
<query>host="splunk-json-logger.localtunnel.me" environment=$env$ applicationName=sys-crm-customer-api tracePoint=END | stats avg(elapsed) as elapsed min(elapsed) as min max(elapsed) as max | gauge elapsed 0 250 450 650</query> | ||
<earliest>$timestamp.earliest$</earliest> | ||
<latest>$timestamp.latest$</latest> | ||
<refresh>5s</refresh> | ||
<refreshType>delay</refreshType> | ||
</search> | ||
<option name="charting.chart">radialGauge</option> | ||
<option name="charting.chart.rangeValues">[0,250,450,650]</option> | ||
<option name="charting.chart.style">minimal</option> | ||
<option name="charting.gaugeColors">["0x33cc7a","0xf2be24","0xd1344e"]</option> | ||
<option name="refresh.display">progressbar</option> | ||
</chart> | ||
</panel> | ||
<panel> | ||
<chart> | ||
<title>ERP Orders System API</title> | ||
<search> | ||
<query>host="splunk-json-logger.localtunnel.me" environment=$env$ applicationName=sys-erp-orders-api tracePoint=END | stats avg(elapsed) as elapsed min(elapsed) as min max(elapsed) as max | gauge elapsed 0 250 450 650</query> | ||
<earliest>$timestamp.earliest$</earliest> | ||
<latest>$timestamp.latest$</latest> | ||
<refresh>5s</refresh> | ||
<refreshType>delay</refreshType> | ||
</search> | ||
<option name="charting.chart">radialGauge</option> | ||
<option name="charting.chart.rangeValues">[0,250,450,650]</option> | ||
<option name="charting.chart.style">minimal</option> | ||
<option name="charting.gaugeColors">["0x33cc7a","0xf8be34","0xd1344e"]</option> | ||
<option name="refresh.display">progressbar</option> | ||
</chart> | ||
</panel> | ||
</row> | ||
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,151 @@ | ||
<form> | ||
<label>API Dashboard</label> | ||
<fieldset submitButton="true" autoRun="true"> | ||
<input type="dropdown" searchWhenChanged="false" token="env"> | ||
<label>Environments</label> | ||
<choice value="dev">Development</choice> | ||
<choice value="test">Test</choice> | ||
<choice value="prod">Production</choice> | ||
<default>dev</default> | ||
<initialValue>dev</initialValue> | ||
</input> | ||
<input type="time" token="timestamp"> | ||
<label>Time Frame</label> | ||
<default> | ||
<earliest>-7d@h</earliest> | ||
<latest>now</latest> | ||
</default> | ||
</input> | ||
</fieldset> | ||
<row> | ||
<panel> | ||
<table> | ||
<title>API Calls by Resource</title> | ||
<search> | ||
<query>host="splunk-json-logger.localtunnel.me" environment=$env$ tracePoint=END | | ||
regex locationInfo.rootContainer="\b(get|post|put|patch|delete)\b" | | ||
eval appPrefix=substr(applicationName,1,3) | | ||
eval appType = coalesce( case(appPrefix = "sys", "System API", appPrefix = "pro", "Process API", appPrefix = "exp", "Experience API"), "Unknown") | | ||
stats count(correlationId), avg(elapsed) BY appType, applicationName, locationInfo.rootContainer | | ||
rename applicationName AS "API Name", locationInfo.rootContainer AS "API Resource", count(correlationId) AS "# Messages", avg(elapsed) AS "Average response time", appType AS "API Type"</query> | ||
<earliest>$timestamp.earliest$</earliest> | ||
<latest>$timestamp.latest$</latest> | ||
<refresh>30s</refresh> | ||
<refreshType>delay</refreshType> | ||
</search> | ||
<option name="count">10</option> | ||
<format type="number" field="Average response time"> | ||
<option name="unit">ms</option> | ||
</format> | ||
</table> | ||
</panel> | ||
</row> | ||
<row> | ||
<panel> | ||
<table> | ||
<title>Recent 5 Successful Transactions</title> | ||
<search> | ||
<query>host="splunk-json-logger.localtunnel.me" environment=$env$ tracePoint=START | | ||
join correlationId, applicationName [search host="splunk-json-logger.localtunnel.me" environment=$env$ tracePoint=END] | | ||
head 5 | | ||
sort - timestamp | | ||
table timestamp applicationName correlationId elapsed | | ||
rename applicationName AS "API Name", elapsed AS "Elapsed Time", correlationId AS "Correlation Id", timestamp AS "Timestamp"</query> | ||
<earliest>$timestamp.earliest$</earliest> | ||
<latest>$timestamp.latest$</latest> | ||
<refresh>30s</refresh> | ||
<refreshType>delay</refreshType> | ||
</search> | ||
<option name="count">10</option> | ||
<option name="refresh.display">progressbar</option> | ||
<format type="number" field="Elapsed Time"> | ||
<option name="precision">0</option> | ||
<option name="unit">ms</option> | ||
</format> | ||
</table> | ||
</panel> | ||
<panel> | ||
<table> | ||
<title>Recent 5 Failed Transactions</title> | ||
<search> | ||
<query>host="splunk-json-logger.localtunnel.me" environment=$env$ (tracePoint=EXCEPTION OR priority=ERROR) | | ||
head 5 | | ||
sort - timestamp | | ||
table timestamp applicationName correlationId | | ||
rename applicationName AS "API Name", elapsed AS "Elapsed Time", correlationId AS "Correlation Id"</query> | ||
<earliest>$timestamp.earliest$</earliest> | ||
<latest>$timestamp.latest$</latest> | ||
<refresh>30s</refresh> | ||
<refreshType>delay</refreshType> | ||
</search> | ||
<option name="count">10</option> | ||
<option name="refresh.display">progressbar</option> | ||
</table> | ||
</panel> | ||
</row> | ||
<row> | ||
<panel> | ||
<table> | ||
<title>Unique Messages Received</title> | ||
<search> | ||
<query>host="splunk-json-logger.localtunnel.me" environment=$env$ tracePoint=START | stats count(correlationId) by applicationName | rename applicationName AS "API Name", count(correlationId) AS "# Messages"</query> | ||
<earliest>0</earliest> | ||
<latest></latest> | ||
<refresh>30s</refresh> | ||
<refreshType>delay</refreshType> | ||
</search> | ||
<option name="count">10</option> | ||
<option name="refresh.display">progressbar</option> | ||
</table> | ||
</panel> | ||
<panel> | ||
<table> | ||
<title>Number of Successful Calls</title> | ||
<search> | ||
<query>host="splunk-json-logger.localtunnel.me" environment=$env$ tracePoint=END | stats count(correlationId) by applicationName | rename applicationName AS "API Name", count(correlationId) AS "# Messages"</query> | ||
<earliest>0</earliest> | ||
<latest></latest> | ||
<refresh>30s</refresh> | ||
<refreshType>delay</refreshType> | ||
</search> | ||
<option name="refresh.display">progressbar</option> | ||
</table> | ||
</panel> | ||
<panel> | ||
<table> | ||
<title>Number of Errors</title> | ||
<search> | ||
<query>host="splunk-json-logger.localtunnel.me" environment=$env$ (tracePoint=EXCEPTION OR priority=ERROR) | stats count(correlationId) by applicationName | rename applicationName AS "API Name", count(correlationId) AS "# Messages"</query> | ||
<earliest>0</earliest> | ||
<latest></latest> | ||
<refresh>30s</refresh> | ||
<refreshType>delay</refreshType> | ||
</search> | ||
<option name="refresh.display">progressbar</option> | ||
</table> | ||
</panel> | ||
</row> | ||
<row> | ||
<panel> | ||
<table> | ||
<title>All API Transactions</title> | ||
<search> | ||
<query>host="splunk-json-logger.localtunnel.me" environment=$env$ tracePoint=END | | ||
join type=left applicationName, correlationId [search host="splunk-json-logger.localtunnel.me" environment=$env$ tracePoint=END] | | ||
sort - timestamp | | ||
table timestamp, applicationName correlationId elapsed | | ||
rename applicationName AS "API Name", correlationId AS "Correlation Id", elapsed AS "Elapsed Time", timestamp AS "Timestamp"</query> | ||
<earliest>$timestamp.earliest$</earliest> | ||
<latest>$timestamp.latest$</latest> | ||
<refresh>30s</refresh> | ||
<refreshType>delay</refreshType> | ||
</search> | ||
<option name="count">10</option> | ||
<format type="number" field="Elapsed Time"> | ||
<option name="precision">0</option> | ||
<option name="unit">ms</option> | ||
</format> | ||
</table> | ||
</panel> | ||
</row> | ||
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Configuration> | ||
|
||
<Appenders> | ||
<!-- CloudHub Logging configuration --> | ||
<Log4J2CloudhubLogAppender name="CLOUDHUB" | ||
addressProvider="com.mulesoft.ch.logging.DefaultAggregatorAddressProvider" | ||
applicationContext="com.mulesoft.ch.logging.DefaultApplicationContext" | ||
appendRetryIntervalMs="${sys:logging.appendRetryInterval}" | ||
appendMaxAttempts="${sys:logging.appendMaxAttempts}" | ||
batchSendIntervalMs="${sys:logging.batchSendInterval}" | ||
batchMaxRecords="${sys:logging.batchMaxRecords}" memBufferMaxSize="${sys:logging.memBufferMaxSize}" | ||
journalMaxWriteBatchSize="${sys:logging.journalMaxBatchSize}" | ||
journalMaxFileSize="${sys:logging.journalMaxFileSize}" | ||
clientMaxPacketSize="${sys:logging.clientMaxPacketSize}" | ||
clientConnectTimeoutMs="${sys:logging.clientConnectTimeout}" | ||
clientSocketTimeoutMs="${sys:logging.clientSocketTimeout}" | ||
serverAddressPollIntervalMs="${sys:logging.serverAddressPollInterval}" | ||
serverHeartbeatSendIntervalMs="${sys:logging.serverHeartbeatSendIntervalMs}" | ||
statisticsPrintIntervalMs="${sys:logging.statisticsPrintIntervalMs}"> | ||
<PatternLayout pattern="[%d{MM-dd HH:mm:ss}] %-5p %c{1} [%t]: %m%n" /> | ||
</Log4J2CloudhubLogAppender> | ||
|
||
<!-- Splunk HTTP event collector configuration for multiple environments. | ||
It determines the configuration based on the environmnet variable. --> | ||
<Http name="Splunk" url="${sys:splunk.server}/services/collector/raw" | ||
method="POST"> | ||
<PatternLayout pattern="%m" /> | ||
<Property name="Authorization" value="Splunk YOUR_SPLUNK_TOKEN" /> | ||
</Http> | ||
</Appenders> | ||
<Loggers> | ||
|
||
<!-- Http Logger shows wire traffic on DEBUG. --> | ||
<!--AsyncLogger name="org.mule.service.http.impl.service.HttpMessageLogger" level="DEBUG" / --> | ||
<AsyncLogger name="org.mule.service.http" level="WARN" /> | ||
<AsyncLogger name="org.mule.extension.http" level="WARN" /> | ||
|
||
<!-- Mule classes --> | ||
<AsyncLogger name="org.mule" level="INFO" /> | ||
<AsyncLogger name="com.mulesoft" level="INFO" /> | ||
|
||
<AsyncRoot level="INFO"> | ||
<AppenderRef ref="CLOUDHUB" /> | ||
<AppenderRef ref="Splunk" /> | ||
</AsyncRoot> | ||
</Loggers> | ||
</Configuration> |