I am trying to get the contents of the ns.log file on my NetScaler using Nitro. Here is the code
$URL = 'https://$NSIP/nitro/v1/config/systemfile/ns.log?args=filelocation:%2fvar%2Flog'
$varlog = Invoke-WebRequest -Method Get -uri $URL -UseDefaultCredentials | ConvertFrom-Json
I get details of the file itself (output below), but it is missing the filecontent section
filename : ns.log
filelocation : /var/log
fileencoding : BASE64
fileaccesstime : Wed Apr 26 01:00:01 2017
filemodifiedtime : Wed Apr 26 07:19:23 2017
In fact, when I try to get the contents of any file in the var/log folder, I have the same problem. It works just fine when I try this on any other folder. I can read the files just fine when I use Putty.
I found a Citrix article saying there is a file size limit of 2MB (not sure what the limit is on) but my ns.log file is only 49kB
Does anyone know of any other limitations in using nitro on the NetScaler, or found a way to get the file content