Greetings All,
So I have a user parameter to do a low a discovery of the IIS log locations on our Web servers. Below is the result.
8224:20190501:045018.748 EXECUTE_STR() command:'powershell "Get-Website | % { $_.logFile.Directory} | ConvertTo-Json"' len:19 cmd_result:'"D:\\Website\\Logs"'
8224:20190501:045018.748 for key [IISLogLocation.discovery] received value ["D:\\Website\\Logs"]
8224:20190501:045018.748 In process_value() key:'ServerName:IISLogLocation.discovery' value:'"D:\\Website\\Logs"'
8224:20190501:045018.748 In send_buffer() host:'XX.XX.XX.XX' port:XXXXX entries:1/100
8224:20190501:045018.748 send_buffer() now:1556707818 lastsent:1556707816 now-lastsent:2 BufferSend:5; will not send now
8224:20190501:045018.748 End of send_buffer():SUCCEED
8224:20190501:045018.748 In need_meta_update() key:IISLogLocation.discovery
8224:20190501:045018.748 End of need_meta_update():FAIL
For the life of me I can not figure out why it keeps getting the error "Value should be a JSON". I read several posts that seemed to indicate the back slash "" was the issue and it needed to be escaped. By outputting the PowerShell command as JSON I would have thought that would have taken care of it but the error still persists. Any help with this would be greatly appreciated.
v/r
Chris
So I have a user parameter to do a low a discovery of the IIS log locations on our Web servers. Below is the result.
8224:20190501:045018.748 EXECUTE_STR() command:'powershell "Get-Website | % { $_.logFile.Directory} | ConvertTo-Json"' len:19 cmd_result:'"D:\\Website\\Logs"'
8224:20190501:045018.748 for key [IISLogLocation.discovery] received value ["D:\\Website\\Logs"]
8224:20190501:045018.748 In process_value() key:'ServerName:IISLogLocation.discovery' value:'"D:\\Website\\Logs"'
8224:20190501:045018.748 In send_buffer() host:'XX.XX.XX.XX' port:XXXXX entries:1/100
8224:20190501:045018.748 send_buffer() now:1556707818 lastsent:1556707816 now-lastsent:2 BufferSend:5; will not send now
8224:20190501:045018.748 End of send_buffer():SUCCEED
8224:20190501:045018.748 In need_meta_update() key:IISLogLocation.discovery
8224:20190501:045018.748 End of need_meta_update():FAIL
For the life of me I can not figure out why it keeps getting the error "Value should be a JSON". I read several posts that seemed to indicate the back slash "" was the issue and it needed to be escaped. By outputting the PowerShell command as JSON I would have thought that would have taken care of it but the error still persists. Any help with this would be greatly appreciated.
v/r
Chris
Comment