项目作者: suraj-singh93

项目描述 :
Nagios Core, is a free and open source computer-software application that monitors systems, networks and infrastructure.
高级语言:
项目地址: git://github.com/suraj-singh93/Nagios.git
创建时间: 2018-09-02T15:55:21Z
项目社区:https://github.com/suraj-singh93/Nagios

开源协议:

下载


Nagios

Nagios monitors your entire IT infrastructure to ensure systems, applications, services, and business processes are functioning properly. In the event of a failure, Nagios can alert technical staff of the problem, allowing them to begin remediation processes before outages affect business processes, end-users, or customers.

sample configuration:

  1. host/host-group

    1. define host {
    2. use linux-server ### Inherit default values from a template/template.cfg (placed at <nagios-home-dir>/etc/)
    3. host_name jenkins ## Name of host
    4. alias jenkins
    5. address 192.168.0.105
    6. parents MAC ### check Nagios doc
    7. hostgroups Linux ## optional

    }

    1. define hostgroup {
    2. hostgroup_name Linux ; The name of the hostgroup
    3. alias Linux ; Long name of the group
    4. members localhost,jenkins ;(Optional) Comma separated list of hosts that belong to this group

    }

  1. services/services-group:
  1. define service {
  2. use local-service ; Name of service template to use
  3. hostgroup_name Linux
  4. service_description PING
  5. check_command check_ping!100.0,20%!500.0,60% ; ! to specify arguments to commands
  6. }
  7. define servicegroup {
  8. servicegroup_name HTTP
  9. alias HTTP
  10. members localhost,HTTP_80,DOCKER_HOST,HTTP_80,jenkins,HTTP_8080 ; host_name,service,host_name,service.....
  11. }
  1. Commands:

    1. define command {
    2. command_name check_ping
    3. command_line $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5
    4. }
  1. Command check_ping execute:
    /libexec/check_ping -H -w 100.0,20% -c 500.0,60% -p 5
    output: PING OK - Packet loss = 0%, RTA = 0.65 ms|rta=0.655000ms;100.000000;500.000000;0.000000 pl=0%;20;60;0
    Above output used by nagios server.

Note: Place services, commands and hosts file in /etc/.
Add below lines in nagios.cfg (/etc/)

  1. # Definitions for monitoring the (Linux) host
  2. cfg_dir=/usr/local/nagios/etc/hosts
  3. # Definitions for service file
  4. cfg_dir=/usr/local/nagios/etc/services
  5. # commands files
  6. cfg_dir=/usr/local/nagios/etc/commands

Link: https://www.slashroot.in/what-nagios-introduction-enterprise-level-server-monitoring