What is varnishbeat?
Beat is a elasticsearch beat plugin to ship the varnish shared memory(VSM) to Elasticsearch or Logstash or Apache Kafka or Redis or Local File system.
Reference: https://github.com/phenomenes/varnishbeat
Assumption:
I assume that you already installed varnish-cache and ELK on separate machines.
https://www.varnish-cache.org/docs/5.0/installation/install.html#debian-ubuntu
Install GO 1.6+ on Varnish Cache instance
Follow the instruction as given in my blog post below
https://thangamaniarun.wordpress.com/2017/01/09/how-to-install-go-1-6-on-ubuntu-14-04-onwards/
Install Varnishbeat
Make sure go compiler and go env settings is already in place and git client installed on your varnish system.
# go version
go version go1.6 linux/amd64
#apt-get install -y git
# export | grep GO
declare -x GOPATH=”/root/varnishbeat”
declare -x GOROOT=”/root/go”
Install varnish beat now
# go get github.com/phenomenes/varnishbeat
Run varnishbeat now
# /root/varnishbeat/bin/varnishbeat –help
Usage of /root/varnishbeat/bin/varnishbeat:
-E value
Configuration overwrite (default null)
-N Disable actual publishing for testing
-c path
Configuration file path (default /root/varnishbeat/bin/varnishbeat.yml)
-configtest
Test configuration and exit.
-cpuprofile string
Write cpu profile to file
-d string
Enable certain debug selectors
-e Log to stderr and disable syslog/file output
-httpprof string
Start pprof http server
-memprofile string
Write memory profile to this file
-path.config value
Configuration path
-path.data value
Data path
-path.home value
Home path
-path.logs value
Logs path
-v Log at INFO level
-version
Print the version and exit