Skyline installation on CentOS 7








Need to install Skyline on CentOS 7? This article will show you exactly how to go about it.




As part of our Server Support Services here at Ibmi Media, We regularly help our customers to do CentOS related installations.

In this context, we shall take you through the process of installing  Skyline on CentOS 7.

More about Skyline in Linux?

Skyline is a great anomaly detection system that monitors hundreds of thousands of metrics in real time. It is flexible in that it allows you to set your own algorithms for anomaly detection.

Skyline is made of 3 components outlined below;

i. Webapp - This helps to display the abnormal metrics via a small application.
ii. Horizon Agent - By means of inbuilt Listeners, it helps to collect data by listening to incoming data.
iii. Analyzer Agent - It helps to analyze the data collected which is written to a specified file. The file contains all the abnormal metrics.

How to install skyline on CentOS 7?

To get skyline installed on CentOS 7, follow the steps below;

1. To begin, Ensure that Apache web server is installed as well as some prerequisite Python packages such as python-pi. You can use the command below;

sudo yum install httpd gcc gcc-c++ git pycairo mod_wsgi python-pip python-devel blas-devel lapack-devel libffi-devel


2. Next, download the latest release of Skyline which is available on GitHub. Use the command below;

cd /opt
sudo git clone https://github.com/etsy/skyline.git


3. Now, you can install the Python packages as recommended above with the commands below;

cd /opt/skyline
sudo pip install -U six
sudo pip install -r requirements.txt


4. To complete the Python packages installation, ensure that you install with the commands in the order specified below;

sudo pip install numpy
sudo pip install scipy
sudo pip install pandas
sudo pip install patsy
sudo pip install statsmodels
sudo pip install msgpack-python


5. By default, Skyline default settings will be saved to a file at the location, /opt/skyline/src/settings.py.example. Here, create a new file and copy the contents from the settings.py.example file to a new file in the same folder named "settings.py". Use the command below;

sudo cp /opt/skyline/src/settings.py.example /opt/skyline/src/settings.py


6. Now, create the following directories as stated below with the commands;

sudo mkdir /var/log/skyline
sudo mkdir /var/run/skyline
sudo mkdir /var/log/redis
sudo mkdir /var/dump/


7. To efficiently store metrics, Redis database is very important. So install Redis with the command below;

sudo yum install redis


8. Now you can start the Redis and Skyline Services with the following commands;

cd /opt/skyline/bin
sudo redis-server redis.conf
sudo ./horizon.d start
sudo ./analyzer.d start
sudo ./webapp.d start


9. Once started, you can test them by running the command below;

python /opt/skyline/utils/seed_data.py


If everything is fine, you will get an output as shown below;

Loading data over UDP via Horizon...
Connecting to Redis...
Congratulations! The data made it in. The Horizon pipeline seems to be working.


Need support in fixing CentOS issues? We are available to help you.



Conclusion

The right steps to install Skyline and Redis databases.


For Linux Tutorials

We create Linux HowTos and Tutorials for Sys Admins. Visit us on LinuxAPT.com

Also for Tech related tips, Visit forum.outsourcepath.com or General Technical tips on www.outsourcepath.com