@@ -42,29 +42,25 @@ public static void main(String[] args) {
42
42
ArrayList <MQObject .MQType > monitoringTypes = new ArrayList <>();
43
43
ArrayList <MQObject > objects = new ArrayList <>();
44
44
45
- if (config .sendPCFCommands ()) {
46
- if (config .getQueues () != null && config .getQueues ().size () > 0 ) {
47
- monitoringTypes .add (MQObject .MQType .QUEUE );
48
- for (String queueName : config .getQueues ()) {
49
- objects .add (new MQObject (queueName , MQObject .MQType .QUEUE ));
50
- logger .debug ("Queue {} was added for additional monitoring." , queueName );
51
- }
45
+ if (config .getQueues () != null && config .getQueues ().size () > 0 ) {
46
+ monitoringTypes .add (MQObject .MQType .QUEUE );
47
+ for (String queueName : config .getQueues ()) {
48
+ objects .add (new MQObject (queueName , MQObject .MQType .QUEUE ));
52
49
}
53
- if (config .getChannels () != null && config .getChannels ().size () > 0 ) {
54
- monitoringTypes .add (MQObject .MQType .CHANNEL );
55
- for (String channelName : config .getChannels ()) {
56
- objects .add (new MQObject (channelName , MQObject .MQType .CHANNEL ));
57
- logger .debug ("Channel {} was added for additional monitoring." , channelName );
58
- }
50
+ }
51
+ if (config .getChannels () != null && config .getChannels ().size () > 0 ) {
52
+ monitoringTypes .add (MQObject .MQType .CHANNEL );
53
+ for (String channelName : config .getChannels ()) {
54
+ objects .add (new MQObject (channelName , MQObject .MQType .CHANNEL ));
59
55
}
60
- if (config .getListeners () != null && config .getListeners ().size () > 0 ) {
61
- monitoringTypes .add (MQObject .MQType .LISTENER );
62
- for (String listenerName : config .getListeners ()) {
63
- objects .add (new MQObject (listenerName , MQObject .MQType .LISTENER ));
64
- logger .debug ("Listener {} was added for additional monitoring." , listenerName );
65
- }
56
+ }
57
+ if (config .getListeners () != null && config .getListeners ().size () > 0 ) {
58
+ monitoringTypes .add (MQObject .MQType .LISTENER );
59
+ for (String listenerName : config .getListeners ()) {
60
+ objects .add (new MQObject (listenerName , MQObject .MQType .LISTENER ));
66
61
}
67
62
}
63
+
68
64
MetricsManager .initMetrics (elements , monitoringTypes );
69
65
MQSubscriberManager manager = new MQSubscriberManager (config .getQmgrHost (), config .getQmgrPort (), config .getQmgrChannel (), config .getQmgrName (), config .getUser (), config .getPassword (), config .useMqscp ());
70
66
manager .runSubscribers (elements , objects , config .sendPCFCommands (), config .usePCFWildcards (), config .getScrapeInterval ());
0 commit comments