Bug 1019677 - Events on TRACE severity level are included to the total number of events
Events on TRACE severity level are included to the total number of events
Product: JBoss Operations Network
Classification: JBoss
Component: Monitoring - Events (Show other bugs)
JON 3.2
Unspecified Unspecified
unspecified Severity medium
: ---
: JON 3.3.0
Assigned To: RHQ Project Maintainer
Mike Foley
Depends On:
Blocks: 1017214
  Show dependency treegraph
Reported: 2013-10-16 04:52 EDT by jvlasak
Modified: 2015-01-05 18:44 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-11-19 08:55:28 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Also TRACE events are included into the total number of events although they shouldn't be. (284.17 KB, image/png)
2013-10-16 04:52 EDT, jvlasak
no flags Details

  None (edit)
Description jvlasak 2013-10-16 04:52:30 EDT
Created attachment 812830 [details]
Also TRACE events are included into the total number of events although they shouldn't be.

Description of problem:
Events on TRACE severity level are included to the total number of events anytime when at least DEBUG severity level is considered although there is no support in the UI for events on this level.

Version-Release number of selected component (if applicable):
Version: 3.2.0.ER2
Build Number: 9bf6f76:371eac0

How reproducible:

Steps to Reproduce:
1. Start JBoss ON 3.2 system.
2. Import RHQ Agent and RHQ Server into inventory.
3. Modify RHQ Agent resource configuration Event Report Max Per Source and Event Report Max Total to 1000 and 10000.
4. Add 16 event logging sources to RHQ Server resource using generated log files /tmp/file-00.log, /tmp/file-01.log, /tmp/file-02.log, ..., /tmp/file-15.log
5. Restart agent with DEBUG logging enabled.
6. Create /tmp/generateLog using the script below.
7. Then run /tmp/generateLog to generate our random log data:
    a) chmod +x /tmp/generateLog
    b) for i in $(seq -w 0 15); do /tmp/generateLog /tmp/file-${i}.log 2>/dev/null & done

8. Let started processes in the previous step generate messages into log files for some time and then stop them (use kill -STOP {P1..P16}).
9. Go to /tmp folder of your machine and then run command: 

wc -l file-*

to found out the count of all events in the log files including messages on TRACE level.

10. Then click on Inventory, choose Servers - Top Level Imports under Resources, click on EAP and choose its tab Events and compare the total number of events in the UI with the count of events in the log files.

File: /tmp/generateLog



$(echo Thread-{0..99})
$(echo Fake-{0..9}))


logMessages=("A log message"
"Another log message"
"A log message with some meaning"
"A log message without any meaning"
"To be a log message or not to be"
"To infinity and beyond"
"Every rose has its throne"
"Come out and pay"
"That thing wasn't supposed to do that."
"Now that's what I'm talking about"'!'
"Friends don't let friends eat grapefruit")

function printRandomLogLevel() {
    echo -n ${logLevels[$((RANDOM%numLogLevels))]}

function printRandomLogThread() {
    echo -n ${logThreads[$((RANDOM%numLogThreads))]}

function printRandomLogCategory() {
    echo -n ${logCategories[$((RANDOM%numLogCategories))]}

function printRandomLogMessage() {
    echo -n ${logMessages[$((RANDOM%numLogMessages))]}

function printLogTimestamp() {
    timestamp=$(date +"%F %T|%N")
    ms="$(printf "%03d" $(( 10#${timestamp#*|}/1000000 )))"
    echo -n "${timestamp%|*},${ms}"

function printRandomLogEntry() {
    echo "$(printLogTimestamp) $(printRandomLogLevel) [$(printRandomLogThread)] ($(printRandomLogCategory)) $(printRandomLogMessage)"

function printRandomLogEntries() {

    while [ true ]; do
        [ $((${maxSleepTime}-(${totalSleepTime}+${randomSleep}))) -lt 0 ] && randomSleep=$((${randomSleep} +(${maxSleepTime}-(${totalSleepTime}+${randomSleep}))))
        echo >&2 Sleeping for ${randomSleep} seconds...
        sleep ${randomSleep}s
        [ $((${maxEntries}-(${totalEntries}+${randomNumEntries}))) -lt 0 ] && randomNumEntries=$((${randomNumEntries} +(${maxEntries}-(${totalEntries}+${randomNumEntries}))))
        echo >&2 Printing ${randomNumEntries} log entries...
        for ((i=0; i<randomNumEntries; i++)); do
            [ $# -gt 0 ] && {
                echo $(printRandomLogEntry) >>"$1"
            } || {
                echo $(printRandomLogEntry)
        [ ${totalEntries} -ge ${maxEntries} -o ${totalSleepTime} -ge ${maxSleepTime} ] && break
    echo >&2 Total entries is ${totalEntries} and total sleep time was ${totalSleepTime} seconds.

printRandomLogEntries $@

Actual results:
Also TRACE events are counted to the total number of events although they shouldn't be. See attached screenshot.

Expected results:
Events on all levels except for TRACE level should be counted to the total number of rows (events).

Additional info:
If in severity filter in the UI is not DEBUG level the number of events is counted correctly according to our chosen severity levels.
Comment 2 Mike Foley 2013-11-11 11:31:39 EST
moving to JON 3.2.1 per BZ Triage 11/11/2013.  loleary, heute, santos, foley, yarboro
Comment 6 Jay Shaughnessy 2014-09-04 15:13:05 EDT
This was the suspicion for why Bug 1017214 was reported (and why it should probably be closed as Not a Bug).  I think this boils down to wanting TRACE level support in the Event Source, Even filtering, Alerting etc.  It may or may not even be doable, given the semantics of the logging subsystem.

Unless this is linked to a customer RFE I don't think the priority will be high enough to provide this distinction.
Comment 7 Libor Zoubek 2014-11-19 08:55:28 EST
Closing as not a bug. Given screenshot and reprosteps does not prove, there are at least some messages on TRACE level. Even if it was. Current UI works as expected = it puts "unknown" severity levels into Debug bucket, those events are visible and can be filtered using "Debug" severity filter. This is actually very good solution, so we don't need to support FINE, FINER, FINEST etc. If we did proper severity filtering in UI, all events with unknown severity would never show up.

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