Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
Anonymous_User Absent Member.
Absent Member.
154 views

collector problem


Dear All,

I want to modify my release.js and Rec2Evt.map, After i finished
the work, how to import into SCC? Thanks!


release.js
========================================================================================
Record.prototype.parse = function(e){
if (this.s_RXBufferString == "" || this.s_RXBufferString.length == 0
) {
return false;
}

this.msg = this.msg.replace(/ /g,'');
this.msg = this.msg.replace(/\r\n/g,'');
this.msg = this.msg.replace(/\n/g,'');
this.msg = this.msg.replace(/\t/g,'');
if
(/^Index.*New-TransportRule.*From=\{(\S+)@(\S+)\}.*CopyTo=\{(\S+)@(\S+)\}}.*Category.*$/.test(this.msg))
{
this.evt = "New-TransportRule";
this.sun = RegExp.$1;
this.dun = RegExp.$3;
this.iemail = RegExp.$1 + "@" + RegExp.$2;
this.temail = RegExp.$2 + "@" + RegExp.$4;
return true;
} else {
return false;
}

}
==============================================================================================

==================================================================================================
Record.prototype.parse = function(e){
if (this.s_RXBufferString == "" || this.s_RXBufferString.length == 0
) {
return false;
}

this.msg = this.msg.replace(/ /g,'');
this.msg = this.msg.replace(/\r\n/g,'');
this.msg = this.msg.replace(/\n/g,'');
this.msg = this.msg.replace(/\t/g,'');
if
(/^Index.*New-TransportRule.*Name=(.*),.*From=\{(\S+)@(\S+)\}.*CopyTo=\{(\S+)@(\S+)\}}.*Category.*$/.test(this.msg))
{
this.evt = "New-TransportRule";
this.cv25 = RegExp.$1;
this.sun = RegExp.$2;
this.dun = RegExp.$4;
this.iemail = RegExp.$2 + "@" + RegExp.$3;
this.temail = RegExp.$4 + "@" + RegExp.$5;
return true;
}
else if
(/^Index.*Set-TransportRule.*Name=(.*),.*CopyTo=\{(\S+)@(\S+)\}},.*/.*/(.*),.*CmdletLogs.*$/.test(this.msg))
{
this.evt = "Set-TransportRule";
this.cv25 = RegExp.$1;
this.dun = RegExp.$2;
this.sun = RegExp.$3;
return true;
}
else {
return false;
}

}

===================================================================================================

Rec2Evt.map
===============================================================================

~~Sentinel Event Field~~,~~Input Record Field~~
~~Do not modify the first column~~
CustomerVar010,cv25
==============================================================================



BR


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

0 Likes
2 Replies
Anonymous_User Absent Member.
Absent Member.

Re: collector problem

Modifying the files directly is probably not allowed if you want to main
support of the collector. If that is not a concern, extract the plugin,
modify the files, and recreate it so that the compressed file's structure
is correct as it was before extracting it, and then import that into the
SCC overwriting the current plugin. Otherwise, you should be doing this
by adding code to a custom.js file which you can then add as an auxiliary
file within Event Source Management (ESM) by clicking on the appropriate
collector plugin, clicking on the 'Add Auxiliary File' button, and then
pointing to your custom.js file. The code within custom.js will be
executed when you put the collector instance (again, in ESM) in 'custom'
execution mode (a property of the collector instance).

Good luck.
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: collector problem


Instructions for importing into the SCC are described in the
instructions here:
http://tinyurl.com/loec9qm
Look at the section "Setting Up to Add Custom Code".

steve_zeng;229958 Wrote:
> Dear All,
>
> I want to modify my release.js and Rec2Evt.map, After i finished
> the work, how to import into SCC? Thanks!
>
>
> release.js
> ========================================================================================
> Record.prototype.parse = function(e){
> if (this.s_RXBufferString == "" || this.s_RXBufferString.length == 0
> ) {
> return false;
> }
>
> this.msg = this.msg.replace(/ /g,'');
> this.msg = this.msg.replace(/\r\n/g,'');
> this.msg = this.msg.replace(/\n/g,'');
> this.msg = this.msg.replace(/\t/g,'');
> if
> (/^Index.*New-TransportRule.*From=\{(\S+)@(\S+)\}.*CopyTo=\{(\S+)@(\S+)\}}.*Category.*$/.test(this.msg))
> {
> this.evt = "New-TransportRule";
> this.sun = RegExp.$1;
> this.dun = RegExp.$3;
> this.iemail = RegExp.$1 + "@" + RegExp.$2;
> this.temail = RegExp.$2 + "@" + RegExp.$4;
> return true;
> } else {
> return false;
> }
>
> }
> ==============================================================================================
>
> ==================================================================================================
> Record.prototype.parse = function(e){
> if (this.s_RXBufferString == "" || this.s_RXBufferString.length == 0
> ) {
> return false;
> }
>
> this.msg = this.msg.replace(/ /g,'');
> this.msg = this.msg.replace(/\r\n/g,'');
> this.msg = this.msg.replace(/\n/g,'');
> this.msg = this.msg.replace(/\t/g,'');
> if
> (/^Index.*New-TransportRule.*Name=(.*),.*From=\{(\S+)@(\S+)\}.*CopyTo=\{(\S+)@(\S+)\}}.*Category.*$/.test(this.msg))
> {
> this.evt = "New-TransportRule";
> this.cv25 = RegExp.$1;
> this.sun = RegExp.$2;
> this.dun = RegExp.$4;
> this.iemail = RegExp.$2 + "@" + RegExp.$3;
> this.temail = RegExp.$4 + "@" + RegExp.$5;
> return true;
> }
> else if
> (/^Index.*Set-TransportRule.*Name=(.*),.*CopyTo=\{(\S+)@(\S+)\}},.*/.*/(.*),.*CmdletLogs.*$/.test(this.msg))
> {
> this.evt = "Set-TransportRule";
> this.cv25 = RegExp.$1;
> this.dun = RegExp.$2;
> this.sun = RegExp.$3;
> return true;
> }
> else {
> return false;
> }
>
> }
>
> ===================================================================================================
>
> Rec2Evt.map
> ===============================================================================
>
> ~~Sentinel Event Field~~,~~Input Record Field~~
> ~~Do not modify the first column~~
> CustomerVar010,cv25
> ==============================================================================
>
>
>
> BR



--
jgassner
------------------------------------------------------------------------
jgassner's Profile: https://forums.netiq.com/member.php?userid=324
View this thread: https://forums.netiq.com/showthread.php?t=47863

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.