Closed IzabellaRaulin closed 7 years ago
Fixes https://github.com/intelsdi-x/snap-plugin-collector-disk/issues/12
disk_sda-file.json
disk_sdb-file.json
load snap-plugin-collector-disk:
snaptel plugin load snaptel plugin load ./build/linux/x86_64/snap-plugin-collector-disk
create task manifest with a specified dynamic element (disk), see examples/tasks/:
"version": 1, "schedule": { "type": "simple", "interval": "1s" }, "workflow": { "collect": { "metrics": { "/intel/procfs/disk/sda/*": {} }, "config": { "/intel/procfs/disk": { "proc_path": "/proc" } }, "process": null, "publish": [ { "plugin_name": "file", "config": { "file": "/tmp/published_diskstats_sda.log" } } ] } } }
load a declared publisher: snap-plugin-publisher-file:
snaptel plugin load snaptel plugin load <path-to-snap-plugin-publisher-file>
create a task:
$ snaptel task create -t examples/tasks/disk_sda-file.json
Using task manifest to create task Task created ID: 72166b3e-4236-46ef-89f1-a9088441f113 Name: Task-72166b3e-4236-46ef-89f1-a9088441f113 State: Running
5. watch collected metrics: (notice, that they come only from specified disk `sda`)
$ snaptel task watch 72166b3e-4236-46ef-89f1-a9088441f113
NAMESPACE DATA TIMESTAMP /intel/procfs/disk/sda/io_time 0 2016-12-05 12:44:17.94398502 +0100 CET /intel/procfs/disk/sda/merged_read 0 2016-12-05 12:44:17.94398502 +0100 CET /intel/procfs/disk/sda/merged_write 7.982935636867953 2016-12-05 12:44:17.94398502 +0100 CET /intel/procfs/disk/sda/octets_read 0 2016-12-05 12:44:17.94398502 +0100 CET /intel/procfs/disk/sda/octets_write 57221.68264506949 2016-12-05 12:44:17.94398502 +0100 CET /intel/procfs/disk/sda/ops_read 0 2016-12-05 12:44:17.94398502 +0100 CET /intel/procfs/disk/sda/ops_write 7.982935636867953 2016-12-05 12:44:17.94398502 +0100 CET /intel/procfs/disk/sda/pending_ops 0 2016-12-05 12:44:17.94398502 +0100 CET /intel/procfs/disk/sda/weighted_io_time 0 2016-12-05 12:44:17.94398502 +0100 CET
Fixes https://github.com/intelsdi-x/snap-plugin-collector-disk/issues/12
Summary of changes:
How to verify it:
disk_sda-file.json
ordisk_sdb-file.json
)Example:
load snap-plugin-collector-disk:
create task manifest with a specified dynamic element (disk), see examples/tasks/:
load a declared publisher: snap-plugin-publisher-file:
create a task:
Using task manifest to create task Task created ID: 72166b3e-4236-46ef-89f1-a9088441f113 Name: Task-72166b3e-4236-46ef-89f1-a9088441f113 State: Running
$ snaptel task watch 72166b3e-4236-46ef-89f1-a9088441f113
NAMESPACE DATA TIMESTAMP /intel/procfs/disk/sda/io_time 0 2016-12-05 12:44:17.94398502 +0100 CET /intel/procfs/disk/sda/merged_read 0 2016-12-05 12:44:17.94398502 +0100 CET /intel/procfs/disk/sda/merged_write 7.982935636867953 2016-12-05 12:44:17.94398502 +0100 CET /intel/procfs/disk/sda/octets_read 0 2016-12-05 12:44:17.94398502 +0100 CET /intel/procfs/disk/sda/octets_write 57221.68264506949 2016-12-05 12:44:17.94398502 +0100 CET /intel/procfs/disk/sda/ops_read 0 2016-12-05 12:44:17.94398502 +0100 CET /intel/procfs/disk/sda/ops_write 7.982935636867953 2016-12-05 12:44:17.94398502 +0100 CET /intel/procfs/disk/sda/pending_ops 0 2016-12-05 12:44:17.94398502 +0100 CET /intel/procfs/disk/sda/weighted_io_time 0 2016-12-05 12:44:17.94398502 +0100 CET