- Support plain text and json format log.
- Full control with HTTP API.
- Add/Remove/Start/Stop collection task freely.
- Cooperate with ElasticSearch/Kibana deeply.
- Collection speed control.
- Get collection status freely.
- Web show/control conveniently(logpeck-web).
go build cmd/logpeckd/logpeckd.go
Logpeck will post log data into an elasticsearch service, so there should be an elasticsearch service first. See here for more information.
./logpeckd -config logpeckd.conf
We can also use supervisor
or other service management software to manage logpeck process.
- Add a new task first.
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"
}
}
Add Success
- Start peck task.
curl -XPOST http://127.0.0.1:7117/peck_task/start -d {
"Name":"SystemLog"
}
Start Success
- Stop peck task
curl -XPOST http://127.0.0.1:7117/peck_task/stop -d {
"Name":"SystemLog"
}
- Remove peck task
curl -XPOST http://127.0.0.1:7117/peck_task/remove -d {
"Name":"SystemLog"
}
- List peck tasks
curl -XPOST http://127.0.0.1:7117/peck_task/list