#!/bin/bash
#Please specify your Unique Registration key below, this can be found in the downloads page on the Alert Logic UI.
REGKEY=<Your Unique Registration>
#Controller Host (Optional) If you have set up a NAT, virtual appliance, or physical appliance and you want to specify it as a single point of egress for agents to use. Default is vaporator.alertlogic.com.
HOST=vaporator.alertlogic.com
#Scripted install below this point.
wget https://scc.alertlogic.net/software/al-agent_LATEST_amd64.deb
dpkg -i al-agent_LATEST_amd64.deb
/etc/init.d/al-agent configure --host $HOST
/etc/init.d/al-agent provision --key $REGKEY
/etc/init.d/al-agent start
echo  "*.* @@127.0.0.1:1514 #Forward all logs to the Alert Logic Agent" >> /etc/rsyslog.conf
service rsyslog restart