Bug 875206 - [iis] ResponseTime data fails to be collected due to file offset calculation issue
Summary: [iis] ResponseTime data fails to be collected due to file offset calculation ...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Plugin -- Other
Version: JON 3.1.1
Hardware: All
OS: Windows
unspecified
high
Target Milestone: ---
: JON 3.1.2
Assignee: RHQ Project Maintainer
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On: 875207
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-09 19:53 UTC by Larry O'Leary
Modified: 2018-11-29 19:37 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
: 875207 (view as bug list)
Environment:
Last Closed: 2012-11-20 20:59:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 873494 0 unspecified CLOSED [iis] Discovery of IIS VHost fails due to Win32Exception: MetaBaseInit: Can't CoCreateInstance from Sigar 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 875202 0 unspecified CLOSED [iis] ResponseTime data fails to be collected due to incorrect and hard-coded log file prefix validation 2021-02-22 00:41:40 UTC

Internal Links: 873494 875202

Description Larry O'Leary 2012-11-09 19:53:32 UTC
Description of problem:
Response time metrics are not being read from the IIS VHost log file due to what appears to be a file offset issue. The agent log contains the following:

INFO  [ResourceContainer.invoker.daemon-2] (org.rhq.plugins.iis.IISResponseTimeDelegate$IISResponseTimeLogParser)- Filesize 702
INFO  [ResourceContainer.invoker.daemon-2] (org.rhq.plugins.iis.IISResponseTimeDelegate$IISResponseTimeLogParser)- Skipping 702
INFO  [ResourceContainer.invoker.daemon-2] (org.rhq.plugins.iis.IISResponseTimeDelegate$IISResponseTimeLogParser)- Results...

Which seems to indicate that previousOffset is always equal to newOffset. The result is not log information appears to be parsed.

Version-Release number of selected component (if applicable):
4.4.0.JON311GA

How reproducible:
Always

Additional info:
Details from the support engineering who did the preliminary investigation:

Checking the IISResponseTimeDelegate class again, I realized that the "parsing" was not being done because the currentLine variable is coming as "null". I think it happens due the Filesize and Skipping have the same value (as we can see in the debug messages above), then the "in" variable is set to "null" or "0" (not sure). Follow a snippet of the code: 
__________________________________________________________________

* parseLog method in IISResponseTimeDelegate class:

 log.info("Filesize " + newOffset);
 log.info("Skipping " + previousOffset);
 in.skip(IISResponseTimeDelegate.this.previousOffset);
 IISResponseTimeDelegate.this.previousOffset = newOffset;

 String currentLine;
 while ((currentLine = in.readLine()) != null) {
    LogEntry logEntry;
    log.info("Parsing line: " + currentLine);
    try {
       logEntry = parseLine(currentLine);
__________________________________________________________________

I performed another test commenting the in.skip... line, then the CallTime was collected correctly.

Comment 1 Mike Foley 2012-11-09 21:49:08 UTC
Before this gets addressed in JON ... there needs to be a discussion if this is even a JON feature ... or the iis plugin was included by mistake.

Comment 3 mark yarborough 2012-11-20 20:59:11 UTC
IIS 7.5 is not supported by plugins.


Note You need to log in before you can comment on or make changes to this bug.