-
Notifications
You must be signed in to change notification settings - Fork 163
[ibm-mq-metrics] Connection errors counter #2122
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
Open
atoulme
wants to merge
4
commits into
open-telemetry:main
Choose a base branch
from
atoulme:add_connection_errors
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+396
−0
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
4d9a69d
Add a counter that records the number of times the connection was not…
github-actions[bot] 3b46ef9
./gradlew spotlessApply
otelbot[bot] 8aa59e3
Update ibm-mq-metrics/model/metrics.yaml
atoulme 4cbe700
regen with new prefix
github-actions[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
302 changes: 302 additions & 0 deletions
302
ibm-mq-metrics/src/integrationTest/resources/conf/test-bad-config.yml
This file contains hidden or 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,302 @@ | ||
queueManagers: | ||
- name: "QM1" | ||
host: "localhost" | ||
port: 1417 | ||
|
||
#The transport type for the queue manager connection, the default is "Bindings" for a binding type connection | ||
#For bindings type, connection WMQ extension (i.e machine agent) need to be on the same machine on which WebbsphereMQ server is running | ||
#For client type, connection change it to "Client". | ||
transportType: "Client" | ||
|
||
#Channel name of the queue manager, channel should be server-conn type. | ||
#This field is not required in case of transportType: Bindings | ||
channelName: DEV.ADMIN.SVRCONN | ||
|
||
#for user access level, please check "Access Permissions" section on the extensions page | ||
#comment out the username and password in case of transportType: Bindings. | ||
username: "admin" | ||
password: "passw0rd" | ||
|
||
queueFilters: | ||
#Can provide complete queue name or generic names. A generic name is a character string followed by an asterisk (*), | ||
#for example ABC*, and it selects all objects having names that start with the selected character string. | ||
#An asterisk on its own matches all possible names. | ||
include: ["*"] | ||
exclude: | ||
#type value: STARTSWITH, EQUALS, ENDSWITH, CONTAINS | ||
- type: "STARTSWITH" | ||
#The name of the queue or queue name pattern as per queue filter, comma separated values | ||
values: ["SYSTEM","AMQ"] | ||
|
||
|
||
channelFilters: | ||
#Can provide complete channel name or generic names. A generic name is a character string followed by an asterisk (*), | ||
#for example ABC*, and it selects all objects having names that start with the selected character string. | ||
#An asterisk on its own matches all possible names. | ||
include: ["*"] | ||
exclude: | ||
#type value: STARTSWITH, EQUALS, ENDSWITH, CONTAINS | ||
- type: "STARTSWITH" | ||
#The name of the queue or queue name pattern as per queue filter, comma separated values | ||
values: ["SYSTEM"] | ||
|
||
listenerFilters: | ||
#Can provide complete channel name or generic names. A generic name is a character string followed by an asterisk (*), | ||
#for example ABC*, and it selects all objects having names that start with the selected character string. | ||
#An asterisk on its own matches all possible names. | ||
include: ["*"] | ||
exclude: | ||
#type value: STARTSWITH, EQUALS, ENDSWITH, CONTAINS | ||
- type: "STARTSWITH" | ||
#The name of the queue or queue name pattern as per queue filter, comma separated values | ||
values: ["SYSTEM"] | ||
|
||
topicFilters: | ||
# For topics, IBM MQ uses the topic wildcard characters ('#' and '+') and does not treat a trailing asterisk as a wildcard | ||
# https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_7.5.0/com.ibm.mq.pla.doc/q005020_.htm | ||
include: ["#"] | ||
exclude: | ||
#type value: STARTSWITH, EQUALS, ENDSWITH, CONTAINS | ||
- type: "STARTSWITH" | ||
#The name of the queue or queue name pattern as per queue filter, comma separated values | ||
values: ["SYSTEM","$SYS"] | ||
|
||
mqMetrics: | ||
# This Object will extract queue manager metrics | ||
- metricsType: "queueMgrMetrics" | ||
metrics: | ||
include: | ||
- Status: | ||
alias: "Status" | ||
ibmConstant: "com.ibm.mq.constants.CMQCFC.MQIACF_Q_MGR_STATUS" | ||
aggregationType: "OBSERVATION" | ||
timeRollUpType: "AVERAGE" | ||
clusterRollUpType: "INDIVIDUAL" | ||
- ConnectionCount: | ||
alias: "ConnectionCount" | ||
ibmConstant: "com.ibm.mq.constants.CMQCFC.MQIACF_CONNECTION_COUNT" | ||
|
||
- ReusableLogSize: | ||
alias: "Reusable Log Size" | ||
ibmConstant: "com.ibm.mq.constants.CMQCFC.MQIACF_REUSABLE_LOG_SIZE" | ||
ibmCommand: "MQCMD_INQUIRE_Q_MGR_STATUS" | ||
|
||
- RestartLogSize: | ||
alias: "Restart Log Size" | ||
ibmConstant: "com.ibm.mq.constants.CMQCFC.MQIACF_RESTART_LOG_SIZE" | ||
ibmCommand: "MQCMD_INQUIRE_Q_MGR_STATUS" | ||
|
||
- ArchiveLogSize: | ||
alias: "Archive Log Size" | ||
ibmConstant: "com.ibm.mq.constants.CMQCFC.MQIACF_ARCHIVE_LOG_SIZE" | ||
ibmCommand: "MQCMD_INQUIRE_Q_MGR_STATUS" | ||
|
||
- StatisticsInterval: | ||
alias: "Statistics Interval" | ||
ibmConstant: "com.ibm.mq.constants.CMQC.MQIA_STATISTICS_INTERVAL" | ||
ibmCommand: "MQCMD_INQUIRE_Q_MGR" | ||
|
||
# This Object will extract queue metrics | ||
- metricsType: "queueMetrics" | ||
metrics: | ||
include: | ||
- MaxQueueDepth: | ||
alias: "Max Queue Depth" | ||
ibmConstant: "com.ibm.mq.constants.CMQC.MQIA_MAX_Q_DEPTH" | ||
ibmCommand: "MQCMD_INQUIRE_Q" | ||
|
||
- CurrentQueueDepth: | ||
alias: "Current Queue Depth" | ||
ibmConstant: "com.ibm.mq.constants.CMQC.MQIA_CURRENT_Q_DEPTH" | ||
ibmCommand: "MQCMD_INQUIRE_Q" | ||
|
||
- CurrentQueueFileSize: | ||
alias: "Current queue file size" | ||
ibmConstant: "com.ibm.mq.constants.CMQCFC.MQIACF_CUR_Q_FILE_SIZE" | ||
ibmCommand: "MQCMD_INQUIRE_Q_STATUS" | ||
|
||
- MaxQueueFileSize: | ||
alias: "Current maximum queue file size" | ||
ibmConstant: "com.ibm.mq.constants.CMQCFC.MQIACF_CUR_MAX_FILE_SIZE" | ||
ibmCommand: "MQCMD_INQUIRE_Q_STATUS" | ||
|
||
- OpenInputCount: | ||
alias: "Open Input Count" | ||
ibmConstant: "com.ibm.mq.constants.CMQC.MQIA_OPEN_INPUT_COUNT" | ||
ibmCommand: "MQCMD_INQUIRE_Q" | ||
|
||
- OpenOutputCount: | ||
alias: "Open Output Count" | ||
ibmConstant: "com.ibm.mq.constants.CMQC.MQIA_OPEN_OUTPUT_COUNT" | ||
ibmCommand: "MQCMD_INQUIRE_Q" | ||
|
||
- OldestMsgAge: | ||
alias: "OldestMsgAge" | ||
ibmConstant: "com.ibm.mq.constants.CMQCFC.MQIACF_OLDEST_MSG_AGE" | ||
ibmCommand: "MQCMD_INQUIRE_Q_STATUS" | ||
aggregationType: "OBSERVATION" | ||
timeRollUpType: "CURRENT" | ||
clusterRollUpType: "INDIVIDUAL" | ||
|
||
- UncommittedMsgs: | ||
alias: "UncommittedMsgs" | ||
ibmConstant: "com.ibm.mq.constants.CMQCFC.MQIACF_UNCOMMITTED_MSGS" | ||
ibmCommand: "MQCMD_INQUIRE_Q_STATUS" | ||
|
||
- OnQTime: | ||
ibmConstant: "com.ibm.mq.constants.CMQCFC.MQIACF_Q_TIME_INDICATOR" | ||
ibmCommand: "MQCMD_INQUIRE_Q_STATUS" | ||
aggregationType: "OBSERVATION" | ||
timeRollUpType: "CURRENT" | ||
clusterRollUpType: "INDIVIDUAL" | ||
|
||
- HighQDepth: | ||
alias: "HighQDepth" | ||
ibmConstant: "com.ibm.mq.constants.CMQC.MQIA_HIGH_Q_DEPTH" | ||
ibmCommand: "MQCMD_RESET_Q_STATS" | ||
|
||
- MsgDeqCount: | ||
alias: "MsgDeqCount" | ||
ibmConstant: "com.ibm.mq.constants.CMQC.MQIA_MSG_DEQ_COUNT" | ||
ibmCommand: "MQCMD_RESET_Q_STATS" | ||
|
||
- MsgEnqCount: | ||
alias: "MsgEnqCount" | ||
ibmConstant: "com.ibm.mq.constants.CMQC.MQIA_MSG_ENQ_COUNT" | ||
ibmCommand: "MQCMD_RESET_Q_STATS" | ||
|
||
- UncommittedMsgs: | ||
alias: "Uncommitted Messages" | ||
ibmConstant: "com.ibm.mq.constants.CMQCFC.MQIACF_UNCOMMITTED_MSGS" | ||
ibmCommand: "MQCMD_INQUIRE_Q_STATUS" | ||
|
||
- ServiceInterval: | ||
alias: "Service Interval" | ||
ibmConstant: "com.ibm.mq.constants.CMQC.MQIA_Q_SERVICE_INTERVAL" | ||
ibmCommand: "MQCMD_INQUIRE_Q" | ||
|
||
- ServiceIntervalEvent: | ||
alias: "Service Interval Event" | ||
ibmConstant: "com.ibm.mq.constants.CMQC.MQIA_Q_SERVICE_INTERVAL_EVENT" | ||
ibmCommand: "MQCMD_INQUIRE_Q" | ||
|
||
# This Object will extract channel metrics | ||
- metricsType: "channelMetrics" | ||
metrics: | ||
include: | ||
- Messages: | ||
alias: "Messages" | ||
ibmConstant: "com.ibm.mq.constants.CMQCFC.MQIACH_MSGS" | ||
ibmCommand: "MQCMD_INQUIRE_CHANNEL_STATUS" | ||
|
||
- Status: | ||
alias: "Status" | ||
ibmConstant: "com.ibm.mq.constants.CMQCFC.MQIACH_CHANNEL_STATUS" #http://www.ibm.com/support/knowledgecenter/SSFKSJ_7.5.0/com.ibm.mq.ref.dev.doc/q090880_.htm | ||
aggregationType: "OBSERVATION" | ||
timeRollUpType: "AVERAGE" | ||
clusterRollUpType: "INDIVIDUAL" | ||
ibmCommand: "MQCMD_INQUIRE_CHANNEL_STATUS" | ||
|
||
- ByteSent: | ||
alias: "Byte Sent" | ||
ibmConstant: "com.ibm.mq.constants.CMQCFC.MQIACH_BYTES_SENT" | ||
ibmCommand: "MQCMD_INQUIRE_CHANNEL_STATUS" | ||
|
||
- ByteReceived: | ||
alias: "Byte Received" | ||
ibmConstant: "com.ibm.mq.constants.CMQCFC.MQIACH_BYTES_RECEIVED" | ||
ibmCommand: "MQCMD_INQUIRE_CHANNEL_STATUS" | ||
|
||
- BuffersSent: | ||
alias: "Buffers Sent" | ||
ibmConstant: "com.ibm.mq.constants.CMQCFC.MQIACH_BUFFERS_SENT" | ||
ibmCommand: "MQCMD_INQUIRE_CHANNEL_STATUS" | ||
|
||
- BuffersReceived: | ||
alias: "Buffers Received" | ||
ibmConstant: "com.ibm.mq.constants.CMQCFC.MQIACH_BUFFERS_RECEIVED" | ||
ibmCommand: "MQCMD_INQUIRE_CHANNEL_STATUS" | ||
|
||
- CurrentSharingConversations: | ||
alias: "Current Sharing Conversations" | ||
ibmConstant: "com.ibm.mq.constants.CMQCFC.MQIACH_CURRENT_SHARING_CONVS" | ||
|
||
- MaxSharingConversations: | ||
alias: "Max Sharing Conversations" | ||
ibmConstant: "com.ibm.mq.constants.CMQCFC.MQIACH_MAX_SHARING_CONVS" | ||
|
||
- MaxInstances: | ||
alias: "Max Instances" | ||
ibmConstant: "com.ibm.mq.constants.CMQCFC.MQIACH_MAX_INSTANCES" | ||
ibmCommand: "MQCMD_INQUIRE_CHANNEL" | ||
|
||
- MaxInstancesPerClient: | ||
alias: "Max Instances per Client" | ||
ibmConstant: "com.ibm.mq.constants.CMQCFC.MQIACH_MAX_INSTS_PER_CLIENT" | ||
ibmCommand: "MQCMD_INQUIRE_CHANNEL" | ||
|
||
- MsgRetryCount: | ||
alias: "Message Retry Count" | ||
ibmConstant: "com.ibm.mq.constants.CMQCFC.MQIACH_MR_COUNT" | ||
ibmCommand: "MQCMD_INQUIRE_CHANNEL" | ||
|
||
- MsgsReceived: | ||
alias: "Message Received Count" | ||
ibmConstant: "com.ibm.mq.constants.CMQCFC.MQIACH_MSGS_RECEIVED" | ||
ibmCommand: "MQCMD_INQUIRE_CHANNEL" | ||
|
||
- MsgsSent: | ||
alias: "Message Sent" | ||
ibmConstant: "com.ibm.mq.constants.CMQCFC.MQIACH_MSGS_SENT" | ||
ibmCommand: "MQCMD_INQUIRE_CHANNEL" | ||
|
||
- metricsType: "listenerMetrics" | ||
metrics: | ||
include: | ||
- Status: | ||
alias: "Status" | ||
ibmConstant: "com.ibm.mq.constants.CMQCFC.MQIACH_LISTENER_STATUS" | ||
aggregationType: "OBSERVATION" | ||
timeRollUpType: "AVERAGE" | ||
clusterRollUpType: "INDIVIDUAL" | ||
|
||
# This Object will extract topic metrics | ||
- metricsType: "topicMetrics" | ||
metrics: | ||
include: | ||
- PublishCount: | ||
alias: "Publish Count" | ||
ibmConstant: "com.ibm.mq.constants.CMQC.MQIA_PUB_COUNT" | ||
ibmCommand: "MQCMD_INQUIRE_TOPIC_STATUS" | ||
- SubscriptionCount: | ||
alias: "Subscription Count" | ||
ibmConstant: "com.ibm.mq.constants.CMQC.MQIA_SUB_COUNT" | ||
ibmCommand: "MQCMD_INQUIRE_TOPIC_STATUS" | ||
|
||
# Sets up reading configuration events from the configuration queue. | ||
- metricsType: "configurationMetrics" | ||
metrics: | ||
include: | ||
- MaxHandles: | ||
alias: "Max Handles" | ||
ibmConstant: "com.ibm.mq.constants.CMQC.MQIA_MAX_HANDLES" | ||
|
||
#Run it as a scheduled task instead of running every minute. | ||
#If you want to run this every minute, comment this out | ||
#taskSchedule: | ||
# numberOfThreads: 1 | ||
# taskDelaySeconds: 300 | ||
|
||
|
||
sslConnection: | ||
trustStorePath: "" | ||
trustStorePassword: "" | ||
trustStoreEncryptedPassword: "" | ||
|
||
keyStorePath: "" | ||
keyStorePassword: "" | ||
keyStoreEncryptedPassword: "" | ||
|
||
# Configure the OTLP exporter using system properties keys following the specification https://opentelemetry.io/docs/languages/java/configuration/ | ||
otlpExporter: | ||
otel.exporter.otlp.endpoint: http://0.0.0.0:4318 |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to verify the value as well?