Web Driver Installation
Overview
The database supports two types of web drivers: PhantomJS and Chrome. Web driver is a programmable browser that allows emulating user actions and capturing web pages as if there are displayed to a real user.
Linux Container
If you are installing the web driver in a Linux container, log in as root
and install wget
prior to switching to the axibase
user.
docker exec -it -u root atsd bash
apt-get update && apt-get install wget
su axibase
Option 1: PhantomJS
- Download and install PhantomJS
cd /home/axibase
wget https://axibase.com/public/phantomjs-2.1.1-linux-x86_64.tar.gz
tar xzf phantomjs-2.1.1-linux-x86_64.tar.gz
- Ensure that
axibase
user is allowed to execute the binary
ls -all /home/axibase | grep phantomjs-2.1.1-linux-x86_64
drwxr-xr-x 4 axibase axibase 4096 Jan 25 2016 phantomjs-2.1.1-linux-x86_64
Set path to
/home/axibase/phantomjs-2.1.1-linux-x86_64/bin/phantomjs
in Settings > Server Propertieswebdriver.phantomjs.path
.
Option 2: Chrome Driver
- Install Chrome from Google Linux Repositories.
Ubuntu:
sudo apt-get update && sudo apt-get install wget
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
sudo apt-get install -f --no-install-recommends
RedHat, CentOS:
wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
sudo yum install ./google-chrome-stable_current_*.rpm
- Install
chromedriver
Ubuntu:
sudo apt-get install unzip
wget https://chromedriver.storage.googleapis.com/2.33/chromedriver_linux64.zip
unzip chromedriver_linux64.zip
sudo mv chromedriver /usr/bin/chromedriver
RedHat, CentOS:
sudo yum install unzip
wget https://chromedriver.storage.googleapis.com/2.33/chromedriver_linux64.zip
unzip chromedriver_linux64.zip
sudo mv chromedriver /usr/bin/chromedriver
Set path to
/usr/bin/chromedriver
and/usr/bin/google-chrome-stable
in Settings > Server Propertieswebdriver.chromedriver.path
andwebdriver.chromebrowser.path
.
Test Web Driver
Review web driver settings on the Settings > System Information page. Verify that no error is displayed.
Open the Alerts > Outgoing Webhooks page.
Create an outgoing webhook that supports sending screenshots such as Telegram or Slack. Verify that a screenshot is successfully delivered to the chat client.
Alternatively, enable the Mail Client.
Create a sample rule in the Rule Engine and attach a portal on the Email tab. Verify that the delivered email message contains the portal screenshot.