Dear All,

I have a event needed to parse it, but I don`t know how to parse
date and time, please help me, thanks!

raw event is following:

Jul 12 11:31:53 dhcpd MOD=DHCP MSG=user: group: MAC:c0:14:3d:db:73:d9
hostname: allocate-IP:10.108.37.113

I have write parsing method in release.js as following:

Record.prototype.parse = function(e){
// parsing logic goes here
if
(/([A-Za-z]+\s\d+\s\d+:\d+:\d+).*MAC[A-Za-z0-9]+:[A-Za-z0-9]+:[A-Za-z0-9]+:[A-Za-z0-9]+:[A-Za-z0-9]+:[A-Za-z0-9]+)
hostname.*)
allocate\-IP\d+\.\d+\.\d+\.\d+)/.test(this.s_RXBufferString)) { // set
SEND_EVENT to true if your parsing logic worked correctly
this.cv51 = RegExp.$1;
this.sip = RegExp.$4;
this.dmac = RegExp.$2;
this.dhn = RegExp.$3;
return true;
}else{
rec.sendUnsupported();
return true;
}
};

cv51 is string field, but sentinel has not parse it successfully, if I
want to use datetime field to parse it , how to do it? thank you very
much!


steve zeng
zjzeng@novell.com


--
steve_zeng
------------------------------------------------------------------------
steve_zeng's Profile: https://forums.netiq.com/member.php?userid=3875
View this thread: https://forums.netiq.com/showthread.php?t=48196