GithubHelp home page GithubHelp logo

mrhkyn / dockerized-openstack-elk-monitoring Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 206 KB

This project aims to provide a single file which constructs and created multiple container required for monitoring openstack infrastructure in terms of the server performance and network traffic in a tenant specific way.

License: GNU General Public License v3.0

Dockerfile 14.95% Python 85.05%
elk-stack docker-compose monitoring docker openstack ceilometer telemetry

dockerized-openstack-elk-monitoring's Introduction

Multi-Container Application for ELK Stack

This is a project for monitoring the performance of servers and network traffic using ELK (ElasticSearch, LogStash and Kibana) as well as grafana and a single file was created for creating multi-container application (docker-compose). Thus, using a single file makes possible to create a full-deployed stack required by OpenStack monitoring solution. It has two main part to be monitored in openstack such as the server performance where its samples were produced by ceilometer and network flow where its samples were produced by softflowd.

alt text

P.S. While exporting traffic via softflowd, we might need to use v1.0 rather than 0.9 because the tool does not capable of exporting vlan traffic to logstash properly. This is important especiallay for exporting the netflow obtained for internal traffic such a from br-eth interface.

Multi-container for an application - docker-compose.yaml

The volumes and network were seperated because make any change on the configuration files can be easy without modifying the compose files and adding/removing another container can be applied properly by adding just another ip address.

We have deployed 6 containers on a single computer which has 48 cores and 128 GB RAM. Furthermore, 2 additional containers were also deployed running a self-developed python code regulary. It is not possible to monitor a tenant network traffic since ceilometer does not provide the information. On the other hand, sotfflowd can capture the network traffic based on the ip adressed. However, we need to visualize the network traffic for each tenant separately. (floating ip and router gw interface belong to specific tenant). Mapping container was simply constructed (Dockerfile) because of this purpose.

The list of docker application and their properties were listed below.

alt text

The list of containers

  • logstash

    • IP: 172.26.36.4
    • It has 3 main volumes for their own basic requirements such as storing the data and configuration files. (logstash-data, logstash-config, logstash-pipe) Furthermore, it has 2 additional volumes (mapping-res, mappingprod-res) for indexing the entries. Actually, these are the files which were generated by containers (mapping, mappingprod)
    • The java was set to 16G memory. Otherwise, it was crushed because of insufficient memory.
  • elasticsearch

    • IP: 172.26.36.2, 172.26.36.3 and 172.26.36.7
    • The cluster has 3 containers. Even all of them are located on the same host, it would be separated over the multiple host in order to get high availability.
    • It has 2 main volumes for storing data and its configuration.
    • The logstash ip and memory size for java was set properly
  • kibana

    • IP: 172.26.36.5
    • The elasticsearch ip was set in order to visualize their data.
  • grafana

    • IP: 172.26.36.6
    • The elasticsearch ip was not initialized because the configuration is applied on the web application. However, the username and password were set here.
  • mapping and mappingprod

    • IP: 172.26.36.10, 172.26.36.11
    • These are ubuntu containers which runs regularly self-developed python codes in order to index the entries in a proper format using the translate functionality of the logstash. There are number of ip addresses which belong to same tenant so that these ip addresses were accumulated under a single title and indexed properly. The xml files were generated and updated for each hour. The file were used by logstash because the volume were attached these both containers.
    • The name of the executable python as well as the output files were set here.

Network setup

The physical host has a management interface with 172.26.0.0/16 subnet. The interface were configured in order to communicate with all other servers in the same subnet. First, the interface was set to promisc mode and a new docker network was created as following. Than, the interface was added into the created docker bridge.

  • The management interface (ip: 172.26.2.109) of the physical host was set to promisc mode
 auto eno1
 iface eno1 inet manual
      up ifconfig $IFACE 0.0.0.0 up
      up ip link set $IFACE promisc on
      down ip link set $IFACE promisc off
      down ifconfig $IFACE down 
  • 172.26.36.0/24 subnet was properly created
 docker network create --driver=bridge --subnet=172.26.0.0/16 --gateway=172.26.2.109 --ip-range=172.16.36.0/24  br-elk 
  • eno1 interface was added into the bridge
 brctl show
 bridge name    bridge id        STP enabled    interfaces
 br-9949d68762cf        8000.0242d463be6a    no        eno1
                            veth79b71fe
 docker0        8000.02429e179696    no
  • Thus, br-elk network was created where a new container get IP address as following.
 docker run -it --network=br-elk  ubuntu /bin/bash 
  • Finally, a new router was created on the physical host in oder to allow containers communicate the outside.
 route add default gw 172.26.0.1 

As a result, the management ip address of the host was set to gateway of the docker network and the created containers can have access to reach outside.

dockerized-openstack-elk-monitoring's People

Contributors

mrhkyn avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.