Code Monkey home page Code Monkey logo

probes's Introduction

Probes

Overview

Probes is a web application based on Mojolicious (Perl Web Framework) that lets you graph timed data stored inside a PostgreSQL database.

It can generate scripts to collect the activity data on a PostgreSQL machine (SQL, sysstat), the tarball can then be uploaded to the web UI, to display the data as graphs.

The purpose of Probes is to have a set of predefined data gathering commands (e.g. probes) and graphs to quickly show the activity on the studied server.

Prerequisites

The versions showed have been tested, it may work with older versions

  • Perl 5.10
  • Mojolicious 2.98
  • PostgreSQL 9.0
  • A CGI/Perl webserver

Install

A PostgreSQL database with a non superuser with the ability to create new schemas is required. So, first create a database and a user, set things up to allow the connection from the webserver with this user to the db.

Then run sql/probes_init.sql script on the db to create tables and other stuff.

Install other prerequisites: Mojolicious is available on CPAN and sometimes packages, for example the package in Debian is libmojolicious-perl

Copy probes.conf-dist to probes.conf and edit it.

To quickly run the UI, do not activate rewrite in the config (this is Apache rewrite rules when run as a CGI) and start the morbo webserver inside the source directory:

morbo script/probes

It will output what is printed to STDOUT/STDOUT in the code in the term. The web pages are available on http://localhost:3000/

To run the UI with Apache, here is an example using CGI:

<VirtualHost *:80>
	ServerAdmin [email protected]
	ServerName probes.example.com
	DocumentRoot /var/www/probes/public/

	<Directory /var/www/probes/public/>
		AllowOverride None
		Order allow,deny
		allow from all
		IndexIgnore *

		RewriteEngine On
		RewriteBase /
		RewriteRule ^$ probes.cgi [L]
		RewriteCond %{REQUEST_FILENAME} !-f
		RewriteCond %{REQUEST_FILENAME} !-d
		RewriteRule ^(.*)$ probes.cgi/$1 [L]
	</Directory>

	ScriptAlias /probes.cgi /var/www/probe/script/probes
	<Directory /var/www/probes/script/>
		AddHandler cgi-script .cgi
		Options +ExecCGI
		AllowOverride None
		Order allow,deny
		allow from all
		SetEnv MOJO_MODE production
		SetEnv MOJO_MAX_MESSAGE_SIZE 4294967296
	</Directory>

	ErrorLog ${APACHE_LOG_DIR}/probes_error.log
	# Possible values include: debug, info, notice, warn, error, crit,
	# alert, emerg.
	LogLevel warn

	CustomLog ${APACHE_LOG_DIR}/probes_access.log combined
</VirtualHost>

probes's People

Contributors

david-barbion avatar orgrim 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.