{"id":13413829,"url":"https://github.com/blind-oracle/nginx-prometheus","last_synced_at":"2025-09-02T16:58:41.896Z","repository":{"id":57496920,"uuid":"154297788","full_name":"blind-oracle/nginx-prometheus","owner":"blind-oracle","description":"Turn Nginx logs into Prometheus metrics","archived":false,"fork":false,"pushed_at":"2020-09-16T09:07:15.000Z","size":43,"stargazers_count":41,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-07-31T20:52:54.517Z","etag":null,"topics":["golang","log","nginx","parser","prometheus","syslog"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blind-oracle.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":"2018-10-23T09:10:27.000Z","updated_at":"2024-03-30T07:52:57.000Z","dependencies_parsed_at":"2022-09-03T02:00:13.345Z","dependency_job_id":null,"html_url":"https://github.com/blind-oracle/nginx-prometheus","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/blind-oracle/nginx-prometheus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blind-oracle%2Fnginx-prometheus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blind-oracle%2Fnginx-prometheus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blind-oracle%2Fnginx-prometheus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blind-oracle%2Fnginx-prometheus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blind-oracle","download_url":"https://codeload.github.com/blind-oracle/nginx-prometheus/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blind-oracle%2Fnginx-prometheus/sbom","scorecard":{"id":243393,"data":{"date":"2025-08-11","repo":{"name":"github.com/blind-oracle/nginx-prometheus","commit":"2057d480eec8ac42f0b028aa31164d38d44bf13d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.3,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/17 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Mozilla Public License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v1.1.0 not signed: https://api.github.com/repos/blind-oracle/nginx-prometheus/releases/31340677","Warn: release artifact v1.0.1 not signed: https://api.github.com/repos/blind-oracle/nginx-prometheus/releases/15116035","Warn: release artifact v1.1.0 does not have provenance: https://api.github.com/repos/blind-oracle/nginx-prometheus/releases/31340677","Warn: release artifact v1.0.1 does not have provenance: https://api.github.com/repos/blind-oracle/nginx-prometheus/releases/15116035"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":7,"reason":"3 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2022-0322 / GHSA-cg3q-j54f-5p7p","Warn: Project is vulnerable to: GO-2022-0493 / GHSA-p782-xgp4-8hr8","Warn: Project is vulnerable to: GO-2024-2611 / GHSA-8r3f-844c-mc37"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-17T07:02:58.151Z","repository_id":57496920,"created_at":"2025-08-17T07:02:58.152Z","updated_at":"2025-08-17T07:02:58.152Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273317756,"owners_count":25084037,"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","status":"online","status_checked_at":"2025-09-02T02:00:09.530Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["golang","log","nginx","parser","prometheus","syslog"],"created_at":"2024-07-30T20:01:50.541Z","updated_at":"2025-09-02T16:58:41.872Z","avatar_url":"https://github.com/blind-oracle.png","language":"Go","funding_links":[],"categories":["Server Applications","服务器应用程序","服务端应用","Relational Databases"],"sub_categories":["HTTP Clients","HTTP客户端","查询语"],"readme":"# Nginx log parser and Prometheus exporter\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/blind-oracle/nginx-prometheus)](https://goreportcard.com/report/github.com/blind-oracle/nginx-prometheus)\n[![Coverage Status](https://coveralls.io/repos/github/blind-oracle/nginx-prometheus/badge.svg?branch=master)](https://coveralls.io/github/blind-oracle/nginx-prometheus?branch=master)\n[![Build Status](https://travis-ci.org/blind-oracle/nginx-prometheus.svg?branch=master)](https://travis-ci.org/blind-oracle/nginx-prometheus)\n[![Mentioned in Awesome Go](https://awesome.re/mentioned-badge-flat.svg)](https://github.com/avelino/awesome-go)\n\nThis service parses incoming syslog messages from Nginx sent over UDP and converts them into Prometheus metrics exported through the built-in HTTP server.\n\n- If the prefix-list is specified then per-URI statistics are generated.\n  Using this feature without URI-prefix list is dangerous because it leads to an unbounded memory usage. It's therefore enabled only with a limited prefix list.\n\n  The URI prefix list is a plain-text file with a single prefix per line, e.g.\n\n  ```bash\n  /api/call1.json\n  /api/call2.json\n  /api/call3.json\n  ```\n\n  URIs received from nginx are stripped of any query parameters - only the part before '?' is used.\n\n- It optionally supports country lookup for client IPs using MaxMind GeoIP database.\n\n## Nginx configuration snippet\n\n```nginxconf\nlog_format collector '$remote_addr|$scheme|$host|$request_method|$server_protocol|$request_uri|$status|$request_time|$request_length|$bytes_sent';\naccess_log syslog:server=1.1.1.1:1514,tag=nginx collector;\n```\n\n## Getting it\n\n- Get RPM \u0026 DEB directly from [releases](https://github.com/blind-oracle/nginx-prometheus/releases), only linux-amd64 build currently available.\n\n- Build youself:\n\n```bash\ngo get github.com/blind-oracle/nginx-prometheus\ncd $GOPATH/src/github.com/blind-oracle/nginx-prometheus\ngo build\n```\n\n## Usage example\n\nIf you're using RPM/DEB packages then options are set in `/etc/default/nginx-prometheus`\n\n```bash\n./nginx-prometheus \\\n-debug false \\\n-listenSyslog 0.0.0.0:1514 \\\n-listenHTTP 0.0.0.0:1514 \\\n-geoipCountryDB /etc/nginx-prometheus/country.mmdb \\\n-uriPrefixFile /etc/nginx-prometheus/uriPrefixes.txt\n```\n\n- **debug** - prints every syslog message received if true (defaults to false)\n- **listenSyslog** - ip:port on which to listen for UDP Syslog messages (defaults to 0.0.0.0:1514)\n- **listenHTTP** - ip:port on which to listen for incoming HTTP requests from Prometheus (defaults to 0.0.0.0:11080)\n- **geoipCountryDB** - path to MaxMind country GeoIP database (optional)\n- **uriPrefixFile** - path to a URI prefix list (optional)\n\n## Grafana dashboard\n\nAdd Prometheus source to Grafana and import _grafana-dashboard.json_ for most common graphs.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblind-oracle%2Fnginx-prometheus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblind-oracle%2Fnginx-prometheus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblind-oracle%2Fnginx-prometheus/lists"}