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 istest
- --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
./p8s_to_openfalcon.py https://juicefs.com/console/vol/<filesystem>/metrics?token=<token> 10 --output_only
./collect_command | ./p8s_to_openfalcon.py - 30 --endpoint=$HOSTNAME --falcon_push_api <your_openfalcon_host>/v1/push
./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