Skip to content
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

Include xa-datasource statistics to app metrics #652

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/collectors/jbossapi/jbossapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,9 @@ def get_stats(self, current_host, current_port, current_proto, current_user,
if op_type == 'app' and self.config['app_stats'] == 'True':
if output:
# Grab the pool stats for each Instance
if 'xa-data-source' in output['result']:
output['result']['data-source'].update(output['result']['xa-data-source'])

for instance in output['result']['data-source']:
datasource = output['result']['data-source'][instance]
for metric in datasource['statistics']['pool']:
Expand Down Expand Up @@ -374,7 +377,6 @@ def string_regex(self, pattern, s):
return tmp_result.group(1)

def collect(self):

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert

for host in self.config['hosts']:
matches = re.search(
'^([^:]*):([^@]*)@([^:]*):([^:]*):?(.*)', host)
Expand All @@ -387,7 +389,7 @@ def collect(self):
current_proto = matches.group(5)
current_user = matches.group(1)
current_pword = matches.group(2)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert

# Call get_stats for each instance of jboss
self.get_stats(current_host, current_port, current_proto,
current_user, current_pword)
Expand Down