{"id":45153619,"url":"https://github.com/droyo/dnscache-stats","last_synced_at":"2026-02-20T03:31:36.396Z","repository":{"id":66909549,"uuid":"64243967","full_name":"droyo/dnscache-stats","owner":"droyo","description":"Generate graphite metrics from dnscache output","archived":false,"fork":false,"pushed_at":"2016-08-11T03:20:30.000Z","size":64,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-20T14:00:13.365Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/droyo.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-07-26T18:14:19.000Z","updated_at":"2016-10-06T13:13:18.000Z","dependencies_parsed_at":"2023-05-13T16:00:13.955Z","dependency_job_id":null,"html_url":"https://github.com/droyo/dnscache-stats","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/droyo/dnscache-stats","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/droyo%2Fdnscache-stats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/droyo%2Fdnscache-stats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/droyo%2Fdnscache-stats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/droyo%2Fdnscache-stats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/droyo","download_url":"https://codeload.github.com/droyo/dnscache-stats/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/droyo%2Fdnscache-stats/sbom","scorecard":{"id":356883,"data":{"date":"2025-08-11","repo":{"name":"github.com/droyo/dnscache-stats","commit":"701278fb475bca72749c5389f0aa484a81b4f42f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.7,"checks":[{"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":"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":"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/22 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":"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":"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":"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: MIT License: 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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v0.0.3 not signed: https://api.github.com/repos/droyo/dnscache-stats/releases/3861999","Warn: release artifact v0.0.2 not signed: https://api.github.com/repos/droyo/dnscache-stats/releases/3745713","Warn: release artifact v0.0.3 does not have provenance: https://api.github.com/repos/droyo/dnscache-stats/releases/3861999","Warn: release artifact v0.0.2 does not have provenance: https://api.github.com/repos/droyo/dnscache-stats/releases/3745713"],"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"}}]},"last_synced_at":"2025-08-18T09:49:13.428Z","repository_id":66909549,"created_at":"2025-08-18T09:49:13.428Z","updated_at":"2025-08-18T09:49:13.428Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29640587,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-20T03:21:14.183Z","status":"ssl_error","status_checked_at":"2026-02-20T03:18:24.455Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-02-20T03:31:36.243Z","updated_at":"2026-02-20T03:31:36.385Z","avatar_url":"https://github.com/droyo.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/droyo/dnscache-stats.svg?branch=master)](https://travis-ci.org/droyo/dnscache-stats)\n\nThe dnscache-stats program can be used to send metrics generated from\nthe log entries of the [dnscache][1] program to a graphite-compatible\nmetrics database.\n\n# Usage\n\n\tdnscache-stats [-i 60s] [-m metrics-template] [-f file] graphite-host[:port]\n\nDnscache-stats will read data on standard input, and upload various\nmetrics to the provided server using Graphite's [plain-text protocol\nformat][2]. If graphite-host is a file name (begins with '.' or '/'),\nmetrics are appended to the file instead. All data read on stdin is\nechoed to stdout, unmodified, so that dnscache-stats can be used as a\nlog script for dnscache:\n\n\t#!/bin/bash\n\texec \u003e \u003e(exec setuidgid Gdnslog multilog t ./main)\n\texec setuidgid Gdnslog dnscache-stats graphite.example.net\n\t\t\n\nThis is the recommended way to run dnscache-stats. Alternatively, it can be\nrun as a standalone service using the -f flag. Here is an example systemd\nunit file for such a service:\n\n\t[Unit]\n\tDescription=send dnscache metrics to graphite\n\t\n\t[Service]\n\tExecStart=/usr/bin/dnscache-stats -f /service/dnscache/log/main/current graphite.example.net\n\tRestart=always\n\t\n\t[Install]\n\tWantedBy=multi-user.target\n\nBy default, dnscache-stats will generate one data point for each metric every minute.\nThe interval between data points can be changed with the -i option. To change the\ninterval to 5 minutes, run:\n\n\tdnscache-stats -i 5m graphite.example.net\n\nBy default, metrics names will be of the form\n\n\tservers.HOSTNAME.dnscache.METRIC_NAME\n\nThis naming convention is taken from [Diamond][3]. The -m flag can be used to change\nthe naming convention. For instance, to change the naming convention to the collectd\nconvention, run:\n\n\tdnscache-stats -m 'collectd.{{.Hostname}}.dnscache.{{.Metric}}'\n\nWithin the template, `.Service` will be the name of the service directory used by\ndaemontools, if it is possible to infer. For instance, if dnscache-stats is run from\n`/service/dnscache-primary/log`, then the command\n\n\tdnscache-stats -m servers.{{.Hostname}}.dnscache.{{.Service|rstrip \"dnscache-\"}}.{{.Metric}}\n\nwill generate metrics such as the following\n\n\tservers.myhost01.dnscache.primary.cache_motion\n\n# Metrics collected\n\ndnscache-stats collects the following metrics. The following description\nassumes the default interval (-i option) of 1 minute:\n\n- `queries`: number of queries received in the last minute\n- `cache_motion`: number of bytes written to the cache in the last minute\n- `udp_active`: max sample of the number of pending (unfinished) UDP queries over the last minute\n- `tcp_active`: max sample of the number of pending (unfinished) TCP queries over the last minute\n- `cache_hits`: number of cache hits\n- `drop`: the number of dropped queries\n- `query_avg_us`: mean query time of all requests in the last minute (μs)\n- `query_max_us`: slowest query in the last minute (μs)\n- `servfail`: number of failure responses sent\n- `tx`: number of outgoing queries dnscache made to resolve a record\n\nSee [this page][4] for a helpful description of the information available in\ndnscache's log output.\n\n[1]: https://cr.yp.to/djbdns/dnscache.html\n[2]: http://graphite.readthedocs.io/en/latest/feeding-carbon.html#the-plaintext-protocol\n[3]: https://github.com/BrightcoveOS/Diamond\n[4]: http://www.dqd.com/~mayoff/notes/djbdns/dnscache-log.html\n\n# Operational notes\n\n- When measuring the `query_avg` and `query_max` metrics, dnscache-stats\n  will only consider the first 100,000 queries. This is to prevent dnscache-stats\n  from consuming an unpredictable amount of memory and is controlled by\n  the compile-time constant `QueryTrackingLimit`.\n- dnscache-stats will buffer up to 100 metrics in memory if they\n  cannot be sent to the graphite server. Once the buffer is filled,\n  the oldest metrics are dropped first. This is controlled by the\n  compile-time constant `MetricsBufferMax`.\n- dnscache-stats will exit if it can no longer write to stdout. This is important when\n  running dnscache-stats as a log program under daemontools, as it will ensure that\n  the supervise program will restart it if multilog dies.\n- When following a physical file (via the -f flag), dnscache will attempt to detect and\n  re-open the file if it is renamed (such as during log rotation). This process is\n  imperfect and can result in (very small) errors in metrics.\n\n# Building and developing dnscache-stats\n\nDnscache-stats is written with Go, and can be built with Go version 1.6 or above.\nTo build dnscache, run\n\n\tgo build\n\nOr, to fetch, build and install dnscache-stats to $GOPATH/bin, run\n\n\tgo get github.com/droyo/dnscache-stats\n\nPull requests are welcome, and any issues can be opened through github.\nPlease run `go test` and `go fmt` before submitting any changes.\n\n# Packaging and deploying dnscache-stats\n\nThe `contrib` directory contains an RPM spec file that can be used to package\nthe dnscache-stats program. Pre-packaged RPMs and binary tarballs can\nbe found under the github releases for this repository. Binary releases are\nbuilt with the latest stable version of Go at the time of the release.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdroyo%2Fdnscache-stats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdroyo%2Fdnscache-stats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdroyo%2Fdnscache-stats/lists"}