The Workgroup Server produces a metric called CONN_USED. This metric relates to the connection string used to connect to the manager when there are multiple connection strings provided. This could represent a host name, IP address, or virtual name depending on what is included in the connection string.
Based on the Manager technology, the strings returned will be as follows:
IBM MQ
- When ConnectionName has only 1 entry, CONN_USED returns that entry, whether it is active or not.
- When ConnectionName has multiple entries, and the second or third is active, CONN_USED returns the active entry.
- When ConnectionName has multiple entries, and none are active, CONN_USED returns the last connected IP.
Examples
Only 1 entry, whether active or not:
- ConnectionName=host1(1414)
- CONN_USED=host1
Multiple entries and the 2nd is the active Queue Manager:
- ConnectionName=host1(2015),host2(2015),host3(2015)
- CONN_USED=host2
No active Queue Manager, but last connection was host1(1416):
- ConnectionName=host1(1416),host2(1416)
- CONN_USED=host1
For nsqcm (NV-632), the default behavior continues to use MQ native connection switching, which does not return the connection used. An additional option, -k, must be added to activate CM connection switching.
EMS
- In EMS environments, when SrvUrl has only 1 entry, CONN_USED returns the domain of that entry (stripping out the scheme and port), whether it is active or not.
- When SrvUrl has multiple entries, and the second or third is active, CONN_USED returns the domain of the active entry.
- When SrvUrl has multiple entries, and there is no active EMS server, CONN_USED returns the last connected IP.
Examples
Only 1 entry, whether active or not:
- SrvUrl=ssl://host1:55443
- CONN_USED=host1
Example with the 2nd entry as the active EMS server:
- SrvUrl=ssl://host1:8363,ssl://host2:8363
- CONN_USED=host2
No active EMS server, but last connection was ssl://host1:8363:
- SrvUrl=ssl://host1:8363,ssl://host2:8363
- CONN_USED=host1
For nsqcmems (NV-634), the default behavior is to use CM connection switching and return connection string. To use EMS native connection switching, you must specify the following property, fault.tolerance.compat=true.
Solace
For nsqsolace (NV-635), CONN_USED returns the connected IP.
Example
- Url=https://host1:443
- CONN_USED=host1
Kafka
For nsqcmkafka (NV-636), CONN_USED returns the connected IP.
Example
- Bootstrap=host1:9092,host2:9092,host3:9092
- CONN_USED=host1
Typos and invalid entries will return what they can, based on the host parsing rules that have been applied.
RabbitMQ
For nsqcmrabbitmq (NV-637): the url that established the connection last is published.
- When URL has only 1 entry, CONN_USED returns that entry, whether it is active or not.
- When URL has multiple entries, CONN_USED returns the active entry.
- When URL has multiple entries, and none are active, CONN_USED returns the last connected IP.
Examples
Only 1 entry, whether active or not:
- URL= http://172.16.31.123:15276
- CONN_USED= 172.16.31.123
Multiple entries and the 2nd is the active Queue Manager:
- URL= http://172.16.31.123:15276,http://172.16.31.124:15276
- CONN_USED= 172.16.31.124
No active Queue Manager, but last connection was http://172.16.31.123:15276:
- URL= http://172.16.31.123:15276,http://172.16.31.124:15276
- CONN_USED= 172.16.31.123
ACE/IIB
For nsqcmace (NV-646):
- When URL has only 1 entry, CONN_USED returns that entry, whether it is active or not.
- When URL has multiple entries, CONN_USED returns the active entry.
- When URL has multiple entries, and none are active, CONN_USED returns the last connected IP.
Examples
Only 1 entry, whether active or not:
- URL= http://172.16.31.123:4414
- CONN_USED=172.16.31.123
Multiple entries and the 2nd is the active Queue Manager:
- URL= http://172.16.31.123:4414,http://172.16.31.113:4416
- CONN_USED= 172.16.31.113
No active Queue Manager, but last connection was http://172.16.31.123:4414:
- URL= http://172.16.31.123:4414,http://172.16.31.113:4416
- CONN_USED=172.16.31.123