Sillyfacter prints JSON facts related to the state of the system. The state here mean overview of the process running, their connections and open files. You can also pass mongodb url to store in database.
Current focus on:
Portable *.nix
Expandable using custom agents/modules
Output/filter to stdout or mongo db using pymongo or (Celery?)
For more info: sillyfacter at github
Installation
Requirements
Desgined in Python 2.7, for *nix systems. Tested on Mac, RHEL, Solaris. The Python package dependencies are:
netaddr
netifaces
psutil
pymongo
pip >= v1.5.1
But these are taken care by pip during installation
Using pip
# Needs pip v1.5 # So just upgrade it anyways... pip install --ugrade pip pip install --upgrade --allow-all-external --allow-unverified netifaces sillyfacter # --upgrade ensures latest versions # --allow-all-external and --allow-unverified is needed for netifaces :-(
From source:
On Debian: Ensure following things are installed:
apt-get install python-dev build-essential
apt-get install libbz2-dev libssl-dev libsqlite3-dev libreadline6-dev ncurses-dev
Download installer bash script and run it
wget https://raw.github.com/hihellobolke/sillyfacter/master/installer.bash
bash installer.bash
Usage
Just execute sillyfacter and it should output result back in JSON. If you like to store output directly in a MongoDB, pass mongodb url using --out mongodb://mydb/. Otherwise it just dumps JSON to console.
Simple JSON output
$ sillyfacter
{
"_scan_id": "gautsing-mac",
"_scan_time": "1390293214",
"arch": "x86_64",
"boottime": "1390206976",
"cpu": 8,
"cpu_used": 10.2,
"domainname": "",
"fqdn": "gautsing-mac",
"hardwareisa": "i386",
"hardwaremodel": "i386",
"has": {
"filesystem": [
{
"dev": "/dev/disk0s2",
Storing facts directly in MongoDB
Stores JSON facts directly in to mongodb (uses pymongo). The document *_id* defaults to hostname fact, collection defaults to “sillyfacter”. Documents are overwritten. Timestamps are converted to Datetime so their types are preserved :-)
$ sillyfacter --out mongodb://localhost/factdb
{
"_info": {
"_id": "gautsing-mac",
"collection": "sillyfacter",
"db": "factdb",
"host": "localhost",
"port": 27017
},
"status": "Save success",
"url": "mongodb://localhost/factdb"
}
Help?
And yes there some –help too.
$ python sillyfacter --help
usage: sillyfacter [-h] [--modules MODULES] [--out OUT] [--log LOG]
[--verbose] [--strict] [--debug]
[--scan {auto,new,last}] [--raw] [--version]
Sillyfacter fetches facts about the state of the system. Gathers process, open
file, socket info and then outputs a JSON (currently). Designed for dependency
mappings.
optional arguments:
-h, --help show this help message and exit
--modules MODULES comma seperated list of modules to be executed.
Default list is "all" which is expanded to include
"process,network,user,os,filesystem"
--out OUT URL for the backend Mongo database (E.g.
mongodb://localhost:27017/). If nothing is supplied it
dumps JSON to stdout
--log LOG file to write logs to, otherwise logs are written to
console
--verbose, -v Use multiple "-v" options
--strict If selected will error out on every exeption Note:
Useful when debugging only [False]
--debug If selected will emit very debugging logs if exception
are encountered. Note: Useful when debugging only
[False]
--scan {auto,new,last}
[NOT IMPLEMENTED] choose the scan type, usually "auto"
is the best. [auto]
--raw [NOT IMPLEMENTED] Use raw output, default is false
--version show program's version number and exit
Motivation
Why no facter in pure Python that outputs in JSON?
Contributors
Email: g@ut.am
More info: https://github.com/hihellobolke/sillyfacter
License
This is Apache Licenced.
Metadata
Release files for sillyfacter 0.3.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| sillyfacter-0.3.2.2.tar.gz | 40.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sillyfacter-0.3.2.2.macosx-10.8-x86_64.exe | Details |
Total release size: 149.2 kB
Release files / sillyfacter-0.3.2.2.tar.gz
| Download URL | sillyfacter-0.3.2.2.tar.gz |
|---|---|
| Size | 40.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ef3ecdf361f60f9d6a76afb68d390fd7d3f9838f888fd68a5677de236ed760f4
|
|
BLAKE2b-256 checksum How to use checksums |
54bc9b3342ddd200ebe56fd3d27901893f575668c0a1e265c1a3333324ca2efc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / sillyfacter-0.3.2.2.macosx-10.8-x86_64.exe
| Download URL | sillyfacter-0.3.2.2.macosx-10.8-x86_64.exe |
|---|---|
| Size | 108.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ce4826c613cf6b5852fc2219e4af76328712cf0f79f9a542b2cd28881c48017f
|
|
BLAKE2b-256 checksum How to use checksums |
52768d07a4204b7127af7bd6fe1783b18f353ea04b5cbaedb5ec6cf985c24b15
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for sillyfacter 0.3.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.