- 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
12-22-2017 03:40 AM
'System' doesn't run background scripts, you have examples where a background script was run as 'system' user?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2017 04:19 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2017 04:25 AM
That is only one particular case where you run the script via Background Scripts. And BR should catch those. But BR will not catch scripts that run via other means, like in other BRs, script includes, client scripts, etc, as they won't be background scripts. Do you see where I'm going?
If you need all gs.log to be caught by the BR I suggest you add a custom source on each gs.log you use:
https://developer.servicenow.com/app.do#!/api_doc?v=jakarta&id=r_GS-log_S_S
So this is an example:
gs.log("This is a test", 'MyLogs');
So in this case the source is 'MyLogs' and that's what you need in your BR as a source condition.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2017 04:23 AM
Hey Sergiu ,
i didn't get your point.My requirement is i want to capture logs (generated by background script source) and have to store them in another table.
for that i wrote after INSERT business rule on SYSLOG table but it is not triggering even there is a log generated by Background script source.
Thanks,
Dhony.