Hi ,
We have a few SAM templates defined where we are running Windows Script Monitor. Can someone guide me to the DB table which I can query and find out the exact contents of the Windows Script Monitor?
Thanks,
Arnab
You can run this to get the scripts:
SELECT [Template].Name AS [Script Type] ,[Setting].[ComponentTemplateID] ,[Setting].[Key] ,[Setting].[Value] ,[Setting].[ValueType] ,[ScriptBody].Setting FROM [APM_ComponentTemplateSetting] AS [Setting] INNER JOIN [APM_ComponentTemplate] AS [Template] ON [Setting].ComponentTemplateID = [Template].ID INNER JOIN [APM_ExternalSetting] AS [ScriptBody] ON [Setting].Value = [ScriptBody].ID AND [Setting].ValueType = 4 WHERE [Setting].[Key] in ( 'ScriptArguments', 'ScriptBody', 'CommandLineToPass' )
And this to get the other values (parameters and such)
SELECT [Template].Name AS [Script Type] ,[Setting].[ComponentTemplateID] ,[Setting].[Key] ,[Setting].[Value] ,[Setting].[ValueType] -- ,[ScriptBody].Setting FROM [APM_ComponentTemplateSetting] AS [Setting] INNER JOIN [APM_ComponentTemplate] AS [Template] ON [Setting].ComponentTemplateID = [Template].ID --INNER JOIN [APM_ExternalSetting] AS [ScriptBody] -- ON [Setting].Value = [ScriptBody].ID -- AND [Setting].ValueType = 4 WHERE [Setting].[Key] in ( 'ScriptArguments', 'ScriptBody', 'CommandLineToPass' )
There's probably a more elegant way to get this, but this is rough and tumble and should provide most of what you need.
I think this answers what you need.
However, if you can find more from a different angle if you look at an additional audit table I made - to log script changes for security purposes. Trigger based.
If you need it but can't find it, just drop me a line.
SolarWinds solutions are rooted in our deep connection to our user base in the THWACK® online community. More than 195,000 members are here to solve problems, share technology and best practices, and directly contribute to our product development process.