{"id":18542404,"url":"https://github.com/gforcada/haproxy_log_analysis","last_synced_at":"2025-04-09T14:14:35.531Z","repository":{"id":12419037,"uuid":"15073447","full_name":"gforcada/haproxy_log_analysis","owner":"gforcada","description":"HAProxy log analyzer","archived":false,"fork":false,"pushed_at":"2023-11-25T18:43:42.000Z","size":718,"stargazers_count":91,"open_issues_count":10,"forks_count":35,"subscribers_count":16,"default_branch":"main","last_synced_at":"2025-04-06T13:45:03.075Z","etag":null,"topics":["haproxy"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/haproxy_log_analysis","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gforcada.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-12-10T10:05:54.000Z","updated_at":"2025-02-10T00:33:57.000Z","dependencies_parsed_at":"2023-01-13T16:56:26.627Z","dependency_job_id":"bace8527-c0da-4534-9ad1-78f02dcde16a","html_url":"https://github.com/gforcada/haproxy_log_analysis","commit_stats":{"total_commits":345,"total_committers":13,"mean_commits":26.53846153846154,"dds":0.5391304347826087,"last_synced_commit":"e54f7a62174e1d204134123447625e37d77a78fb"},"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gforcada%2Fhaproxy_log_analysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gforcada%2Fhaproxy_log_analysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gforcada%2Fhaproxy_log_analysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gforcada%2Fhaproxy_log_analysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gforcada","download_url":"https://codeload.github.com/gforcada/haproxy_log_analysis/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248054193,"owners_count":21039952,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["haproxy"],"created_at":"2024-11-06T20:08:20.703Z","updated_at":"2025-04-09T14:14:35.510Z","avatar_url":"https://github.com/gforcada.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":".. -*- coding: utf-8 -*-\n\nHAProxy log analyzer\n====================\nThis Python package is a `HAProxy`_ log parser.\nIt analyzes HAProxy log files in multiple ways (see commands section below).\n\n.. note::\n   Currently only the `HTTP log format`_ is supported.\n\nTests and coverage\n------------------\nNo project is trustworthy if does not have tests and a decent coverage!\n\n.. image:: https://github.com/gforcada/haproxy_log_analysis/actions/workflows/tests.yml/badge.svg?branch=master\n   :target: https://github.com/gforcada/haproxy_log_analysis/actions/workflows/tests.yml\n\n.. image:: https://coveralls.io/repos/github/gforcada/haproxy_log_analysis/badge.svg?branch=master\n   :target: https://coveralls.io/github/gforcada/haproxy_log_analysis?branch=master\n\n\nDocumentation\n-------------\nSee the `documentation and API`_ at ReadTheDocs_.\n\nCommand-line interface\n----------------------\nThe current ``--help`` looks like this::\n\n  usage: haproxy_log_analysis [-h] [-l LOG] [-s START] [-d DELTA] [-c COMMAND]\n                              [-f FILTER] [-n] [--list-commands]\n                              [--list-filters] [--json]\n\n  Analyze HAProxy log files and outputs statistics about it\n\n  optional arguments:\n    -h, --help            show this help message and exit\n    -l LOG, --log LOG     HAProxy log file to analyze\n    -s START, --start START\n                          Process log entries starting at this time, in HAProxy\n                          date format (e.g. 11/Dec/2013 or\n                          11/Dec/2013:19:31:41). At least provide the\n                          day/month/year. Values not specified will use their\n                          base value (e.g. 00 for hour). Use in conjunction with\n                          -d to limit the number of entries to process.\n    -d DELTA, --delta DELTA\n                          Limit the number of entries to process. Express the\n                          time delta as a number and a time unit, e.g.: 1s, 10m,\n                          3h or 4d (for 1 second, 10 minutes, 3 hours or 4\n                          days). Use in conjunction with -s to only analyze\n                          certain time delta. If no start time is given, the\n                          time on the first line will be used instead.\n    -c COMMAND, --command COMMAND\n                          List of commands, comma separated, to run on the log\n                          file. See --list-commands to get a full list of them.\n    -f FILTER, --filter FILTER\n                          List of filters to apply on the log file. Passed as\n                          comma separated and parameters within square brackets,\n                          e.g ip[192.168.1.1],ssl,path[/some/path]. See --list-\n                          filters to get a full list of them.\n    -n, --negate-filter   Make filters passed with -f work the other way around,\n                          i.e. if the ``ssl`` filter is passed instead of\n                          showing only ssl requests it will show non-ssl\n                          traffic. If the ``ip`` filter is used, then all but\n                          that ip passed to the filter will be used.\n    --list-commands       Lists all commands available.\n    --list-filters        Lists all filters available.\n    --json                Output results in json.\n    --invalid             Print the lines that could not be parsed. Be aware\n                          that mixing it with the print command will mix their\n                          output.\n\n\nCommands\n--------\n\nCommands are small purpose specific programs in themselves that report specific statistics about the log file being analyzed.\nSee them all with ``--list-commands`` or online at https://haproxy-log-analyzer.readthedocs.io/modules.html#module-haproxy.commands.\n\n- ``average_response_time``\n- ``average_waiting_time``\n- ``connection_type``\n- ``counter``\n- ``http_methods``\n- ``ip_counter``\n- ``print``\n- ``queue_peaks``\n- ``request_path_counter``\n- ``requests_per_hour``\n- ``requests_per_minute``\n- ``server_load``\n- ``slow_requests``\n- ``slow_requests_counter``\n- ``status_codes_counter``\n- ``top_ips``\n- ``top_request_paths``\n\nFilters\n-------\nFilters, contrary to commands,\nare a way to reduce the amount of log lines to be processed.\n\n.. note::\n   The ``-n`` command line argument allows to reverse filters output.\n\n   This helps when looking for specific traces, like a certain IP, a path...\n\nSee them all with ``--list-filters`` or online at https://haproxy-log-analyzer.readthedocs.io/modules.html#module-haproxy.filters.\n\n- ``backend``\n- ``frontend``\n- ``http_method``\n- ``ip``\n- ``ip_range``\n- ``path``\n- ``response_size``\n- ``server``\n- ``slow_requests``\n- ``ssl``\n- ``status_code``\n- ``status_code_family``\n- ``wait_on_queues``\n\nInstallation\n------------\nAfter installation you will have a console script `haproxy_log_analysis`::\n\n    $ pip install haproxy_log_analysis\n\nTODO\n----\n- add more commands: *(help appreciated)*\n\n  - reports on servers connection time\n  - reports on termination state\n  - reports around connections (active, frontend, backend, server)\n  - *your ideas here*\n\n- think of a way to show the commands output in a meaningful way\n\n- be able to specify an output format. For any command that makes sense (slow\n  requests for example) output the given fields for each log line (i.e.\n  acceptance date, path, downstream server, load at that time...)\n\n- *your ideas*\n\n.. _HAProxy: http://haproxy.1wt.eu/\n.. _HTTP log format: http://cbonte.github.io/haproxy-dconv/2.2/configuration.html#8.2.3\n.. _documentation and API: https://haproxy-log-analyzer.readthedocs.io/\n.. _ReadTheDocs: http://readthedocs.org\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgforcada%2Fhaproxy_log_analysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgforcada%2Fhaproxy_log_analysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgforcada%2Fhaproxy_log_analysis/lists"}