Skip to content

Latest commit

 

History

History
51 lines (39 loc) · 767 Bytes

restful.md

File metadata and controls

51 lines (39 loc) · 767 Bytes

Logpeck RESTful API

  1. 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"
	}
}
  1. Start task.
curl -XPOST http://127.0.0.1:7117/peck_task/start -d {
  	"Name":"SystemLog"
}
  1. Stop task
curl -XPOST http://127.0.0.1:7117/peck_task/stop -d {
  	"Name":"SystemLog"
}
  1. Remove task
curl -XPOST http://127.0.0.1:7117/peck_task/remove -d {
  	"Name":"SystemLog"
}
  1. List tasks
curl -XPOST http://127.0.0.1:7117/peck_task/list
  1. List task stats
curl -XPOST http://127.0.0.1:7117/peck_task/liststats