cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
891
Views
0
Helpful
3
Replies

Log Collection - Getting a list of files

caten
Cisco Employee
Cisco Employee

I have been doing a little digging around trying to find a way to do this, but I haven't found one yet, so I thought I would ask. I would like to gather a list of log files for a service for a reltime of 1 week. I don't necessarily want to push them to an SFTP server, but would rather just have a list of them. I see that selectLogFiles will return a list of these log files, but it also seems to require you to download them anyway. When I copy the envelope from the link below, I get a fault.

https://developer.cisco.com/site/sxml/documents/api-reference/log-collection/#logcollectionport-selectlogfiles

  <faultcode>soapenv:Server.userException</faultcode>
  <faultstring>org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.</faultstring>
  <detail>

Is there a way of just simply gathering this list via AXL?

Thanks!

1 Accepted Solution

Accepted Solutions

dstaudt
Cisco Employee
Cisco Employee

You might take a look at the Service Control API request 'getFileDirectoryList':

Cisco DevNet: sxml - API Reference - Service Control (ControlCenter)

Unfortunately there is no relative time filter, and the response does not include the file timestamp.

View solution in original post

3 Replies 3

dstaudt
Cisco Employee
Cisco Employee

You might take a look at the Service Control API request 'getFileDirectoryList':

Cisco DevNet: sxml - API Reference - Service Control (ControlCenter)

Unfortunately there is no relative time filter, and the response does not include the file timestamp.

steven.lass
Level 1
Level 1

With lots and trial and error, I got the literal example working with:

<soapenv:Envelope

xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

>

    <soapenv:Body>

        <SelectLogFiles>

            <FileSelectionCriteria>

                <ServiceLogs xsi:type="soapenc:Array">

                    <item>Security Logs</item>

                </ServiceLogs>

                <SystemLogs/>

                <JobType>DownloadtoClient</JobType>

                <SearchStr/>

                <Frequency>OnDemand</Frequency>

                <ToDate/>

                <FromDate/>

                <TimeZone>Client:(GMT-8:0)Pacific Standard Time</TimeZone>

                <RelText>Hours</RelText>

                <RelTime>5</RelTime>

            </FileSelectionCriteria>

        </SelectLogFiles>

    </soapenv:Body>

</soapenv:Envelope>

Thanks for the update, we'll update the docs to make this use-case more clear.