- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2017 02:54 AM
Hi ,
I want to write a business rule on syslog table , Actually requirement is capture backgroundscript related logs and move them into new custom table.
i created business rule setting filter condtion it is working when log created manually but it is not working when logs created by system.See below screen shots
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2018 06:19 AM
Direct Business rules not triggered for Logs.
Use Scheduled jobs to get log records instead of Businessrules.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2018 05:43 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2018 10:33 PM
Hi dhony
Here goes an alternative.
Create a daily scheduled job that pulls the list of the logs from the last day and filters those by "Scriptbackgroundcheck" and then take the appropriate action according to your need/requirement (notify a group, push these to an external service, create a defect for the development team, etc...).
Thanks,
Berny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2018 10:39 PM
For instance, your scheduled job code could look something like the following:
var grLog = new GlideRecord('syslog');
grLog.addEncodedQuery('sys_created_onONToday@javascript:gs.beginningOfToday()@javascript:gs.endOfToday()^source=ScriptBackgroundCheck');
grLog.query();
while (grLog.next()){
// do something
// here goes the action you want to do with those records
// for test... lets just do a print of the message
gs.print(grLog.message);
}
Thanks,
Berny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2018 10:40 PM
I hope the above makes sense and helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2018 06:19 AM
Direct Business rules not triggered for Logs.
Use Scheduled jobs to get log records instead of Businessrules.