Global variables

21 views
Skip to first unread message

Ole Christian Hansen

unread,
Jun 25, 2014, 4:57:35 AM6/25/14
to megatron...@googlegroups.com
Hi

Is there way to set a "global" variable in a report's property file and
the use this variable in the row file?

ex.
In x.properties

#do something like (or similar)
parser.item.additionalItem.test=Test

And in the row file x_row.txt

"$additionalItem_test","ipAddress", ...

Example above is tested but failed btw


Cheers
Ole Christian Hansen
NorCERT

Tor Johnson

unread,
Jul 7, 2014, 9:33:28 AM7/7/14
to megatron...@googlegroups.com, Ole Christian Hansen
Nope, you can't specify a global constant this way.

"parser.item.additionalItem.test" must be valid regular expression, which must
be used in "parser.lineRegExp", and then match the log lines. A guess if every
log line contains "Test" this holds true.

I can only see one use case for this: Several configurations (job-types) can use
the same row template file and "mark" the result with a constant. The solution
is to create one row template per configuration and include the constant in
hard-coded text.

Perhaps you had a different use case in mind that I missed?

Sorry for the late reply, have been away on vacation.

Best regards,

/Tor
Reply all
Reply to author
Forward
0 new messages