How to install ndoutils on nagios 4.0.8

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
yunushaikh
Posts: 176
Joined: Sat Jun 20, 2015 9:04 pm

How to install ndoutils on nagios 4.0.8

Post by yunushaikh »

Any document on how to install ndoutils please

Thanks
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: How to install ndoutils on nagios 4.0.8

Post by jdalrymple »

Complete instructions are in the README file included in the package

http://sourceforge.net/projects/nagios/ ... ils-2.0.0/
yunushaikh
Posts: 176
Joined: Sat Jun 20, 2015 9:04 pm

Re: How to install ndoutils on nagios 4.0.8

Post by yunushaikh »

Thanks buddy

I will try these steps and let you know if I am able to do or not.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: How to install ndoutils on nagios 4.0.8

Post by abrist »

Alright, make sure to read the notes and peek at the copy at the end of the build to make sure that the core 4 version of the ndo bins were copied.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
yunushaikh
Posts: 176
Joined: Sat Jun 20, 2015 9:04 pm

Re: How to install ndoutils on nagios 4.0.8

Post by yunushaikh »

Hello Sir,

I tried to install ndoutils using the readme file. I was able to follow the steps
But when I start the nagios service placing the below parameters in nagios.cfg

event_broker_options=-1
broker_module=/usr/local/nagios/bin/ndomod.o
cfg_file=/usr/local/nagios/etc/ndomod.cfg

It gives the below error
-----------------------------------------------------------------------------------------------------------------------------------
Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Error: Unexpected token or statement in file '/usr/local/nagios/etc/ndomod.cfg' on line 26.
Error processing object config files!


***> One or more problems was encountered while processing the config files...

Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.
---------------------------------------------------------------------------------------------------------------------------------------------------

Line no 26 under ndomod.cfg is
24 #output_type=file
25 #output_type=tcpsocket
26 output_type=unixsocket

Please help...
And also one more question. Once I install the ndoutils how will I verify that the Nagios is storing all the logs in the mysql database. Any specific table in Nagios database where I can check?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: How to install ndoutils on nagios 4.0.8

Post by abrist »

Did you edit this file from a windows machine? If so, you may want to make sure the line edings are unix:

Code: Select all

yum install dos2unix -y
dos2unix /usr/local/nagios/etc/ndomod.cfg
Also, can you post the full ndomod.cfg file?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
yunushaikh
Posts: 176
Joined: Sat Jun 20, 2015 9:04 pm

Re: How to install ndoutils on nagios 4.0.8

Post by yunushaikh »

No I have not edited this file from Windows. I used vi text editor

Below is the full file for ndomod.cfg


#####################################################################
# NDOMOD CONFIG FILE
#
# Last Modified: 09-05-2007
#####################################################################


# INSTANCE NAME
# This option identifies the "name" associated with this particular
# instance of Nagios and is used to seperate data coming from multiple
# instances. Defaults to 'default' (without quotes).

#instance_name=default



# OUTPUT TYPE
# This option determines what type of output sink the NDO NEB module
# should use for data output. Valid options include:
# file = standard text file
# tcpsocket = TCP socket
# unixsocket = UNIX domain socket (default)

#output_type=file
#output_type=tcpsocket
output_type=unixsocket



# OUTPUT
# This option determines the name and path of the file or UNIX domain
# socket to which output will be sent if the output type option specified
# above is "file" or "unixsocket", respectively. If the output type
# option is "tcpsocket", this option is used to specify the IP address
# of fully qualified domain name of the host that the module should
# connect to for sending output.

#output=/usr/local/nagios/var/ndo.dat
#output=127.0.0.1
output=/usr/local/nagios/var/ndo.sock



# TCP PORT
# This option determines what port the module will connect to in
# order to send output. This option is only valid if the output type
# option specified above is "tcpsocket".

tcp_port=5668



# ENCRYPTION
# This option determines if the module will use SSL to encrypt the
# network traffic between module and ndo2db daemon.
# Both sides have to enable this feature which depends on SSL Libraries
# like openssl or kerberos
# This option is only valid if the output type
# option specified above is "tcpsocket".
#
# A value of '1' will enable this feature

use_ssl=0



# OUTPUT BUFFER
# This option determines the size of the output buffer, which will help
# prevent data from getting lost if there is a temporary disconnect from
# the data sink. The number of items specified here is the number of
# lines (each of variable size) of output that will be buffered.

output_buffer_items=5000



# BUFFER FILE
# This option is used to specify a file which will be used to store the
# contents of buffered data which could not be sent to the NDO2DB daemon
# before Nagios shuts down. Prior to shutting down, the NDO NEB module
# will write all buffered data to this file for later processing. When
# Nagios (re)starts, the NDO NEB module will read the contents of this
# file and send it to the NDO2DB daemon for processing.

buffer_file=/usr/local/nagios/var/ndomod.tmp



# FILE ROTATION INTERVAL
# This option determines how often (in seconds) the output file is
# rotated by Nagios. File rotation is handled by Nagios by executing
# the command defined by the file_rotation_command option. This
# option has no effect if the output_type option is a socket.

file_rotation_interval=14400



# FILE ROTATION COMMAND
# This option specified the command (as defined in Nagios) that is
# used to rotate the output file at the interval specified by the
# file_rotation_interval option. This option has no effect if the
# output_type option is a socket.
#
# See the file 'misccommands.cfg' for an example command definition
# that you can use to rotate the log file.

#file_rotation_command=rotate_ndo_log



# FILE ROTATION TIMEOUT
# This option specified the maximum number of seconds that the file
# rotation command should be allowed to run before being prematurely
# terminated.

file_rotation_timeout=60



# RECONNECT INTERVAL
# This option determines how often (in seconds) that the NDO NEB
# module will attempt to re-connect to the output file or socket if
# a connection to it is lost.

reconnect_interval=15



# RECONNECT WARNING INTERVAL
# This option determines how often (in seconds) a warning message will
# be logged to the Nagios log file if a connection to the output file
# or socket cannot be re-established.

reconnect_warning_interval=15
#reconnect_warning_interval=900



# DATA PROCESSING OPTIONS
# These options determine what data the NDO NEB Module will process
#
acknowledgement_data=1
adaptive_contact_data=1
adaptive_host_data=1
adaptive_program_data=1
adaptive_service_data=1
aggregated_status_data=1
comment_data=1
contact_status_data=1
downtime_data=1
event_handler_data=1
external_command_data=1
flapping_data=1
host_check_data=1
host_status_data=1
log_data=1
main_config_data=1
notification_data=1
object_config_data=1
process_data=1
program_status_data=1
retention_data=1
service_check_data=1
service_status_data=1
statechange_data=1
system_command_data=1
timed_event_data=1


# CONFIG OUTPUT OPTION
# This option determines what types of configuration data the NDO
# NEB module will dump from Nagios. Values can be OR'ed together.
# Values:
# 0 = Don't dump any configuration information
# 1 = Dump only original config (from config files)
# 2 = Dump config only after retained information has been restored
# 3 = Dump both original and retained configuration

config_output_options=2

---------------------------------------------------------------------------------------

Thanks for quick reply. Let me know if you need any other file
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: How to install ndoutils on nagios 4.0.8

Post by abrist »

Actually, Looking oevr an earlier post I think the issue is with nagios.cfg:
yunushaikh wrote:event_broker_options=-1
broker_module=/usr/local/nagios/bin/ndomod.o
cfg_file=/usr/local/nagios/etc/ndomod.cfg
It should be:

Code: Select all

event_broker_options=-1
broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg
As you want to pass the config_file value to the NDO NEB module, not have nagios parse it as an object config.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
yunushaikh
Posts: 176
Joined: Sat Jun 20, 2015 9:04 pm

Re: How to install ndoutils on nagios 4.0.8

Post by yunushaikh »

Ok sir

I am checking it. I will let you know in few minutes
yunushaikh
Posts: 176
Joined: Sat Jun 20, 2015 9:04 pm

Re: How to install ndoutils on nagios 4.0.8

Post by yunushaikh »

Thank you Sir... It worked.
I also want to know how should i verify if the data is going in mysql database. It will be very helpful for me to confirm if data is passing to database.
Locked