Skip to content

Commit e350bb4

Browse files
authored
[Tibco EMS] Fix collection of queues with a none prefetch value (#21039)
* Fix collection of queues with a `none` prefetch value * Add changelog
1 parent 0e34600 commit e350bb4

File tree

4 files changed

+21
-2
lines changed

4 files changed

+21
-2
lines changed

tibco_ems/changelog.d/21039.fixed

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix collection of queues with a `none` prefetch value

tibco_ems/datadog_checks/tibco_ems/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
'regex': re.compile(
4242
r'^\s*[*\s]*(?P<queue_name>\S+)\s+'
4343
r'(?P<snfgxibct>[-+*]*)\s+'
44-
r'(?P<pre>\d+\*?)\s+'
44+
r'(?P<pre>(?:\d+\*?|none))\s+'
4545
r'(?P<receivers>\d+)\s+'
4646
r'(?P<pending_messages>\d+)\s+'
4747
r'(?P<pending_messages_size>\d+\.?\d*\s*\S+)\s+'

tibco_ems/tests/common.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,22 @@ def mock_output(filename):
275275
'receivers': 0,
276276
'snfgxibct': '',
277277
},
278+
{
279+
'pending_messages': 214,
280+
'pending_messages_size': {
281+
'unit': 'Kb',
282+
'value': 214.1,
283+
},
284+
'pending_persistent_messages': 214,
285+
'pending_persistent_messages_size': {
286+
'unit': 'Kb',
287+
'value': 214.1,
288+
},
289+
'pre': 'none',
290+
'queue_name': 'none.prefetch.sample',
291+
'receivers': 16,
292+
'snfgxibct': '',
293+
},
278294
],
279295
'expected_metrics': [
280296
'tibco_ems.queue.pending_messages',

tibco_ems/tests/fixtures/show_queues

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,6 @@ Command: show queues
99
$sys.undelivered +-------- 5* 0 0 0.0 Kb 0 0.0 Kb
1010
* $TMP$.tibemsd.1669EC51B3.1 --------- 5 1 0 0.0 Kb 0 0.0 Kb
1111
queue.sample -------+- 5* 0 0 0.0 Kb 0 0.0 Kb
12-
sample -------+- 5* 0 0 0.0 Kb 0 0.0 Kb
12+
sample -------+- 5* 0 0 0.0 Kb 0 0.0 Kb
13+
none.prefetch.sample --------- none 16 214 214.1 Kb 214 214.1 Kb
14+

0 commit comments

Comments
 (0)