Atom feed of this document
  
 

 Upload and analyze log files

  1. This example assumes that logtest directory contains the following log files:

     

    Example 2.1. Example files

    2010-11-16-21_access.log
    2010-11-16-22_access.log
    2010-11-15-21_access.log
    2010-11-15-22_access.log

    Each file uses the following line format:

     

    Example 2.2. Log line format

    Nov 15 21:53:52 lucid64 proxy-server - 127.0.0.1 15/Nov/2010/22/53/52 DELETE /v1/AUTH_cd4f57824deb4248a533f2c28bf156d3/2eefc05599d44df38a7f18b0b42ffedd HTTP/1.0 204 - \
    - test%3Atester%2CAUTH_tkcdab3c6296e249d7b7e2454ee57266ff - - - txaba5984c-aac7-460e-b04b-afc43f0c6571 - 0.0432

  2. Change into the logtest directory:

    $ cd logtest
  3. Upload the log files into the logtest container:

    $ swift -A http://swift-auth.com:11000/v1.0 -U test:tester -K testing upload logtest *.log
    2010-11-16-21_access.log
    2010-11-16-22_access.log
    2010-11-15-21_access.log
    2010-11-15-22_access.log
  4. Get statistics for the account:

    $ swift -A http://swift-auth.com:11000/v1.0 -U test:tester -K testing -q stat
    Account: AUTH_cd4f57824deb4248a533f2c28bf156d3
    Containers: 1
    Objects: 4
    Bytes: 5888268
  5. Get statistics for the logtest container:

    $ swift -A http://swift-auth.com:11000/v1.0 -U test:tester -K testing stat logtest         
    Account: AUTH_cd4f57824deb4248a533f2c28bf156d3
    Container: logtest
    Objects: 4
    Bytes: 5864468
    Read ACL:
    Write ACL:
  6. List all objects in the logtest container:

    $ swift -A http:///swift-auth.com:11000/v1.0 -U test:tester -K testing list logtest
    2010-11-15-21_access.log
    2010-11-15-22_access.log
    2010-11-16-21_access.log
    2010-11-16-22_access.log
Questions? Discuss on ask.openstack.org
Found an error? Report a bug against this page

loading table of contents...