{"id":19505296,"url":"https://github.com/mirekys/collectd-apachelog","last_synced_at":"2025-06-23T09:34:27.885Z","repository":{"id":47235622,"uuid":"45901965","full_name":"mirekys/collectd-apachelog","owner":"mirekys","description":"Collectd plugin for obtaining request metrics from Apache's access log","archived":false,"fork":false,"pushed_at":"2021-09-07T15:44:30.000Z","size":12,"stargazers_count":3,"open_issues_count":5,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-26T00:33:49.699Z","etag":null,"topics":["apache","collectd","collectd-apache","collectd-plugin","log-parser"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mirekys.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-10T09:36:31.000Z","updated_at":"2024-02-01T18:07:02.000Z","dependencies_parsed_at":"2022-09-03T11:30:59.001Z","dependency_job_id":null,"html_url":"https://github.com/mirekys/collectd-apachelog","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mirekys/collectd-apachelog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirekys%2Fcollectd-apachelog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirekys%2Fcollectd-apachelog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirekys%2Fcollectd-apachelog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirekys%2Fcollectd-apachelog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mirekys","download_url":"https://codeload.github.com/mirekys/collectd-apachelog/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirekys%2Fcollectd-apachelog/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261453214,"owners_count":23160471,"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":["apache","collectd","collectd-apache","collectd-plugin","log-parser"],"created_at":"2024-11-10T22:29:33.030Z","updated_at":"2025-06-23T09:34:22.866Z","avatar_url":"https://github.com/mirekys.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# collectd-apachelog\n[Collectd](http://www.collectd.org/) plugin for obtaining request metrics from [Apache's](https://httpd.apache.org/) access log. Based on the [apache-log-parser](https://github.com/rory/apache-log-parser) library and the [collectd-python](https://collectd.org/documentation/manpages/collectd-python.5.shtml).\n\n# Installation \u0026 Configuration\n\n* Install the [apache-log-parser](https://github.com/rory/apache-log-parser) package\n* Clone this repo: ```git clone https://github.com/mirekys/collectd-apachelog.git```\n* Place *apachelog.py* to your collectd-python ModulePath\n* Update your collectd.conf\n```\n  \u003cPlugin python\u003e\n        ModulePath \"/../../collectd-plugins/\" # Path, where will the apachelog.py reside\n        LogTraces false\n        Interactive false\n        Import \"apachelog\"\n\n        \u003cModule apachelog\u003e\n                # Plugin instance name\n                Name \"serverX_requests\"\n                # Which time interval should be read from the Access_log at each plugin run\n                Interval 1\n                AccessLog \"/etc/httpd/logs/ssl_access.log\"\n                # Whichever format does your Apache server use for the Access_log\n                AccessLogFormat \"%h %l %u %t \\\"%r\\\" %\u003es %b \\\"%{Referer}i\\\" \\\"%{User-Agent}i\\\" %k %I %O %D\" \n        \u003c/Module\u003e\n\u003c/Plugin\u003e\n```\n\n# Output\n\nOutput of the plugin is dependent mainly on the *Access_log_format* that you specify. It is used by the *apache-log-parser* which then returns specific keys \u0026 values depending on format.\n\nValues are then aggregated by HTTP method and further into *bytes*, *count* and *response time* field types. The value paths provided by the plugin are built dynamically as it reads the different requests from the Access_log (there is no predetermined set of value paths).\n\nOutput example:\n```\nserverX_requests/count-GET=4\nserverX_requests/count-GET-num_keepalives=3\nserverX_requests/bytes-GET-bytes_tx=16017\nserverX_requests/bytes-GET-bytes_rx=3679\nserverX_requests/bytes-GET-response_bytes_clf=12614\nserverX_requests/response_time-GET-time_us=457318\nserverX_requests/count-GET-status_2xx=4\nserverX_requests/count-GET-status_3xx=0\n```\n\n# Debugging\n\nYou can run this plugin in standalone debug mode, where it outputs to console\nwhat would be otherwise sent to the collectd daemon:\n\n``` ./apachelog.py debug ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmirekys%2Fcollectd-apachelog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmirekys%2Fcollectd-apachelog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmirekys%2Fcollectd-apachelog/lists"}