Skip to content
Stupid Simple Server Monitor.
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app Allowed to create a trigger for all server at the same time. Removed … Apr 13, 2019
bin Primeiro commit Mar 27, 2019
config Allowed to create a trigger for all server at the same time. Removed … Apr 13, 2019
log Primeiro commit Mar 27, 2019
migrations
vendor/assets
.gitignore FIX: Some cleanup and moving js and css files Apr 3, 2019
.ruby-gemset FIX: Some cleanup and moving js and css files Apr 3, 2019
.ruby-version Primeiro commit Mar 27, 2019
Gemfile Triggers notifications for events. Applied btn-sm for all btn. Remove… Apr 9, 2019
Gemfile.lock Updated logo, home page with new content and some other layout adjust… Apr 12, 2019
README.md Updated setup instructions Apr 9, 2019
Rakefile Primeiro commit Mar 27, 2019
backup MongoDB data replication for faster queries Apr 7, 2019
config.ru Primeiro commit Mar 27, 2019
deploy

README.md

SSSM - Stupid Simple Server Monitor

Requirements

  • MongoDB v3.4
  • Ruby 2.5.3
  • Rails 5.2.2 or above
  • NGINX (production)

Development

Install mongodb (e.g for Ubuntu sudo apt-get install -y mongodb)

Clone the repository and install dependencies running bundle install.

Start the server running rails server.

Go to http://localhost:3000.

Production

Clone the repository at /srv/ and install dependencies running bundle install.

Generate a Rails Secret running rake secret.

nano config/secrets.yml
production:
  secret_key_base: '[RAILS_SECRET_KEY]'

Setup NGINX:

# Debian
sudo nano /etc/nginx/sites-enabled/sssm
# Red Hat
sudo nano /etc/nginx/conf.d/sssm.conf
server {
	listen 80;
	server_name sssm.ml;

	root /srv/sssm/public/;
	try_files $uri @puma;

	location @puma {
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
		proxy_set_header Host $host;
		proxy_set_header X-Forwarded-Proto $scheme;
		proxy_redirect off;
		proxy_pass http://unix:/srv/sssm/tmp/puma.sock;
	}

	keepalive_timeout 10;
}
sudo systemctl restart nginx

Setup systemd:

rvm wrapper show bundle
sudo nano /etc/systemd/system/sssm.service
[Unit]
After=network.target

[Service]
Type=forking
User=deploy
WorkingDirectory=/srv/sssm/
ExecStart=/home/deploy/.rvm/gems/ruby-2.5.3@sssm/wrappers/bundle exec puma -C config/puma_production.rb --daemon
ExecStop=/home/deploy/.rvm/gems/ruby-2.5.3@sssm/wrappers/bundle exec pumactl -S tmp/puma.state stop
PIDFile=/srv/sssm/tmp/puma.pid
Restart=always

[Install]
WantedBy=multi-user.target
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable sssm
sudo systemctl start sssm

Go to your NGINX domain.

You can’t perform that action at this time.