Wednesday, 21 December 2016

Static addresses with Graylog

Graylog is a great tool for storing your syslog data.
Even better, they provide a virtual appliance to simplify downloading.
Probably the first thing you will want to do is give it a static IP address (as most network devices don't allow you to use a name as a syslog destination).

So first log on to the console and:
vim /etc/network/interfaces

change 

iface eth0 inet dhcp

to

iface eth0 inet static
    address 10.0.0.41
    netmask 255.255.255.0
    network 10.0.0.0
    broadcast 10.0.0.255
    gateway 10.0.0.1
    dns-nameservers 10.0.0.1 8.8.8.8
    dns-domain acme.com
    dns-search acme.com

Using your IP addresses obviously!

exit, and run:

ifdown eth0
ifup eth0

to restart networking with the new settings.

Now you need to tell graylog that things have changed, so just run 

sudo graylog-ctl reconfigure

This will go through all the settings and ensure it works with the new IP address