Install FAN nagios on CentOS

Source: Internet
Author: User
Tags rrdtool nameserver fully qualified domain name

Install FAN nagios on CentOS

1. FAN is a centos-based mini version system. You can directly download the iso image for installation. It can also be installed on the redhat platform. FAN 2.1 is generally installed on a 32-bit system on the redhat 5. x platform.

Official Website: http://www.fullyautomatednagios.org/download/

2. Configure the network and dns

1. network

[Root @ oracle64 Desktop] # cat/etc/sysconfig/network-scripts/ifcfg-eth3

2. dns

[Root @ oracle64 Desktop] # cat/etc/resolv. conf

Search localdomain

Nameserver 210.21.4.130

Nameserver 221.5.88.88

2. Installing on a 32-bit system is simple

1. Install epel-release

[Root @ oracle64 Desktop] # rpm-Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

2. Install Graphviz repo:

[Root @ oracle64 Desktop] # cd/etc/yum. repos. d/

[Root @ oracle64 Desktop] # wget http://www.graphviz.org/graphviz-rhel.repo

3. Install FAN repo:

[Root @ oracle64 Desktop] # wgethttp: // www.fullyautomatednagios.org/fan/repository/2.4/ I #/fan-repo-2.4-fan.1.noarch.rpm

[Root @ oracle64 Desktop] # yum localinstall -- nogpgcheck fan-repo-2.4-fan.1.noarch.rpm

4.64bit system cannot be installed like this. Use the fan_nagios_x86_64.repo.tar.gz package (this package is a new source) and decompress the package to the/etc/yum. repos. d/folder.

Iii. Install stable version 2.4

FAN standalone

[Root @ oracle64 Desktop] # yum install fan-standalone

FAN poller

[Root @ oracle64 Desktop] # yum install fan-poller

FAN central

[Root @ oracle64 Desktop] # yum install fan-central

FAN database

[Root @ oracle64 Desktop] # yum install fan-database

4. Draw a historical curve with PNP

  1. Pnp is a tool based on php and perl that uses rrdtool to plot the data collected by nagios. Therefore, you must install php, perl, and rrdtool before installing pnp.

2. Install the required plug-ins

Yum-yinstall gcc-c ++

Yum-y install libxml2-devel

Yum-y install pango *

3. Install cgilib

Tar zxvf cgilib-0.5.tar.gz

Cd cgilib-0.5

Cp cgi. h/usr/include

4. Install rrdtool

Tar zxvf rrdtool-1.4.5.tar.gz

Cd rrdtool

./Configure

Make all

Make install

5. edit the file and add it to the end

Vi/etc/httpd/conf/http. conf

Alias/pnp "/usr/local/nagios/share/pnp"

<Directory "/usr/local/nagios/share/pnp">

Options None

AllowOverride None

Order allow, deny

Allow from all

Authname "nagios access"

Authuserfile/etc/nagios/htpasswd. users

Require valid-user

Authtype basic

</Directory>

6. Start apache and nagios. The default username and password of nagios are both nagiosadmin.

V. Error Reporting

1. Nic traffic error: Return code of 127 is out of bounds-plugin may be missing

/Usr/lib/nagios/plugins/the folder does not contain a traffic check script, and then authorizes

Ll/usr/lib/nagios/plugins/check_traffic.sh

Cd/usr/lib/nagios/plugins

Chmod 777-R plugins

Chown-R nagios. nagios plugins

2. vi/etc/httpd/conf/httpd. conf

Find # ServerName www.example.com: 80, remove #, and restart apache.

Starting httpd: cocould not reliably determine the server's fully qualified domain name, using 172.16.195.101 for ServerName

3. Disable all nagios alarms. The module reports an error.

Error: cocould not stat () command file '/var/log/nagios/rw/nagios. cmd '!

Copy A nagios. cmd file to the following directory and grant permissions

Chmod-R 777/var/log/nagios/rw/

4. CHECK_NRPE: Error-cocould not complete SSL handshake.

Vi/usr/local/nagios/etc/nrpe. cfg

Add nagios IP address 210.31.118.245

Restart nrpe.

5. Only the 210.31.118.245 machines cannot be pinged, that is, the firewall is blocked and

Ping critical-Packet loss = 100%

/Sbin/iptables-a input-p icmp-s 210.31.118.245-j ACCEPT

6. All of these are port 5666 telnet failures and are blocked by the firewall.

CHECK_NRPE: Socket timeout after 10 seconds.

CHECK_NRPE: Socket timeout after 10 seconds.

/Sbin/iptables-a input-p tcp -- dport 5666-I eth1-j ACCEPT

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.