Skip to content

Commit e987fc0

Browse files
committed
Skip switching to the multi-threaded zimon port automatically
1 parent 402d9e9 commit e987fc0

File tree

2 files changed

+18
-15
lines changed

2 files changed

+18
-15
lines changed

source/confParser.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,10 @@ def parse_cmd_args(argv):
9595
help='Host name or ip address of the ZIMon collector (Default: 127.0.0.1) \
9696
NOTE: Per default ZIMon does not accept queries from remote machines. \
9797
To run the bridge from outside of the ZIMon collector, you need to modify ZIMon queryinterface settings (\'ZIMonCollector.cfg\')')
98-
parser.add_argument('-P', '--serverPort', action="store", type=int, default=9084, help='ZIMon collector port number (Default: 9084)')
98+
parser.add_argument('-P', '--serverPort', action="store", type=int, choices=[9084, 9094], default=9084,
99+
help='ZIMon collector port number (Default: 9084) \
100+
NOTE: In some environments, for better bridge performance the usage of the multi-threaded port 9094 could be helpful.\
101+
In this case make sure the \'query2port = \"9094\"\' is enabled in the ZIMon queryinterface settings (\'ZIMonCollector.cfg\')')
99102
parser.add_argument('-l', '--logPath', action="store", default="/var/log/ibm_bridge_for_grafana", help='location path of the log file (Default: /var/log/ibm_bridge_for_grafana')
100103
parser.add_argument('-f', '--logFile', action="store", default="zserver.log", help='Name of the log file (Default: zserver.log')
101104
parser.add_argument('-c', '--logLevel', action="store", type=int, default=logging.INFO, help='log level 10 (DEBUG), 20 (INFO), 30 (WARN), 40 (ERROR) (Default: 20)')

source/zimonGrafanaIntf.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -556,21 +556,21 @@ def configureLogging(logPath, logfile, loglevel):
556556

557557
def validateCollectorConf(args, logger):
558558

559-
if not (args.get('server') == 'localhost') and not (args.get('server') == '127.0.0.1'):
560-
try:
561-
s = socket.socket()
562-
s.connect((args.get('server'), args.get('serverPort')))
563-
print(MSG['CollectorConnInfo'])
564-
finally:
565-
s.close()
566-
else:
559+
# if not (args.get('server') == 'localhost') and not (args.get('server') == '127.0.0.1'):
560+
try:
561+
s = socket.socket()
562+
s.connect((args.get('server'), args.get('serverPort')))
563+
print(MSG['CollectorConnInfo'])
564+
finally:
565+
s.close()
566+
# else:
567567
# get queryport
568-
foundPorts = SensorConfig.getCollectorPorts(logger)
569-
if foundPorts and str(args.get('serverPort')) not in foundPorts:
570-
raise Exception("Invalid serverPort specified. Try with: %s" % str(foundPorts))
571-
elif foundPorts[1] and not (args.get('serverPort') == int(foundPorts[1])):
572-
args['serverPort'] = int(foundPorts[1])
573-
logger.info(MSG['Query2port'].format(args['serverPort']))
568+
# foundPorts = SensorConfig.getCollectorPorts(logger)
569+
# if foundPorts and str(args.get('serverPort')) not in foundPorts:
570+
# raise Exception("Invalid serverPort specified. Try with: %s" % str(foundPorts))
571+
#elif foundPorts[1] and not (args.get('serverPort') == int(foundPorts[1])):
572+
# args['serverPort'] = int(foundPorts[1])
573+
# logger.info(MSG['Query2port'].format(args['serverPort']))
574574

575575

576576
def updateCherrypyConf(args):

0 commit comments

Comments
 (0)