Changeset 265

Jun 26, 2018, 6:54:14 PM (2 years ago)
  • Add a lot of doc !
1 edited


  • 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');
    1919use CGI;
    304304velvice.cgi - nagios velvice alert panel
     306=head1 USAGE
     308 velvice.cgi
     309 velvice.cgi?check=XXX
    307312=head1 DESCRIPTION
    309314Nagios VELVICE is an acronym for "Nagios leVEL serVICE status".
    310 Homepage:
    312 =head1 AUTHORS
    314 Written by Gabriel Moreau - Grenoble - France
     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.
     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.
     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.
     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.
     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.
     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.
     343You can find in the software nagios-velvice an example of configuration:
     345This one is in fact the master reference specification!
     347The main keys C<nagios-server> and C<color-downtime> have good default values.
     348No secondary key is required...
     350With key C<host-mapping>,
     351it's good to map C<localhost> to the real name of the computer (hostname).
     353The only important key is C<remote-action>.
     354You can affiliate as many subkeys as you want.
     355Let's take an example:
     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
     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.
     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.
     383=head1 SEE ALSO
     385yamllint(1), ysh(1), YAML, Nagios::StatusLog, Color::Calc
     387In Debian GNU/Linux distribution, packages for C<yamllint> and C<ysh> are:
     391=item * C<yamllint> - Linter for YAML files (Python)
     393=item * C<libyaml-shell-perl> - YAML test shell (Perl)
     398Own project ressources:
     402=item * L<Web site|>
     404=item * L<Online Manual|>
     406=item * L<SVN repository|>
     411=head1 VERSION
     413$Id: klask 397 2018-02-28 18:53:47Z g7moreau $
     416=head1 AUTHOR
     418Written by Gabriel Moreau <Gabriel.Moreau(A)>, LEGI UMR 5519, CNRS, Grenoble - France
    319423Licence GNU GPL version 2 or later and Perl equivalent
    321 Copyright (C) 2014-2018 Gabriel Moreau <Gabriel.Moreau(A)>.
     425Copyright (C) 2014-2018, LEGI UMR 5519 / CNRS UGA G-INP, Grenoble, France
Note: See TracChangeset for help on using the changeset viewer.