Nagios Host Configuration Options

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
chris2ferz
Posts: 28
Joined: Fri Nov 16, 2012 9:49 am

Re: Nagios Host Configuration Options

Post by chris2ferz »

Its checking in passively. So not sure how I would do that. Its using NRDS.

Is there any way I can change the thresholds? So that I can configure it to not alert unless its outside a certain range?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios Host Configuration Options

Post by scottwilkerson »

Can you post your NRDS configuration for this server
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
chris2ferz
Posts: 28
Joined: Fri Nov 16, 2012 9:49 am

Re: Nagios Host Configuration Options

Post by chris2ferz »

What is the best way to do that?
Its working fine on others with the same config
if that means anything
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagios Host Configuration Options

Post by slansing »

Copy the output from the following file to here:

Code: Select all

vi /usr/local/nrdp/clients/nrds/nrds.cfg
Not sure which configuration was being asked for here..
chris2ferz
Posts: 28
Joined: Fri Nov 16, 2012 9:49 am

Re: Nagios Host Configuration Options

Post by chris2ferz »

used cat since vi wasn't playing nice
here you go - thanks

#############################################################################
# Sample NRDS Config File
# Written by: Scott Wilkerson ([email protected])
#
# Last Modified: 02-13-2012
#
# NOTES:
# This is a sample configuration file for NRDS. It needs to be
# located on the remote host that is sending data to NRDP, not the Server
#############################################################################

# URL
# This is the full URL of the NRDP server you want the passive checks
# sent to.
# eg. http://www.my-server.com/nrdp/
# https://www.my-server.com/nrdp/

URL=http://www.my-server.com/nrdp/

# Authentication Token
# This is the Authentication Token that should be used to authenticate
# your access to the NRPD server. This token must match one of the
# tokens entered in the NRPD server.

TOKEN=PUT_YOUR_TOKEN_HERE

# CONFIG_VERSION
# Used to automatically updated from the NRDP SERVER

CONFIG_VERSION=0

# CONFIG_NAME
# Used to automatically update config from the NRDP SERVER

CONFIG_NAME=linuxservergroup

# UPDATE_CONFIG
# Used to automatically update config from the NRDP SERVER

UPDATE_CONFIG=1

# UPDATE_PLUGINS
# Used to automatically update plugins from the NRDP SERVER

UPDATE_PLUGINS=1

# UPDATE_PLUGINS
# This will be used in future versions that will allow plugins to be
# automatically updated from the NRDP SERVER

PLUGIN_DIR=/usr/local/nagios/libexec

# SEND_NRDP
# This is full path to send_nrdp.sh on this machine. The send_nrdp.sh client
# is required for this script to run properly.
# eg. /usr/local/nrdp/clients/send_nrdp.sh

SEND_NRDP=/usr/local/nrdp/clients/send_nrdp.sh

# COMMAND_PREFIX
# This option allows you to prefix all commands with a user-defined string.
# A space is automatically added between the specified prefix string and the
# command line from the command definition.
#
# *** THIS EXAMPLE MAY POSE A POTENTIAL SECURITY RISK, SO USE WITH CAUTION! ***
# Usage scenario:
# Execute restricted commmands using sudo. For this to work, you need to add
# the nagios user to your /etc/sudoers. An example entry for alllowing
# execution of the plugins from might be:
#
# nagios ALL=(ALL) NOPASSWD: /usr/lib/nagios/plugins/
#
# This lets the nagios user run all commands in that directory (and only them)
# without asking for a password. If you do this, make sure you don't give
# random users write access to that directory or its contents!

#COMMAND_PREFIX=/usr/bin/sudo


# COMMAND DEFINITIONS
# Command definitions that this script will run. Definitions
# are in the following format:
#
# command[<service name>]=<command_line>
# or
# command[__HOST__]=<command_line>
#
# If __HOST__ is specified in place of service name, it will run as a host
# check. There should be only 1 __HOST__ check and all other checks should
# have a unique <service name>. <service name> should not contain special
# characters, however may contain spaces.
#
# Each time this script is run it will execute the commands specified by the
# <command_line> argument.
#
# Unlike Nagios, the command line cannot contain macros - it must be
# typed exactly as it should be executed.
#
# Note: Any plugins that are used in the command lines must reside
# on the machine that this daemon is running on! The examples below
# assume that you have plugins installed in a /usr/local/nagios/libexec
# directory. Also note that you will have to modify the definitions below
# to match the argument format the plugins expect. Remember, these are
# examples only!

# Host Check
command[__HOST__]=/usr/local/nagios/libexec/check_ping -H localhost -w 200.0,40% -c 400.0,80% -p 1

# Service Checks
command[Check Users]=/usr/local/nagios/libexec/check_users -w 5 -c 10
command[Check Load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20
command[Check hda1]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/hda1
command[Check Zombie Procs]=/usr/local/nagios/libexec/check_procs -w 5 -c 10 -s Z
command[Check Total Procs]=/usr/local/nagios/libexec/check_procs -w 150 -c 200


# TMPDIR
# This is where any needed temporary files will be created.

TMPDIR="/tmp"

#############################################################################
# END NRDS CONFIG
#############################################################################
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios Host Configuration Options

Post by scottwilkerson »

slansing was wrong, that's not what I was looking for.

What I would like you to do is go to
Admin -> NRDS Config Manager -> Edit

And paste the output of the Commands textarea

thanks
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
chris2ferz
Posts: 28
Joined: Fri Nov 16, 2012 9:49 am

Re: Nagios Host Configuration Options

Post by chris2ferz »

Think this is what you are looking for - there is one machine on this config and also the one i posted about. Others are working fine. Thanks

command[__HOST__] = $PLUGIN_DIR$\check_winping.exe -H localhost --warning 200,40% --critical 400.0,80%
command[nrpe_winprocess] = $PLUGIN_DIR$\check_winprocess.exe --warning 40 --critical 50
command[nrpe_process] = $PLUGIN_DIR$\cpuload_nrpe_nt.exe 70 90
command[nrpe_diskspace] = $PLUGIN_DIR$\diskspace_nrpe_nt.exe c: 77 90
command[nrpe_eventlog] = $PLUGIN_DIR$\eventlog_nrpe_nt.exe -m 7200
command[nrpe_memload] = $PLUGIN_DIR$\memload_nrpe_nt.exe 70 90
command[nrpe_service] = $PLUGIN_DIR$\service_nrpe_nt.exe "DNS Client"
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios Host Configuration Options

Post by scottwilkerson »

It is possible that the specific system doesn't know how to resolve localhost

Try changing the config to

Code: Select all

command[__HOST__] = $PLUGIN_DIR$\check_winping.exe -H 127.0.0.1 --warning 200,40% --critical 400.0,80%
command[nrpe_winprocess] = $PLUGIN_DIR$\check_winprocess.exe --warning 40 --critical 50
command[nrpe_process] = $PLUGIN_DIR$\cpuload_nrpe_nt.exe 70 90
command[nrpe_diskspace] = $PLUGIN_DIR$\diskspace_nrpe_nt.exe c: 77 90
command[nrpe_eventlog] = $PLUGIN_DIR$\eventlog_nrpe_nt.exe -m 7200
command[nrpe_memload] = $PLUGIN_DIR$\memload_nrpe_nt.exe 70 90
command[nrpe_service] = $PLUGIN_DIR$\service_nrpe_nt.exe "DNS Client"
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
chris2ferz
Posts: 28
Joined: Fri Nov 16, 2012 9:49 am

Re: Nagios Host Configuration Options

Post by chris2ferz »

Wow you were right. That did it. Running on a windows 2008 server with ipv6 disabled but I wouldn't have expected that. Thanks so much

My other question was is it possible in that same config to edit the range of which is notified as critical? for example

command[nrpe_winprocess] = $PLUGIN_DIR$\check_winprocess.exe --warning 40 --critical 50

If I change to

command[nrpe_winprocess] = $PLUGIN_DIR$\check_winprocess.exe --warning 50 --critical 60

Will that allow up to 50 process to run without triggering a notification?

I ask this also because I have passive hosts that have not checked in for days but they still show as "up"
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios Host Configuration Options

Post by scottwilkerson »

Yes you can modify that and would get the results you expect.

As for the passive host that hasn't checked in for days.. there is a semi-solution for that

If you go the CCM -> Templates -> Host Templates -> xiwizard_passive_host -> Modify

Set check command to check_dummy
$ARG1$ = 1
$ARG2$ = "Have not heard from host"

Then on check settings tab set
Freshness threshold = 3600
Check freshness = on
Save
Apply configuration

What this will do is run the active check if it has not head from the host in 3600 seconds (one hour) which will switch the state to WARNING - "Have not heard from host"
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked