{"id":23910521,"url":"https://github.com/badrpc/ngx_metrics","last_synced_at":"2026-05-18T05:32:47.171Z","repository":{"id":204040295,"uuid":"198386745","full_name":"badrpc/ngx_metrics","owner":"badrpc","description":"Makes nginx performance metrics available for Prometheus","archived":false,"fork":false,"pushed_at":"2020-03-29T18:41:07.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-10-27T22:36:30.313Z","etag":null,"topics":["nginx","prometheus","prometheus-exporter"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/badrpc.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,"governance":null}},"created_at":"2019-07-23T08:28:18.000Z","updated_at":"2023-10-27T22:36:31.526Z","dependencies_parsed_at":null,"dependency_job_id":"334126e9-19f1-4856-89b4-748a480236e2","html_url":"https://github.com/badrpc/ngx_metrics","commit_stats":null,"previous_names":["badrpc/ngx_metrics"],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badrpc%2Fngx_metrics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badrpc%2Fngx_metrics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badrpc%2Fngx_metrics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badrpc%2Fngx_metrics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/badrpc","download_url":"https://codeload.github.com/badrpc/ngx_metrics/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240347981,"owners_count":19787237,"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":["nginx","prometheus","prometheus-exporter"],"created_at":"2025-01-05T07:17:02.660Z","updated_at":"2026-05-18T05:32:42.139Z","avatar_url":"https://github.com/badrpc.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ngx_metrics\n\nngx_metrics collects nginx performance metrics via syslog feed from nginx and\nmakes them available for prometheus to scrape.\n\n## nginx configuration\n\n```\nhttp {\n\n    # ...\n\n    # $body_bytes_sent\t\tnumber of bytes sent to a client, not counting the response header\n    # $bytes_sent\t\tthe number of bytes sent to a client\n    # $connections_active\tThe current number of active client connections including Waiting connections.\n    # $connections_reading\tThe current number of connections where nginx is reading the request header.\n    # $connections_waiting\tThe current number of idle client connections waiting for a request.\n    # $connections_writing\tThe current number of connections where nginx is writing the response back to the client.\n    # $host\t\t\tin this order of precedence: host name from the request line, or host name from the “Host” request header field, or the server name matching a request\n    # $request_length\t\trequest length (including request line, header, and request body)\n    # $request_time\t\trequest processing time in seconds with a milliseconds resolution; time elapsed between the first bytes were read from the client and the log write after the last bytes were sent to the client\n    # $status\t\t\tresponse status\n    # $ancient_browser\t\tequals the value set by the ancient_browser_value directive, if a browser was identified as ancient;\n    # $pipe\t\t\t“p” if request was pipelined, “.” otherwise\n    # $remote_user\t\tuser name supplied with the Basic authentication\n    # $request_completion\t“OK” if a request has completed, or an empty string otherwise \n    # $server_name\t\tname of the server which accepted a request\n    # $server_protocol\t\trequest protocol, usually “HTTP/1.0”, “HTTP/1.1”, or “HTTP/2.0”\n\n    log_format ngx_metrics escape=json '{'\n        '\"AncientBrowser\":\"$ancient_browser\",'\n        '\"BodyBytesSent\":$body_bytes_sent,'\n        '\"BytesSent\":$bytes_sent,'\n        '\"ConnectionsActive\":$connections_active,'\n        '\"ConnectionsReading\":$connections_reading,'\n        '\"ConnectionsWaiting\":$connections_waiting,'\n        '\"ConnectionsWriting\":$connections_writing,'\n        '\"Host\":\"$host\",'\n        '\"Pipe\":\"$pipe\",'\n        '\"RemoteUser\":\"$remote_user\",'\n        '\"RequestCompletion\":\"$request_completion\",'\n        '\"RequestLength\":$request_length,'\n        '\"RequestTime\":$request_time,'\n        '\"Scheme\":\"$scheme\",'\n        '\"ServerName\":\"$server_name\",'\n        '\"ServerProtocol\":\"$server_protocol\",'\n        '\"Status\":\"$status\"'\n    '}';\n\n    # ...\n\n    access_log syslog:server=127.0.0.1:9514 ngx_metrics;\n\n    # ...\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadrpc%2Fngx_metrics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbadrpc%2Fngx_metrics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadrpc%2Fngx_metrics/lists"}