The Ndoutils plugin under Nagios

Source: Internet
Author: User
Tags import database

The Ndoutils plug-in is used for events in Nagios and the configuration information data Import database is used to record its associated relationships in the database, previously with the use of Nagiosql (http://jim123.blog.51cto.com/4763600/ 1970398) somewhat similar, but the difference is that in nagiosql is already useful PHP files written in the front-end page and the definition of the configuration file with the database interaction, and in Ndoutils only to the Nagios event and configuration information in the database, This makes it possible to monitor or do other triggers based on the status of the records stored in the database, and so on, here is a simple ndoutils installation deployment, Ndoutils installation deployment is relatively simple, the database used here suggests MySQL, Ndoutils can download the latest stable version of Https://exchange.nagios.org/directory/Addons/Database-Backends/NDOUtils/details in the Nagios community:

[[email protected] ndoutils-2.1.3]# yum -y install perl-dbd-mysql perl-dbi[ [email protected] ndoutils-2.1.3]# tar -zxvf ndoutils-2.1.3.tar.gz &&  cd ndoutils-2.1.3[[email protected] ndoutils-2.1.3]# ./configure --enable-mysql  --with-mysql=/usr/local/mysql --with-ndo2db-user=nagios -with-ndo2db-group=nagios[[email  protected] ndoutils-2.1.3]# make all && make fullinstall[[email  Protected] ndoutils-2.1.3]# cp -arp startup/default-init /etc/init.d/ndo2db[[email  protected] ndoutils-2.1.3]# chmod +x /etc/init.d/ndo2db[[email protected]  ndoutils-2.1.3]# cd db/#建库导入数据mysql > create database nagios;mysql> grant  ALL ON  ' Nagios '. * to [email protected] ' localhost '  IDENTIFIED BY  "Youpassword"; MYSQL≫ use nagios;mysql> source mysql.sql[[email protected] db]# cd / usr/local/nagios/etc/[[email protected] etc]# mv ndo2db.cfg-sample ndo2db.cfg  && mv ndomod.cfg-sample ndomod.cfg#ndo2db.cfg is the related configuration used to connect to the database and is connected according to the actual database user password # NDOMOD.CFG is used to configure related logs and profiles using related patterns [[email protected] db]# vim nagios.cfg ... Slightly ... Broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfgevent_broker_ Options=-1[[email protected] etc]# /etc/init.d/ndo2db start

It is important to note that in the installation of MySQL need to define a good MySQL lib file after importing the system directory with Ldconfig, and in different versions of the Ndoutils compilation parameters are not the same, before compiling can./configure--help view, It is important to note that each time you add a change to restart Nagios, you need to restart ndo2db to re-record the configuration information and events in the database.

This article from "Jim's Technical Essay" blog, declined to reprint!

The Ndoutils plugin under Nagios

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.