{ "info": { "author": "Peter Scopes", "author_email": "peter.scopes@nccgroup.trust", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.7" ], "description": "=============\nLog Generator\n=============\n``log_generator`` generates dummy logs based on configuration files.\n\n::\n\n usage: log-generator [-h] [--level LEVEL] [--truncate] /path/to/config\n\n Generate log events\n\n positional arguments:\n /path/to/config Path to configuration directory\n\n optional arguments:\n -h, --help show this help message and exit\n --level LEVEL, -l LEVEL\n Logging level\n --truncate, -t Truncate the log files on start\n\n\n------------------\nConfiguration File\n------------------\nLog generator uses a set of configuration files to define how to generate logs.\nYou can see the schema for configuration files in ``log_generator/schema.yaml``.\nThere are 6 required properties: ``name``, ``file``, ``format``, ``frequency``, ``amount``, and ``fields``:\n\n:name: Name of the logs being generated (for logging purposes only)\n:file: The path to the file where to write the logs to\n:frequency: Time frame of how frequently to output logs\n:amount: Number of logs to create per tick\n:enabled: (optional) Boolean as to whether the configuration file should be used (default True)\n:offset: (optional) Time frame of the offset, from now, the timestamps should be\n:jitter: (optional) Time frame of the jitter the timestamps should be.\n:format: The format of the log\n:fields: A dictionary of fields to be substituted into the log format\n\n\nEach property of ``fields`` should be one of the following types:\n\n:type: One of ``enum``, ``timestamp``, ``integer``, ``float``, ``chance``, ``ip``\n:repeat: (optional) Number of times to repeat the current value before generating (default 1)\n:change: (optional) Float probability [0..1] that the current value will change (default 1)\n:value: (optional) The initial value for the field\n\nEnum (``enum``)\n A list of values that have a uniform distribution of being selected.\n\n :values: List of possible options\n\nTimestamp (``timestamp``)\n A timestamp.\n\n :format: The format that the timestamp should have\n\nInteger (``integer``)\n A random integer value.\n\n :min: Minimum value of the integer\n :max: Maximum value of the integer\n\nFloat (``float``)\n A random floating point value.\n\n :min: Minimum value of the float\n :max: Maximum value of the float\n\nChance (``chance``)\n A set of options and associated weights to define the probability of being selected\n\n :choices: A list of objects with two properties: ``option`` and ``weight``\n :choices.*.option: The value of the option\n :choices.*.weight: The probability of being selected\n\nIP Address (``ip``)\n A randomly generated IP address.\n\n\n^^^^^^^^\nExamples\n^^^^^^^^\nApache 2.4 Access:\n\n::\n\n name: Apache General Access\n file: /var/log/httpd/apache_access\n format: \"{log_ip} - - [{log_time} +0000] \\\"{log_method} {log_path} HTTP/1.1\\\" {log_status} {log_bytes}\"\n frequency:\n seconds: 5\n offset:\n seconds: 0\n jitter:\n seconds: 5\n amount: 50\n fields:\n log_ip:\n type: ip\n log_time:\n type: timestamp\n format: \"%d/%b/%Y:%H:%M:%S\"\n log_method:\n type: enum\n values: [POST, GET, PUT, PATCH, DELETE]\n log_path:\n type: enum\n values:\n - /auth\n - /alerts\n - /events\n - /playbooks\n - /lists\n - /fieldsets\n - /customers\n - /collectors\n - /parsers\n - /users\n log_status:\n type: enum\n values: [200, 201, 204, 300, 301, 400, 401, 403, 404, 500, 503]\n log_bytes:\n type: integer\n min: 2000\n max: 5000\n\n\nCustom log:\n\n::\n\n name: Simulated Field Change\n file: /var/log/server/status\n format: \"{log_time} server status: {log_colour}\"\n frequency:\n seconds: 11\n offset:\n seconds: 0\n amount: 1\n fields:\n log_time:\n type: timestamp\n format: \"%Y-%m-%dT%H:%M:%SZ\"\n log_colour:\n type: chance\n repeat: 11\n change: 0.25\n value: green\n choices:\n - option: red\n weight: 0.2\n - option: yellow\n weight: 0.2\n - option: green\n weight: 0.6\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "log-generator", "package_url": "https://pypi.org/project/log-generator/", "platform": "any", "project_url": "https://pypi.org/project/log-generator/", "project_urls": null, "release_url": "https://pypi.org/project/log-generator/1.0.1/", "requires_dist": [ "PyYAML (>=3.12)", "jsonschema (>=3.0.0)" ], "requires_python": "", "summary": "Generates dummy logs based on configuration files", "version": "1.0.1" }, "last_serial": 4885213, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "8e0e79946895ec610487cc2aca1d9e1e", "sha256": "05f24d218cc0760fafa3536d3beb8e0e90de3d4a81a1f969d0440a5afd3a753f" }, "downloads": -1, "filename": "log_generator-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "8e0e79946895ec610487cc2aca1d9e1e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7110, "upload_time": "2019-03-01T15:10:56", "url": "https://files.pythonhosted.org/packages/a2/3e/08cd23b88e61768dfba20373c09af07239517af4473f61ad7c62a175f3f3/log_generator-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a038a16db3762dcbc54a2d72be0ebe78", "sha256": "e0be57eab810aa411309a850666f26bc3a560e917e6ccf2a7f037cdcecbad15a" }, "downloads": -1, "filename": "log_generator-1.0.1.tar.gz", "has_sig": false, "md5_digest": "a038a16db3762dcbc54a2d72be0ebe78", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5907, "upload_time": "2019-03-01T15:10:57", "url": "https://files.pythonhosted.org/packages/53/f6/6e19d3bd54ab76edc519811ea1c8c172f3194d054b9f8920de9948901472/log_generator-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8e0e79946895ec610487cc2aca1d9e1e", "sha256": "05f24d218cc0760fafa3536d3beb8e0e90de3d4a81a1f969d0440a5afd3a753f" }, "downloads": -1, "filename": "log_generator-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "8e0e79946895ec610487cc2aca1d9e1e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7110, "upload_time": "2019-03-01T15:10:56", "url": "https://files.pythonhosted.org/packages/a2/3e/08cd23b88e61768dfba20373c09af07239517af4473f61ad7c62a175f3f3/log_generator-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a038a16db3762dcbc54a2d72be0ebe78", "sha256": "e0be57eab810aa411309a850666f26bc3a560e917e6ccf2a7f037cdcecbad15a" }, "downloads": -1, "filename": "log_generator-1.0.1.tar.gz", "has_sig": false, "md5_digest": "a038a16db3762dcbc54a2d72be0ebe78", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5907, "upload_time": "2019-03-01T15:10:57", "url": "https://files.pythonhosted.org/packages/53/f6/6e19d3bd54ab76edc519811ea1c8c172f3194d054b9f8920de9948901472/log_generator-1.0.1.tar.gz" } ] }