This repository contains a Vagrantfile for a client/server scenario leveraging Graylog and Grafana. It is designed as an example lab for checking-out system logging and visualization.
Make sure to install the following tools:
This scenario consists of two VMs based on Debian Stretch 9.x:
- Graylog server
- running Graylog
- running MongoDB
- running Elasticsearch 6.x
- Client system
- running Apache2
- configured to forward all syslog data to Graylog server
- configured with dummy website and posting custom logging via GELF to Graylog
Simply clone this repository or unzip the archive, open a terminal and move to the folder before entering the following command:
$ vagrant up
Afterwards, you can access the following URLs:
| URL | Description |
|---|---|
| http://localhost:9000 | Graylog interface on graylog |
| http://localhost:3000 | Grafana interface on graylog |
| http://localhost:8080 | Apache2 web server on client |
For Graylog, the default password assigned via Vagrant is test123, the Grafana default credentials are admin / admin.
The next steps include:
- Configure a Syslog TCP input
- Configure a GELF UDP input
- Login into Grafana and create an Elasticsearch data source
- Create a Grafana dashboard
To do this, proceed with the following:
- Login into Graylog via http://localhost:9000
- Click
System>Inputs - Select
Syslog TCPfrom the dropdown menu and clickLaunch new Input - In the form, select the
graylognode and enter port1514 - Click
SaveandStart Input - Click
System>Inputs - Select
GELF UDPfrom the dropdown menu and clickLaunch new Input - In the form, select the
graylognode and enter port12201 - Click
SaveandStart Input - Login into Grafana via http://loacalhost:3000
- Click
Skipor change the administrator password - Select
Elasticsearchfrom the source type - In the form, enter the following:
- URL:
http://localhost:9200 - Index name:
graylog_0 - Time field name:
timestamp - Version:
6+
- Click
Save & Test - Import the dashboard by clicking
Dashboard>Manage>Import>Upload .json file - Click
Import
To fill the Graylog and Grafana with senseful data, start some web server requests, e.g.:
$ while true; do curl http://localhost:8080; done
Check-out the Graylog inputs and Grafana dashboard!

