09-29-2015 09:03 AM
Hi All,
I can use LogCollectionPort to gather sets of files such as:
<item>Event Viewer-Application Log</item>
Is there a way to use this method to gather a single file?
I see the response from what I am using has
<item xsi:type="ns2:ServiceLogs">
<name xsi:type="xsd:string" xsi:nil="true"/>
<SetOfFiles soapenc:arrayType="ns2:file[1]" xsi:type="soapenc:Array">
<item xsi:type="ns2:file">
<name xsi:type="xsd:string">CiscoSyslog</name>
<absolutepath xsi:type="xsd:string">/var/log/active/syslog/CiscoSyslog</absolutepath>
<filesize xsi:type="xsd:string">3981329</filesize>
<modifiedDate xsi:type="xsd:string">Mon Sep 28 19:04:17 MDT 2015</modifiedDate>
</item></SetOfFiles></item>
</ServiceList>
</Node>
</FileSelectionResult>
<ScheduleList soapenc:arrayType="ns3:Schedule[0]" xsi:type="soapenc:Array" xmlns:ns3="http://cisco.
com/ccm/serviceability/soap/LogCollection/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"/>
</ns1:SelectLogFilesResponse></soapenv:Body></soapenv:Envelope>
Is there a way to specify name and absolutepath in the request?
Thanks
09-29-2015 10:36 AM
Have a look at Cisco DevNet: sxml - API Reference - Log Collection (LogCollection, DimeGetFile) or Cisco DevNet: sxml - API Reference - Log Collection (LogCollection, DimeGetFile). Is this what you're looking for?
09-29-2015 11:15 AM
I did see that - I'm using cURL in a bash script - I'll play around and see if I can make it work.
with the method I'm using, it's downloading the files via sftp, if I can do that with one file it would be ideal.
Can you use the dime method with cURL?
Anyone have a working example?
09-29-2015 12:22 PM
I've never tried that so I don't have an example, but off hand, I don't see why you couldn't do that with cURL/SOAP.
Just curious, what language?
10-02-2015 08:34 AM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide