Ignore:
Timestamp:
Jun 26, 2018, 6:54:14 PM (6 years ago)
Author:
g7moreau
Message:
  • Add a lot of doc !
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/nagios-velvice/velvice.cgi

    r264 r265  
    1515use strict;
    1616use warnings;
    17 use version; our $VERSION = version->declare('0.7.2');
     17use version; our $VERSION = version->declare('0.7.3');
    1818
    1919use CGI;
     
    304304velvice.cgi - nagios velvice alert panel
    305305
     306=head1 USAGE
     307
     308 velvice.cgi
     309 velvice.cgi?check=XXX
     310
    306311
    307312=head1 DESCRIPTION
    308313
    309314Nagios VELVICE is an acronym for "Nagios leVEL serVICE status".
    310 Homepage: http://servforge.legi.grenoble-inp.fr/projects/soft-trokata/wiki/SoftWare/NagiosVelvice
    311 
    312 =head1 AUTHORS
    313 
    314 Written by Gabriel Moreau - Grenoble - France
     315
     316The Nagios web page is sometimes very graphically charged
     317and does not necessarily contain the information you need at a glance.
     318For example, it is quite complicated to restart controls on multiple hosts in one click.
     319
     320For example, a server that is down should take only one line and not one per service...
     321Similarly, a service that has been down for 5 minutes or since yesterday
     322has more weight than a service that has fallen for 15 days.
     323
     324With Velvice Panel, a broken down server takes only one line.
     325Services that have been falling for a long time gradually lose their color and become pastel colors.
     326
     327With Velvice Panel, it is possible through a single click
     328to redo a check of all services that are in the CRITICAL state.
     329Similarly, it is possible to restart a check on all SSH services in breakdowns ...
     330In order not to clog the Nagios server, checks are shifted by 2 seconds in time.
     331
     332There is also a link to the web page of the main Nagios server.
     333For each computer, you have a direct link to its dedicated web page on this server.
     334
     335
     336=head1 CONFIGURATION FILE SPECIFICATION
     337
     338The configuration file must be F</etc/nagios3/velvice.yml>.
     339This is not a required file.
     340The file is in YAML format because this is a human-readable text file style.
     341Other formats could have been Plain XML, RDF, JSON... but they are much less readable.
     342
     343You can find in the software nagios-velvice an example of configuration:
     344L<velvice.sample.yml|http://servforge.legi.grenoble-inp.fr/pub/soft-trokata/nagios-velvice/velvice.sample.yml>.
     345This one is in fact the master reference specification!
     346
     347The main keys C<nagios-server> and C<color-downtime> have good default values.
     348No secondary key is required...
     349
     350With key C<host-mapping>,
     351it's good to map C<localhost> to the real name of the computer (hostname).
     352
     353The only important key is C<remote-action>.
     354You can affiliate as many subkeys as you want.
     355Let's take an example:
     356
     357 remote-action:
     358   oom-killer:
     359     regex: ^OOM Killer
     360     title:  OOM Killer
     361     command:     tssh -c 'sudo rm /var/lib/nagios3/nagios_oom_killer.log' %m
     362     command-one: ssh %m 'sudo rm /var/lib/nagios3/nagios_oom_killer.log'
     363     depend: ^SSH
     364     status: ALL
     365     style: bold
     366
     367C<oom-killer> is just a key for your remote action.
     368The regex is used to find which service has a problem...
     369The title is use in the result web page (not mandatory - otherwise, it will be C<Action: oom-killer>).
     370The C<command> is just written on this web page.
     371You have the responsibility to copy / cut it on a terminal.
     372For security reasons, the nagios server does not have the right to launch the command on the remote host.
     373The wildcard C<%m> is replaced by the list of the host (separated by the space).
     374Sometime, the command could be different if there is only one computer (just SSH and no parallel SSH).
     375If your command is based on SSH,
     376you can have an SSH action only if the remote SSH is running.
     377So you can make the remote action depend on the SSH service through a regular expression of your choice.
     378
     379The last two keys.
     380The C<status> key is for CRITICAL or WARNING (or ALL).
     381The key C<style> is there to mark in bold the service in error on the web page.
     382
     383=head1 SEE ALSO
     384
     385yamllint(1), ysh(1), YAML, Nagios::StatusLog, Color::Calc
     386
     387In Debian GNU/Linux distribution, packages for C<yamllint> and C<ysh> are:
     388
     389=over
     390
     391=item * C<yamllint> - Linter for YAML files (Python)
     392
     393=item * C<libyaml-shell-perl> - YAML test shell (Perl)
     394
     395=back
     396
     397
     398Own project ressources:
     399
     400=over
     401
     402=item * L<Web site|http://servforge.legi.grenoble-inp.fr/projects/soft-trokata/wiki/SoftWare/NagiosVelvice>
     403
     404=item * L<Online Manual|http://servforge.legi.grenoble-inp.fr/pub/soft-trokata/nagios-velvice/velvice.html>
     405
     406=item * L<SVN repository|http://servforge.legi.grenoble-inp.fr/svn/soft-trokata/trunk/nagios-velvice>
     407
     408=back
     409
     410
     411=head1 VERSION
     412
     413$Id: klask 397 2018-02-28 18:53:47Z g7moreau $
     414
     415
     416=head1 AUTHOR
     417
     418Written by Gabriel Moreau <Gabriel.Moreau(A)univ-grenoble-alpes.fr>, LEGI UMR 5519, CNRS, Grenoble - France
    315419
    316420
     
    319423Licence GNU GPL version 2 or later and Perl equivalent
    320424
    321 Copyright (C) 2014-2018 Gabriel Moreau <Gabriel.Moreau(A)univ-grenoble-alpes.fr>.
     425Copyright (C) 2014-2018, LEGI UMR 5519 / CNRS UGA G-INP, Grenoble, France
Note: See TracChangeset for help on using the changeset viewer.