curl -L https://raw.githubusercontent.com/juicedata/p8s_to_openfalcon/master/p8s_to_openfalcon.py
chmod +x p8s_to_openfalcon.py
usage: ./p8s_to_openfalcon.py [-h] [--falcon_push_api FALCON_PUSH_API]
[--endpoint ENDPOINT] [--output_only] [--loop]
source_url step
FALCON_PUSH_API : The push api for metrics, required when --output_only
is not specified
ENDPOINT : endpoint
field in open-falcon metric , such as $HOSTNAME
, default is test
--output_only : Output the transformed metrics to stdout instand of pushing to open-falcon
--loop : Support periodically sync metrics when the source_url is a http[s] endpoint
source_url : Required. P8S metric endpoint. When -
is provided, metrics are fetched from stdin
step : Required. step
field in open-falcon metric
Check the parsed samples without actually pushing to an open-falcon API
./p8s_to_openfalcon.py https://juicefs.com/console/vol/< filesystem> /metrics? token=< token> 10 --output_only
Sync the metrics from command's stdout
./collect_command | ./p8s_to_openfalcon.py - 30 --endpoint=$HOSTNAME --falcon_push_api < your_openfalcon_host> /v1/push
Sync the metrics periodically to an open-falcon API
./p8s_to_openfalcon.py https://juicefs.com/console/vol/< filesystem> /metrics? token=< token> 10 --falcon_push_api < your_openfalcon_host> /v1/push --loop
./p8s_to_openfalcon.py https://juicefs.com/console/vol/< filesystem> /metrics? token=< token> 10 --falcon_push_api < your_openfalcon_host> /v1/push