Install Sidecar on Linux
In order to install Graylog Sidecar, there are a few preparatory steps that should be taken both in Graylog and on the host machine. Please note the following guide describes a self-managed Graylog Sidecar configuration. For information on using Sidecar in Graylog Cloud, please see Sidecar in the Cloud.
Installation Steps in Graylog
Prerequisites
Before installing Sidecar, make sure that you have a Beats input in order to receive data from the Beats collector, and configure your input to receive Sidecar logs on port 5044
.
- Navigate to System > Inputs.
- Select Beats as the input.
- Click Launch new input to prompt a new form.
- Check the Global box if you would like to receive the data set among other nodes.
- Make sure that the port field is set to
5044
.
Create an API Token
- Navigate to System > Sidecars.
- Click on Create or reuse a token for the graylog-Sidecar user.
- Enter a name into the Token Name field.
- Click on Create Token.
Download Sidecar
You can find .deb
and .rpm
packages in our package repository. Please follow the version matrix to select the correct package and download it from our GitHub page.
Sidecar Version | Graylog Server Version |
---|---|
1.5.x | 5.2.x or higher |
1.4.x |
5.0.x or higher |
1.3.x | 5.0.x |
1.2.x | 3.2.5 or higher |
1.1.x | 3.2.5 or higher |
Installation Steps on the Host Machine
1. Install the Graylog Sidecar repository configuration and Graylog Sidecar itself with the following commands:
wget https://packages.graylog2.org/repo/packages/graylog-sidecar-repository_1-5_all.deb
sudo dpkg -i graylog-sidecar-repository_1-5_all.deb
sudo apt-get update
sudo apt-get install graylog-sidecar
2. Edit the configuration file and activate Sidecar as a system service. Please note that most configuration parameters come with built-in defaults. The only parameters whose values need to be configured manually are server_url
and server_api_token
.
sudo vi /etc/graylog/sidecar/sidecar.yml
sudo graylog-sidecar -service install
# Ubuntu 14.04 with Upstart
sudo start graylog-sidecar
# Ubuntu 16.04 and later with systemd
sudo systemctl enable graylog-sidecar
sudo systemctl start graylog-sidecar
1. Install the Graylog Sidecar repository configuration and Graylog Sidecar itself with the following commands:
sudo rpm -Uvh https://packages.graylog2.org/repo/packages/graylog-sidecar-repository-1-5.noarch.rpm
sudo yum install graylog-sidecar
2. Edit the configuration and activate sidecar as a system service. Please note that most configuration parameters come with built-in defaults. The only parameters whose values need to be configured manually are server_url
and server_api_token
.
vi /etc/graylog/sidecar/sidecar.yml
sudo graylog-sidecar -service install
sudo systemctl enable graylog-sidecar
sudo systemctl start graylog-sidecar
1. Install the Graylog Sidecar repository configuration and Graylog Sidecar itself with the following commands:
sudo rpm -Uvh https://packages.graylog2.org/repo/packages/graylog-sidecar-repository-1-5.noarch.rpm
sudo mv /etc/yum.repos.d/* /etc/zypp/repos.d/
sudo zypper up
sudo zypper install graylog-sidecar
Continue? y
Do you want to reject the key, or trust always? [r/a/?] (r): a
2. Edit the configuration and activate the sidecar as a system service. Please note that most configuration parameters come with built-in defaults. The only parameters whose values need to be configured manually are server_url
and server_api_token
.
sudo vi /etc/graylog/sidecar/sidecar.yml
sudo graylog-sidecar -service install
sudo systemctl enable graylog-sidecar
sudo systemctl start graylog-sidecar
Now that your Sidecar installation is complete, we recommend you proceed to Install Sidecar Collectors.
sidecar.yml Configuration Reference
Below is a list of parameters used in the sidecar.yml
configuration file for your reference:
Parameter |
Description |
---|---|
|
URL to the Graylog API, e.g.: |
server_api_token
|
The API token to use to authenticate against the Graylog server API. |
node_id
|
The node ID of the sidecar. This can be a path to a file or an ID string. |
node_name
|
Name of the Sidecar instance, will also show up in the web interface. |
update_interval
|
The interval where the sidecar will fetch new configurations from the Graylog server in seconds The Graylog server considers all sidecars that frequently perform these updates "active". In order to globally configure a threshold which determines when a sidecar should be considered "inactive," please navigate to "Sidecars System" under the System/Configuration menu. |
tls_skip_verify
|
This configures if the sidecar should skip the verification of TLS connections. Default: false |
send_status
|
This controls the transmission of detailed sidecar information like collector status, |
list_log_files
|
Send a directory listing to Graylog and display it on the host status page, |
cache_path
|
The directory where the sidecar stores internal data. Default: |
|
The directory where the sidecar generates configurations for collectors. |
|
The directory where the sidecar stores its logs. Default: |
|
The maximum size of the log file before it gets rotated. Default: |
|
The maximum number of old log files to retain. |
|
A list of binaries that are allowed to be executed by the Sidecar. |
tags
|
List of configuration tags. All configurations on the server side that match the tag list will be fetched and merged by this instance. |