the name of the file is the actual graphite path where the values will be saved. If the returned value is json, it will create a structure inside the name of the file with the json keys
For example in graphite you will have the following entries for home.apps.sickrage:
You will need a running carbon (graphite) server to wich you will feed the data
install from pip configparser and graphitesend
copy stats.d.examples to stats.d
copy config.ini.example to config.ini
adjust values in config.ini as per your needs
run ./statsfeeder.py
Running as a daemon
You can use the example supervisord script located in helpers. Just make sure to change the paths.
Using screen
screen -dm - S statsfeeder /root/statsfeeder/statsfeeder.py
Running in Docker
There is a docker build available. You will need to map a volume onto /config path
docker run -v ~/statsfeeder-config:/config mboeru/statsfeeder
First run will automatically the exmaple config and stats.d dir. You will need to change them and restart the container.
You can also override config variables with env variables, for example add the docker run command -e "GRAPHITE_HOST=192.168.1.10"
Other Variables:
GRAPHITE_HOST
GRAPHITE_PORT
FREQ
STATSDIR
ENV
Dynamically adding or removing modules
Every time it runs, statsfeeder checks the modules directory for new files. If there are new files with +x it will execute them. If an existing module is disabled by removing the execute attibute, that stat will no longer be collected. These things happen without the need to restart statsfeeder.
Future
add some builtin modules like URL fetching, weather module and others
About
simple, modular python app to send different values into Graphite