Giter VIP home page Giter VIP logo

logs-downloader's Introduction

logs-downloader


A Python script for downloading log files from Incapsula.


Running the script:

python LogsDownloader.py -c path_to_config_folder -l path_to_system_logs_folder -v system_logs_level

  • The -c and -l and โ€“v parameters are optional
  • The default value for path_to_config_folder is /etc/incapsula/logs/config
  • The default value for path_to_system_logs_folder is /var/log/incapsula/logsDownloader/
  • The default value for system_logs_level is info
  • The path_to_config_folder is the folder where the settings file (Settings.Config) is stored
  • The path_to_system_logs_folder is the folder where the script output log file is stored (this does not refer to your Incapsula logs)
  • The system_logs_level configuration parameter holds the logging level for the script output log. The supported levels are info, debug and error
  • You can run LogsDownloader.py -h to get help

Preparations for using the script:

  • Create a local folder for holding the script configuration, this will be referred as path_to_config_folder
  • Create a subfolder named keys under the path_to_config_folder folder
  • In the keys subfolder, create a subfolder with a single digit name. This digit should specify whether this is the first encryption key uploaded (1), the second (2) or so on
  • Inside that folder, save the private key with the name Private.key
  • For example, /etc/incapsula/logs/config/keys/1/Private.key

Dependencies:

The script has two dependencies that may require additional installation modules, according to the operating system that is used:

  • M2Crypto
  • loggerglue

Both of these can be downloaded using apt-get, pip or any other installer, depending on the operating system in use.

Running the script as a service on Debian systems:

  • You can run the script as a service on Linux systems by using the configuration file - linux_service_configuration/incapsulaLogs.conf
  • You should modify the following parameters in the configuration file according to your environment:
    1. $USER$ - The user that will execute the script
    2. $GROUP$ - The group name that will execute the script
    3. $PYTHON_SCRIPT$ - The path to the LogsDownloader.py file, followed by the parameters for execution of the script
  • On your system, copy the incapsulaLogs.conf file and place it under the /etc/init/ directory
  • Run sudo initctl reload-configuration
  • Run sudo ln -s /etc/init/incapsulaLogs.conf /etc/init.d/incapsulaLogs
  • Execute sudo service incapsulaLogs start
  • You can use start/stop/status as any other Linux service

logs-downloader's People

Contributors

antoniokl avatar doronlehmann avatar erturpin avatar norbinsh avatar zigzagil avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.