Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Introduction to the installation and use of nagios

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

The main content of this article is "introduction to the installation and use of nagios". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "introduction to the installation and use of nagios".

Experimental environment:

Virtual machine VMware Workstation 12 player

Server side: centos6.4 system, ip:192.168.0.24 netmask:255.255.255.0

Nagios 3.5.1

System default yum source apache server

Software introduction:

Nagios is an open source monitoring system that can run on the Linux/Unix platform and can be used to monitor the running status of the system and network information. Nagios can monitor specified local or remote hosts and services, while providing exception notification.

Nagios can provide the following monitoring functions.

Monitor network services (SMTP, POP3, HTTP, NNTP, Ping, etc.).

Monitor host resources (processor load, disk utilization, etc.).

The simple plug-in design allows users to easily expand the detection methods of their own services.

Parallel service checking mechanism.

Have the ability to define the network hierarchy and use the "parent" host definition to express the relationship between network hosts, which can be used to discover and clarify the downtime or unreachable state of the host.

Send alerts to contacts (via email, SMS, user-defined methods) when service or host problems are generated and resolved.

It has the function of defining event handling, which can obtain more problem location when the event of the host or service occurs.

Automatic log rollback.

The redundant monitoring of the host can be supported and realized.

The optional Web interface is used to view current network status, notification and failure history, log files, and so on.

The best use of Nagios is that it automates the work done by administrators every day. You just need to set the port to listen. It will work silently to help check the status of the service port regularly. Once a problem is found, an alarm will be issued in time. The alarm can be an e-mail or a mobile phone, so that the administrator can receive the status of the system the first time.

Software installation:

Execute the following script

#! / bin/bash

# This is nagios in centos6.4 autho install shell

Setenforce 0

Yum install-y gcc gcc-c++ httpd php php-gd glibc glibc-common gd gd-devel perl perl-devel traceroute bind-utils ntpdate mtr wget nc mailx

Wget https://assets.nagios.com/downloads/nagioscore/releases/nagios-3.5.1.tar.gz

Tar zxvf nagios-3.5.1.tar.gz

Cd nagios/

Useradd-m nagios

Groupadd nagcmd

Usermod-a-G nagcmd nagios

Usermod-a-G nagcmd apache

. / configure-- with-command-group=nagcmd

Make all

Make install

Make install-init

Make install-config

Make install-commandmode

Make install-webconf

Htpasswd-c / usr/local/nagios/etc/htpasswd.users nagiosadmin

Chkconfig-add nagios

Service httpd restart

Service nagios start

Sed-I's / ^ Selinux = enforcing/SELINUX=disabled/' / etc/sysconfig/selinux

Service iptables stop

Chkconfig iptables off

Chkconfig ip6tables off

Test:

1. Enter ip/nagios into the browser and enter enter.

2. After logging in

3. Just click on it.

At this point, I believe that everyone on the "introduction to the installation and use of nagios" have a deeper understanding, might as well to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report