Skip to content
This repository has been archived by the owner on Dec 7, 2020. It is now read-only.

Latest commit

 

History

History
89 lines (67 loc) · 3.32 KB

README.md

File metadata and controls

89 lines (67 loc) · 3.32 KB

Zabbix Screens Generator

This project is no longer maintained

Maintainability Test Coverage

Web application for creating screens per host with all its graphs

Table of contents

Deployed on Heroku

https://zsg.herokuapp.com

With this instance on Heroku you can create screens if your Zabbix server is accessible from the Internet.

The app is deployed on a free dyno. Free dynos will sleep after a half hour of inactivity. This causes a delay of a few seconds for the first request upon waking. Subsequent requests will perform much faster

Installation

Manual from Github

Assuming that you have already installed Git, Ruby, NodeJS

git clone https://github.com/d-vandyshev/zabbix-screens-generator
cd zabbix-screens-generator
bundle install
rails server

That runs a local webserver. On a local machine, paste the URL http://localhost:3000 into the address bar of your browser.

Docker

  1. Run automated build from Docker Hub:
    docker run -p3000:3000 dmitvan/zabbix-screens-generator
    
  2. Open URL http://localhost:3000 in your favorite browser

Usage

  1. Open URL http://localhost:3000 and enter Zabbix credentials Zabbix Screen Generator - Login page
  2. Select Host group Zabbix Screen Generator - Select Hostgroup page
  3. Select the hosts for which you want to create screens Zabbix Screen Generator - Select Hosts page
  4. Page with statuses Zabbix Screen Generator - Select Hosts page

Application stack

Function Component
Web framework Ruby on Rails 5
Design Froala blocks
CSS framework Bootstrap 4
JS Framework Stimulus
Icons SVG evil_icons
Test Framework Minitest

Security

  • Place for Zabbix credentials (server, username, password): not stored
  • Place for Zabbix instance: save in memory (Rails.cache) of the server for current session

Development workflow

  1. Change the code
  2. Check the app in production environment
RAILS_ENV=production SECRET_KEY_BASE=$(rails secret) RAILS_SERVE_STATIC_FILES=yes RAILS_LOG_TO_STDOUT=yes rails server
  1. Generate new assets
RAILS_ENV=production bundle exec rails assets:precompile
  1. Remove old JS/CSS-files
  2. Commit & push new generated assets