Skip to content

fix: Add support for AM/PM timestamp format for IBM MQ logs #20476

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

Closed
Closed
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: 1 addition & 1 deletion ibm_mq/assets/logs/ibm_mq.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pipeline:
source: message
grok:
supportRules: |
_date (%{date("MM/dd/yy HH:mm:ss"):timestamp}|%{date("dd/MM/yyyy HH:mm:ss"):timestamp})
_date (%{date("MM/dd/yy HH:mm:ss"):timestamp}|%{date("dd/MM/yyyy HH:mm:ss"):timestamp}|%{date("MM/dd/yyyy HH:mm:ss a"):timestamp})
matchRules: |
ibm_mq_rule %{_date}\s+- Process\(%{number:process}\) User\(%{notSpace:system.user}\)\s+Program\(%{notSpace:system.app}\)\s+Host\(%{notSpace:system.host}\)\s+Installation\(%{notSpace:system.installation}\)\s+VRMF\(%{notSpace:vrmf}\)%{data::keyvalue}(\n|\t|\s)+EXPLANATION:(\n|\s|\t)+%{data:error.message}(\n|\t|\s)+ACTION:(\n|\s|\t)+%{data:system.action}(\n|\t|\s)+-.*

Expand Down
46 changes: 46 additions & 0 deletions ibm_mq/assets/logs/ibm_mq_tests.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
id: "ibm_mq"

Check failure on line 1 in ibm_mq/assets/logs/ibm_mq_tests.yaml

View check run for this annotation

datadog-assets / validate-logs

Error in logs

Expected sample output: id: "ibm_mq" tests: - sample: |- 06/10/2025 06:08:56 AM - Process(91319.1) User(mqm) Program(runmqchl) Host(A.B.C) Installation(Installation1) VRMF(9.3.0.16) QMgr(QUEUEMGR) Time(2025-06-10T06:08:56.764Z) CommentInsert1(COMMENT) AMQ9299I: Channel 'CHANNEL' has started. EXPLANATION: The channel 'CHANNEL' has finished starting. ACTION: No action required. ----- amqrccca.c : 998 -------------------------------------------------------- result: custom: error: message: "The channel 'CHANNEL' has finished starting." level: "Error" process: 91319.1 system: action: "No action required." app: "runmqchl" host: "A.B.C" installation: "Installation1" user: "mqm" timestamp: 1749535736000 vrmf: "9.3.0.16" message: |- 06/10/2025 06:08:56 AM - Process(91319.1) User(mqm) Program(runmqchl) Host(A.B.C) Installation(Installation1) VRMF(9.3.0.16) QMgr(QUEUEMGR) Time(2025-06-10T06:08:56.764Z) CommentInsert1(COMMENT) AMQ9299I: Channel 'CHANNEL' has started. EXPLANATION: The channel 'CHANNEL' has finished starting. ACTION: No action required. ----- amqrccca.c : 998 -------------------------------------------------------- status: "error" tags: - "source:LOGS_SOURCE" timestamp: 1749535736000
tests:
-
sample: |-
Expand Down Expand Up @@ -75,4 +75,50 @@
tags:
- "source:LOGS_SOURCE"
timestamp: 1100687549000
- sample: |-
06/10/2025 06:08:56 AM - Process(91319.1) User(mqm) Program(runmqchl)
Host(A.B.C) Installation(Installation1)
VRMF(9.3.0.16) QMgr(QUEUEMGR)
Time(2025-06-10T06:08:56.764Z)
CommentInsert1(COMMENT)

AMQ9299I: Channel 'CHANNEL' has started.

EXPLANATION:
The channel 'CHANNEL' has finished starting.
ACTION:
No action required.
----- amqrccca.c : 998 --------------------------------------------------------
result:
custom:
error:
message: "The channel 'CHANNE:' has finished starting."
level: "Error"
process: 91319.1
system:
action: "No action required."
app: "runmqch1"
host: "A.B.C"
installation: "Installation1"
user: "mqm"
timestamp: 1749535736000
vrmf: "9.3.0.16"
message: |-
06/10/2025 06:08:56 AM - Process(91319.1) User(mqm) Program(runmqchl)
Host(A.B.C) Installation(Installation1)
VRMF(9.3.0.16) QMgr(QUEUEMGR)
Time(2025-06-10T06:08:56.764Z)
CommentInsert1(COMMENT)

AMQ9299I: Channel 'CHANNEL' has started.

EXPLANATION:
The channel 'CHANNEL' has finished starting.
ACTION:
No action required.
----- amqrccca.c : 998 --------------------------------------------------------
status: "error"
tags:
- "source:LOGS_SOURCE"
timestamp: 1749535736000

Loading