{"id":16696684,"url":"https://github.com/zenithalhourlyrate/entropy-pmacct","last_synced_at":"2025-09-29T07:13:31.038Z","repository":{"id":130587094,"uuid":"278875428","full_name":"ZenithalHourlyRate/entropy-pmacct","owner":"ZenithalHourlyRate","description":"pmacct configuration for hosts in entropy/gravity","archived":false,"fork":false,"pushed_at":"2020-08-18T14:36:23.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-14T03:11:33.120Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ZenithalHourlyRate.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2020-07-11T14:15:33.000Z","updated_at":"2020-08-18T14:36:26.000Z","dependencies_parsed_at":"2023-04-03T21:33:55.624Z","dependency_job_id":null,"html_url":"https://github.com/ZenithalHourlyRate/entropy-pmacct","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ZenithalHourlyRate/entropy-pmacct","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZenithalHourlyRate%2Fentropy-pmacct","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZenithalHourlyRate%2Fentropy-pmacct/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZenithalHourlyRate%2Fentropy-pmacct/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZenithalHourlyRate%2Fentropy-pmacct/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZenithalHourlyRate","download_url":"https://codeload.github.com/ZenithalHourlyRate/entropy-pmacct/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZenithalHourlyRate%2Fentropy-pmacct/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277479104,"owners_count":25824924,"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-29T02:00:09.175Z","response_time":84,"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":[],"created_at":"2024-10-12T17:44:33.693Z","updated_at":"2025-09-29T07:13:30.999Z","avatar_url":"https://github.com/ZenithalHourlyRate.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Entropy pmacct configuration files\n\nIn this repo, several necessary configuration files are provided for those\nhosts in `entropy/gravity` to support monitoring and collecting of the flows\nin `entropy/gravity`.\n\nThese files are primarily configured for `entropy` now, but minor changes can\nbe done to transform them to satisfy the need of `gravity`.\n\n## Install pmacct\n\nSince hosts in `entropy/gravity` are mainly debian boxes, we suggest one \ncommand to rule them all.\n\n```bash\n$ sudo apt install pmacct\n```\n\nFor Arch users, however, `pmacct` is not in the official repos, but only in\nAUR, hence we recommend\n\n```bash\n$ [AUR helper] -S pmacct\n```\n\nFor arch linux arm users, we can build the package from the PKGBUILD obtained\nfrom x86_64 machines with proper changes and manual dependency check, and\n`pmacct` can run smoothly.\n\nFor CentOS users, the commands are\n\n```\nyum install libpcap libpcap-devel mariadb-libs mariadb-devel\ngit clone https://github.com/pmacct/pmacct\ncd pmacct\n./autogen.sh\n./configure --enable-mysql\nmake\nsudo make install\n```\n\n## Proper placement of the files\n\nThe file `entropy.conf`, `entropy.network.lst`, `entropy.pretag.map` and\n`entropy.interfaces.map` should be placed in `/etc/pmacct/` since we have\n fixed the path to them in `entropy.conf`.\n\n## Necessary changes in the files\n\nFirst we need to determine `entropy.pretag.map`, which is a unique id for \nyou box in the final statistics.\n\nFor entropy hosts with the subnet `2001:470:4c22:ae86:babe:XXX0::/92` where\n`XXX` is your unique id, we convert `(XXX)_16=(YYYY)_10`, namely decimal number.\nFor example, `(41)_16=(65)_10`. Then we fill the field as\n\n```\nset_tag = YYYY\n```\n\nNow consider the `[redacted]` field in `entropy.conf`, they can be accessed\nvia `i@zenithal.me` or `t.me/ZenithalH`, or you can hack into the database\nto obtain them.\n\n## Daemon on startup\n\nFirst of all, check that in `/etc/pmacct/entropy.conf`, `daemonize` is set \nto be `true`!\n\n### openrc\n\nFor `openrc` users, espcially those with debian, first we need to disable\nthe default daemon when installing `pmacct` by\n\n```\nrc-update del pmacctd default\nrc-update del uacctd default\nrc-update del nfacctd default\nrc-update del sfacctd default\n```\n\nThen you should move `etc.init.d.pmacctd.entropy` to \n`/etc/init.d/pmacctd.entropy` and move `etc.default.pmacctd.entropy` to\n`/etc/default/pmacctd.entropy`. Remember to check that \n`/etc/init.d/pmacctd.entropy` is eXecutable, namely `+x`.\n\nThen by the following commands to start the\ndaemon (proper changes to the configuration file needed!)\n\n```\nrc-update add pmacctd.entropy default\nrc-service pmacctd.entropy start\n```\n\nWe use the following command to disable the service\n\n```\nrc-update del pmacctd.entropy default\n```\n\n### systemd\n\nFirst move `lib.systemd.system.pmacctd.entropy.service` to \n`/lib/systemd/system/pmacctd.entropy.service`, then move \n`etc.default.pmacctd.entropy` to `/etc/default/pmacctd.entropy`. We use the\nfollowing command to enable and start the service\n\n```\nsystemctl enable --now pmacctd.entropy.service\n```\n\nUse the following command to disable the service\n\n```\nsystemctl disable --now pmacctd.entropy.service\n```\n\n## Comment on entropy.interfaces.map (disabled now)\n\nIn fact other interfaces like `divi`, `ivi` or `any` can also be added in this\nfile, and an `ifindex` can be given to them, which could be a key in the final\nstatistics. However, this is only considered for gravity now.\n\n## Comment on entropy.network.lst\n\nThis list provides an ip-to-subnet mapping, which should be altered greatly\nfor gravity hosts.\n\nNow this file is generated by a script in the `entropy.git` repo, but it \ncan not change automatically, which may cause inconsistency. The issue should\nbe resolved latter by `sync etc` effort of other participants.\n\n## Docker\n\nThanks to [this repo](github.com/DE-IBH/pmacct-docker), we get a prototype for \nthe dockerfile and docker-compose\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzenithalhourlyrate%2Fentropy-pmacct","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzenithalhourlyrate%2Fentropy-pmacct","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzenithalhourlyrate%2Fentropy-pmacct/lists"}