- Add a new task first. (more task configuration, see here)
curl -XPOST http://127.0.0.1:7117/peck_task/add -d {
"Name":"SystemLog",
"LogPath":"/var/log/syslog",
"ESConfig":{
"Hosts":["127.0.0.1:9200"],
"Index":"syslog",
"Type":"raw"
}
}
- Start task.
curl -XPOST http://127.0.0.1:7117/peck_task/start -d {
"Name":"SystemLog"
}
- Stop task
curl -XPOST http://127.0.0.1:7117/peck_task/stop -d {
"Name":"SystemLog"
}
- Remove task
curl -XPOST http://127.0.0.1:7117/peck_task/remove -d {
"Name":"SystemLog"
}
- List tasks
curl -XPOST http://127.0.0.1:7117/peck_task/list
- List task stats
curl -XPOST http://127.0.0.1:7117/peck_task/liststats