Hello,
I'm receiving through NXLOG:im_tcp messages similar to the one below (the
separator is a tab) :
NXLOG-DATA GVAVM64 23:59:52 V Valeur;Thread:32;(memory used: 11Mo) END
updatedata
Based on example from page 50/154 of the documentation, I tried to split that
message in 3 parts by using regular expression. I'd like to retrieve data like
this :
$1 = NXLOG-DATA
$2 = GVAVM64
$3 = 23:59:52 V Valeur;Thread:32;(memory used: 11Mo) END updatedata
($1 or $2 can be a string of different length and different value, so the split
must be based only on the delimiter that is tab character)
So I implemented the expression below, but my variables remain empty. I tried
my regex in a regex simulator and it sounds ok, I guess it's my integration in
NXLOG that is not good.
Exec if $raw_event =~ /[^\t]+/ \
{ \
$source = $1; \
$host = $2; \
$message = $3; \
log_info("0:" $0); \
log_info("1:" $1); \
log_info("2:" $2); \
log_info("3:" $3); \
} \
Could you help me to troubleshoot that part please.
Thank you very much for your help,
Oliver
------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
nxlog-ce-users mailing list
nxlog-ce-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nxlog-ce-users