{"id":22186040,"url":"https://github.com/twhiston/factd","last_synced_at":"2025-03-24T19:42:22.814Z","repository":{"id":57655989,"uuid":"130722589","full_name":"twhiston/factd","owner":"twhiston","description":"Pluggable Facter replacement in golang","archived":false,"fork":false,"pushed_at":"2018-05-21T22:17:27.000Z","size":51,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-30T00:19:40.622Z","etag":null,"topics":["fact-checking","facter","golang","systems"],"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/twhiston.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-04-23T16:01:56.000Z","updated_at":"2018-08-08T16:05:40.000Z","dependencies_parsed_at":"2022-08-25T08:02:09.491Z","dependency_job_id":null,"html_url":"https://github.com/twhiston/factd","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twhiston%2Ffactd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twhiston%2Ffactd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twhiston%2Ffactd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twhiston%2Ffactd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/twhiston","download_url":"https://codeload.github.com/twhiston/factd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245342532,"owners_count":20599819,"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":["fact-checking","facter","golang","systems"],"created_at":"2024-12-02T10:19:49.292Z","updated_at":"2025-03-24T19:42:22.793Z","avatar_url":"https://github.com/twhiston.png","language":"Go","readme":"# factd\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/85ca8315d2884dbca0b716a800310103)](https://www.codacy.com?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=twhiston/factd\u0026amp;utm_campaign=Badge_Grade)\n[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/85ca8315d2884dbca0b716a800310103)](https://www.codacy.com?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=twhiston/factd\u0026utm_campaign=Badge_Coverage)\n[![Go Report Card](https://goreportcard.com/badge/github.com/twhiston/factd)](https://goreportcard.com/report/github.com/twhiston/factd)\n[![pipeline status](https://gitlab.com/twhiston/factd/badges/master/pipeline.svg)](https://gitlab.com/twhiston/factd/commits/master)\n\nFactd is a fact reporting daemon, similar to puppetlabs facte.\nIt is intended to be run as a process on the target system, via systemd.\nNote that in a container it will need some extra privilages and mounts to be able to access the host information\n\nFacts are served to an http endpoint, as well as prometheus metrics and pprof data.\n\nfactd is under heavy development, expect breaking changes until v1.0\nfactd currently is only fully supported in linux, please submit pull requests that change this.\n\n## Config\n\nAll command line options can also be given in a `factd.yml` config file or as env vars prepended with `FACTD_`\n\n## Environmental Variables\n\nAs factd uses [gopsutil](https://github.com/shirou/gopsutil) under the hood for some functionality you should also be aware of it's env vars\n\n* `HOST_ETC` - specify alternative path to `/etc` directory\n* `HOST_PROC` - specify alternative path to `/proc` mountpoint\n* `HOST_SYS` - specify alternative path to `/sys` mountpoint\n* `HOST_VAR` - specify alternative path to `/var` mountpoint\n\n## Containers\n\nAlthough a container is provided it is not the preferred way to run factd.\n\n```\ndocker run -it --name factd --rm --privileged --ipc=host --net=host --pid=host -e HOST=/host -v /run:/run -v /var/log:/var/log -v /etc/localtime:/etc/localtime -v /:/host tomwhiston/factd:latest\n```\n\nThere are some things to be aware of when running in a container:\n\n* It is a super privilaged container in every way!\n* The results you get will differ from running it on the host in a few ways\n    * Host filesystem mounted at /host and env vars set to use this\n    * Extra volumes\n    * Different $PATH\n    * Different Host Id\n    * Different User\n    * IsVirtual true in container (docker only)\n    * VirtualizationRole guest in container (docker only)\n    * VirtualizationSystem set in container (docker only)\n\nCheck the taskfile for running and building the container with the awesome, and daemonless, [podman](https://github.com/projectatomic/libpod)\n\n## Adding New Plugins/Formatters\n\nUse the tmpl command to generate new plugin boilerplate.\nSee tmpl --help for more details.\n\n## Adding New Commands\n\nUse [cobra](https://github.com/spf13/cobra) for command boilerplate\nWhen adding new commands bind your (p)flags to viper and use viper and not the cmd for data, this allows the user to supply a configuration file supplying flag values. gopsutil env vars are also available from viper.\n\n## Factd/Facter Parity\n\nFactd aims to have as much parity with facter's [modern facts](https://docs.puppet.com/facter/3.3/core_facts.html#modern-facts) feature set as is reasonable,\nnote that this does not extend to the names or structure of the facts returned.\n\n| facter                | factd   | notes                 |\n|-----------------------|---------|-----------------------|\n| augeas                |         |                       |\n| disks                 | disks   |                       |\n| dmi                   |         |                       |\n| ec2_metadata          |         |                       |\n| ec2_userdata          |         |                       |\n| env_windows_installdir|         | windows not supported |\n| facterversion         | version |                       |\n| filesystems           | disks   |                       |\n| gce                   |         |                       |\n| identity              | user    |                       |\n| is_virtual            | host    |                       |\n| kernel                | host    |                       |\n| kernelmajversion      | host    |                       |\n| kernelrelease         | host    |                       |\n| kernelversion         | host    |                       |\n| ldom                  |         | solaris not supported |\n| load_averages         | load    |                       |\n| memory                | mem     |                       |\n| mountpoints           | disks   |                       |\n| networking            | net     | partially implemented |\n| os                    | host    |                       |\n| partitions            | disks   |                       |\n| path                  | host    |                       |\n| processors            | cpu     |                       |\n| ruby                  |         |                       |\n| solaris_zones         |         | solaris not supported |\n| ssh                   |         |                       |\n| system_profiler       |         | osx not supported     |\n| system_uptime         | host    |                       |\n| timezone              | host    |                       |\n| virtual               | host    |                       |\n| xen                   |         |                       |\n| zfs_featurenumbers    |         | solaris not supported |\n| zfs_version           |         | solaris not supported |\n| zpool_featurenumbers  |         | solaris not supported |\n| zpool_version         |         | solaris not supported |\n\n## Additional Facts\n\nIn addition to the facter facts mentioned above factd provides\n\n| name  | notes |\n|-------|-------|\n| docker| containers \u0026 images |\n\n## Monitoring\n\n`/metrics` Prometheus Endpoint\n\nYou can disable prometheus monitoring by passing `--prometheus=false`\n\n`/debug/pprof` pprof Endpoints\n\nYou can disable pprof by passing `--pprof=false`\n\n`/healthz` Endpoint\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwhiston%2Ffactd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftwhiston%2Ffactd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwhiston%2Ffactd/lists"}