Has somebody here create a script or similar to ex...
# suitescript
r
Has somebody here create a script or similar to export logs from NetSuite into an external tool such as Splunk? Just wondering what would be the best practices, things to take into account and overall the best way to achieve this.
s
I've done POC on this. My recommendation would be to run a background script that pulls and ships logs to the centralized logging service
and probably strips PII from it
Alternately, our logger could easily do it 'real time' since it supports multiple log appenders, but I figure the overhead of making an HTTP request for each log call is probably unjustified in most cases
r
Nice, that makes sense. I was thinking a scheduled script that runs every hour or something similar. Not exactly sure what will be the scope, if audit trail + logs from scripts or also other logs such as system notes as well. If anyone has something more specific regarding on pulling the logs and shipping that would be great. I was thinking that this might be a common situation for other people as well, as logs can be purged "On each NetSuite server, if this limit is reached, logs across all customers on that server are purged." - NetSuite Applications Suite - Governance on Script Logging - https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_N3352137.html
s
Yes, disappearing script logs is a definite motivator for a solution like this
I would start with SuiteQL querying of the
scriptnote
table
m
I also built a POC but for SumoLogic. I tried SuiteQL initially but there was a field that want exposed which caused me to use a Saved Seaech instead. I don't recall which field though
r
Thank you for the tips! I will explore those options