check_ping

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.
donnyforbes
Posts: 357
Joined: Tue Jun 13, 2017 2:17 pm

Re: check_ping

Post by donnyforbes »

sure I will post both configs. If that is the case how can I be notified when a windows server goes down? I did speak to my boss about XI i need to get a quote on the costs.
Here are the configs.

Code: Select all

###############################################################################
# COMMANDS.CFG - SAMPLE COMMAND DEFINITIONS FOR NAGIOS 4.3.2 # # # NOTES: This config file provides you with some example command definitions
#        that you can reference in host, service, and contact definitions.
#       
#        You don't need to keep commands in a separate file from your other
#        object definitions.  This has been done just to make things easier to
#        understand.
#
###############################################################################


#check_nrpe

define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ }


#host and service definitions

define host{
name linux-box ; Name of this template
use generic-host ; Inherit default values
check_period 24x7
check_interval 5
retry_interval 1
max_check_attempts 10
check_command check-host-alive
notification_period 24x7
notification_interval 30
notification_options d,r
contact_groups admins
register 0 ; DONT REGISTER THIS - ITS A TEMPLATE
}


#remote Linux/Unix hosts

define host{
use linux-box ; Inherit default values from a template
host_name huey  ; The name or IP or remote server
alias RHEL 7.3 ; A longer name for the server
address 192.168.1.42 ; IP address of the remote server
}

define host{
use linux-box ; Inherit default values from a template
host_name duey  ; The name or IP or remote server
alias RHEL 7.3 ; A longer name for the server
address 192.168.1.43 ; IP address of the remote server
}

define host{
use linux-box ; Inherit default values from a template
host_name louie   ; The name or IP or remote server
alias RHEL 7.3 ; A longer name for the server
address 192.168.39.10 ; IP address of the remote server
}

define host{
use linux-box ; Inherit default values from a template
host_name proxy4gl   ; The name or IP or remote server
alias RHEL 7.3 ; A longer name for the server
address 192.168.1.12 ; IP address of the remote server
}

define host{
use linux-box ; Inherit default values from a template
host_name taz2   ; The name or IP or remote server
alias RHEL 7.3 ; A longer name for the server
address 192.168.1.10 ; IP address of the remote server
}

define host{
use linux-box ; Inherit default values from a template
host_name tank   ; The name or IP or remote server
alias RHEL 7.3 ; A longer name for the server
address 192.168.1.15 ; IP address of the remote server
}

define host{
use linux-box ; Inherit default values from a template
host_name ernestine   ; The name or IP or remote server
alias RHEL 7.3 ; A longer name for the server
address 192.168.39.12 ; IP address of the remote server
}


#remote services monitored

#This service will monitor the CPU Load

define service{
use generic-service
host_name huey
service_description CPU Load
check_command check_nrpe!check_load
}

define service{
use generic-service
host_name duey
service_description CPU Load
check_command check_nrpe!check_load
}

define service{
use generic-service
host_name louie
service_description CPU Load
check_command check_nrpe!check_load
}

define service{
use generic-service
host_name proxy4gl
service_description CPU Load
check_command check_nrpe!check_load
}

define service{
use generic-service
host_name taz2
service_description CPU Load
check_command check_nrpe!check_load
}

define service{
use generic-service
host_name tank
service_description CPU Load
check_command check_nrpe!check_load
}

define service{
use generic-service
host_name ernestine
service_description CPU Load
check_command check_nrpe!check_load
}


#This service will monitor number of currenlty logged on users

define service{
use generic-service
host_name huey
service_description Current Users
check_command check_nrpe!check_users
}

define service{
use generic-service
host_name duey
service_description Current Users
check_command check_nrpe!check_users
}

define service{
use generic-service
host_name louie
service_description Current Users
check_command check_nrpe!check_users
}

define service{
use generic-service
host_name proxy4gl
service_description Current Users
check_command check_nrpe!check_users
}

define service{
use generic-service
host_name taz2
service_description Current Users
check_command check_nrpe!check_users
}

define service{
use generic-service
host_name tank
service_description Current Users
check_command check_nrpe!check_users
}

define service{
use generic-service
host_name ernestine
service_description Current Users
check_command check_nrpe!check_users
}

#This service will monitor the free drive space on /dev/hda1

define service{
use generic-service
host_name huey
service_description /dev/hda1 Free Space
check_command check_nrpe!check_hda1
}

define service{
use generic-service
host_name duey
service_description /dev/hda1 Free Space
check_command check_nrpe!check_hda1
}

define service{
use generic-service
host_name louie
service_description /dev/hda1 Free Space
check_command check_nrpe!check_hda1
}

define service{
use generic-service
host_name proxy4gl
service_description /dev/hda1 Free Space
check_command check_nrpe!check_hda1
}

define service{
use generic-service
host_name taz2
service_description /dev/hda1 Free Space
check_command check_nrpe!check_hda1
}

define service{
use generic-service
host_name tank
service_description /dev/hda1 Free Space
check_command check_nrpe!check_hda1
}

define service{
use generic-service
host_name ernestine
service_description /dev/hda1 Free Space
check_command check_nrpe!check_hda1
}

#service will monitor the total number of processes

define service{
use generic-service
host_name huey
service_description Total Processes
check_command check_nrpe!check_total_procs
}

define service{
use generic-service
host_name duey
service_description Total Processes
check_command check_nrpe!check_total_procs
}

define service{
use generic-service
host_name louie
service_description Total Processes
check_command check_nrpe!check_total_procs
}

define service{
use generic-service
host_name proxy4gl
service_description Total Processes
check_command check_nrpe!check_total_procs
}

define service{
use generic-service
host_name taz2
service_description Total Processes
check_command check_nrpe!check_total_procs
}

define service{
use generic-service
host_name tank
service_description Total Processes
check_command check_nrpe!check_total_procs
}


define service{
use generic-service
host_name ernestine
service_description Total Processes
check_command check_nrpe!check_total_procs
}


# SAMPLE NOTIFICATION COMMANDS
#
# These are some example notification commands.  They may or may not work on
# your system without modification.  As an example, some systems will require 
# you to use "/usr/bin/mailx" instead of "/usr/bin/mail" in the commands below.
#
################################################################################


# 'notify-host-by-email' command definition
define command{
	command_name	notify-host-by-email
	command_line	/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$
	}

# 'notify-service-by-email' command definition
define command{
	command_name	notify-service-by-email
	command_line	/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
	}


################################################################################
#
# SAMPLE HOST CHECK COMMANDS
#
################################################################################


# This command checks to see if a host is "alive" by pinging it
# The check must result in a 100% packet loss or 5 second (5000ms) round trip 
# average time to produce a critical error.
# Note: Five ICMP echo packets are sent (determined by the '-p 5' argument)

# 'check-host-alive' command definition
define command{
        command_name    check-host-alive
        command_line    $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5
        }



################################################################################
#
# SAMPLE SERVICE CHECK COMMANDS
#
# These are some example service check commands.  They may or may not work on
# your system, as they must be modified for your plugins.  See the HTML 
# documentation on the plugins for examples of how to configure command definitions.
#
# NOTE:  The following 'check_local_...' functions are designed to monitor
#        various metrics on the host that Nagios is running on (i.e. this one).
################################################################################

# 'check_local_disk' command definition
define command{
        command_name    check_local_disk
        command_line    $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
        }


# 'check_local_load' command definition
define command{
        command_name    check_local_load
        command_line    $USER1$/check_load -w $ARG1$ -c $ARG2$
        }


# 'check_local_procs' command definition
define command{
        command_name    check_local_procs
        command_line    $USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$
        }


# 'check_local_users' command definition
define command{
        command_name    check_local_users
        command_line    $USER1$/check_users -w $ARG1$ -c $ARG2$
        }


# 'check_local_swap' command definition
define command{
	command_name	check_local_swap
	command_line	$USER1$/check_swap -w $ARG1$ -c $ARG2$
	}


# 'check_local_mrtgtraf' command definition
define command{
	command_name	check_local_mrtgtraf
	command_line	$USER1$/check_mrtgtraf -F $ARG1$ -a $ARG2$ -w $ARG3$ -c $ARG4$ -e $ARG5$
	}


################################################################################
# NOTE:  The following 'check_...' commands are used to monitor services on
#        both local and remote hosts.
################################################################################

# 'check_ftp' command definition
define command{
        command_name    check_ftp
        command_line    $USER1$/check_ftp -H $HOSTADDRESS$ $ARG1$
        }


# 'check_hpjd' command definition
define command{
        command_name    check_hpjd
        command_line    $USER1$/check_hpjd -H $HOSTADDRESS$ $ARG1$
        }


# 'check_snmp' command definition
define command{
        command_name    check_snmp
        command_line    $USER1$/check_snmp -H $HOSTADDRESS$ $ARG1$
        }


# 'check_http' command definition
define command{
        command_name    check_http
        command_line    $USER1$/check_http -I $HOSTADDRESS$ $ARG1$
        }


# 'check_ssh' command definition
define command{
	command_name	check_ssh
	command_line	$USER1$/check_ssh $ARG1$ $HOSTADDRESS$
	}


# 'check_dhcp' command definition
define command{
	command_name	check_dhcp
	command_line	$USER1$/check_dhcp $ARG1$
	}


# 'check_ping' command definition
define command{
        command_name    check_ping
        command_line    $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5
        }


# 'check_pop' command definition
define command{
        command_name    check_pop
        command_line    $USER1$/check_pop -H $HOSTADDRESS$ $ARG1$
        }


# 'check_imap' command definition
define command{
        command_name    check_imap
        command_line    $USER1$/check_imap -H $HOSTADDRESS$ $ARG1$
        }


# 'check_smtp' command definition
define command{
        command_name    check_smtp
        command_line    $USER1$/check_smtp -H $HOSTADDRESS$ $ARG1$
        }


# 'check_tcp' command definition
define command{
	command_name	check_tcp
	command_line	$USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$
	}


# 'check_udp' command definition
define command{
	command_name	check_udp
	command_line	$USER1$/check_udp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$
	}


# 'check_nt' command definition
define command{
	command_name	check_nt
	command_line	$USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -s F1reF1411  -v $ARG1$ $ARG2$
	}



################################################################################
#
# SAMPLE PERFORMANCE DATA COMMANDS
#
# These are sample performance data commands that can be used to send performance
# data output to two text files (one for hosts, another for services).  If you
# plan on simply writing performance data out to a file, consider using the 
# host_perfdata_file and service_perfdata_file options in the main config file.
#
################################################################################


# 'process-host-perfdata' command definition
define command{
	command_name	process-host-perfdata
	command_line	/usr/bin/printf "%b" "$LASTHOSTCHECK$\t$HOSTNAME$\t$HOSTSTATE$\t$HOSTATTEMPT$\t$HOSTSTATETYPE$\t$HOSTEXECUTIONTIME$\t$HOSTOUTPUT$\t$HOSTPERFDATA$\n" >> /usr/local/nagios/var/host-perfdata.out
	}


# 'process-service-perfdata' command definition
define command{
	command_name	process-service-perfdata
	command_line	/usr/bin/printf "%b" "$LASTSERVICECHECK$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICESTATE$\t$SERVICEATTEMPT$\t$SERVICESTATETYPE$\t$SERVICEEXECUTIONTIME$\t$SERVICELATENCY$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$\n" >> /usr/local/nagios/var/service-perfdata.out
	}

Code: Select all

###############################################################################
# WINDOWS.CFG - SAMPLE CONFIG FILE FOR MONITORING A WINDOWS MACHINE # # # NOTES: This config file assumes that you are using the sample configuration
#	 files that get installed with the Nagios quickstart guide.
#
###############################################################################


###############################################################################
###############################################################################
#
# HOST DEFINITIONS
#
###############################################################################
###############################################################################

# Define a host for the Windows machine we'll be monitoring # Change the host_name, alias, and address to fit your situation

define host{
	use		windows-server	; Inherit default values from a template
	host_name	ori	; The name we're giving to this host
	alias		My Windows Server	; A longer name associated with the host
	address		192.168.1.20	; IP address of the host
	}

define host{
        use             windows-server  ; Inherit default values from a template
        host_name       tollan     ; The name we're giving to this host
        alias           My Windows Server       ; A longer name associated with the host
        address         192.168.1.60    ; IP address of the host
        }

define host{
        use             windows-server  ; Inherit default values from a template
        host_name       drazi     ; The name we're giving to this host
        alias           My Windows Server       ; A longer name associated with the host
        address         192.168.1.23    ; IP address of the host
        }

define host{
        use             windows-server  ; Inherit default values from a template
        host_name       drakh     ; The name we're giving to this host
        alias           My Windows Server       ; A longer name associated with the host
        address         192.168.1.22    ; IP address of the host
        }

define host{
        use             windows-server  ; Inherit default values from a template
        host_name       netmon     ; The name we're giving to this host
        alias           My Windows Server       ; A longer name associated with the host
        address         192.168.1.49    ; IP address of the host
        }

define host{
        use             windows-server  ; Inherit default values from a template
        host_name       cylon2     ; The name we're giving to this host
        alias           My Windows Server       ; A longer name associated with the host
        address         192.168.1.14    ; IP address of the host
        }

define host{
        use             windows-server  ; Inherit default values from a template
        host_name       rdp-server     ; The name we're giving to this host
        alias           My Windows Server       ; A longer name associated with the host
        address         192.168.1.27    ; IP address of the host
        }

define host{
        use             windows-server  ; Inherit default values from a template
        host_name       prints     ; The name we're giving to this host
        alias           My Windows Server       ; A longer name associated with the host
        address         192.168.1.30    ; IP address of the host
        }

define host{
        use             windows-server  ; Inherit default values from a template
        host_name       tokra     ; The name we're giving to this host
        alias           My Windows Server       ; A longer name associated with the host
        address         192.168.1.179    ; IP address of the host
        }

define host{
        use             windows-server  ; Inherit default values from a template
        host_name       sql     ; The name we're giving to this host
        alias           My Windows Server       ; A longer name associated with the host
        address         192.168.1.45    ; IP address of the host
        }

define host{
        use             windows-server  ; Inherit default values from a template
        host_name       pablo     ; The name we're giving to this host
        alias           My Windows Server       ; A longer name associated with the host
        address         192.168.1.29    ; IP address of the host
        }

define host{
        use             windows-server  ; Inherit default values from a template
        host_name       goauld     ; The name we're giving to this host
        alias           My Windows Server       ; A longer name associated with the host
        address         192.168.1.6    ; IP address of the host
        }

define host{
        use             windows-server  ; Inherit default values from a template
        host_name       sgc     ; The name we're giving to this host
        alias           My Windows Server       ; A longer name associated with the host
        address         192.168.1.40    ; IP address of the host
        }


#Yard Servers
define host{
        use             windows-server  ; Inherit default values from a template
        host_name       centari     ; The name we're giving to this host
        alias           My Windows Server       ; A longer name associated with the host
        address         192.168.39.5    ; IP address of the host
        }

define host{
        use             windows-server  ; Inherit default values from a template
        host_name       vorlon     ; The name we're giving to this host
        alias           My Windows Server       ; A longer name associated with the host
        address         192.168.39.8    ; IP address of the host
        }

define host{
        use             windows-server  ; Inherit default values from a template
        host_name       shadow     ; The name we're giving to this host
        alias           My Windows Server       ; A longer name associated with the host
        address         192.168.39.7    ; IP address of the host
        }

define host{
        use             windows-server  ; Inherit default values from a template
        host_name       narn     ; The name we're giving to this host
        alias           My Windows Server       ; A longer name associated with the host
        address         192.168.39.6    ; IP address of the host
	}

define host{
        use             windows-server  ; Inherit default values from a template
        host_name       ansel     ; The name we're giving to this host
        alias           My Windows Server       ; A longer name associated with the host
        address         192.168.39.27    ; IP address of the host
        }

define host{
        use             windows-server  ; Inherit default values from a template
        host_name       babylon2     ; The name we're giving to this host
        alias           My Windows Server       ; A longer name associated with the host
        address         192.168.39.4    ; IP address of the host
        }

define host{
        use             windows-server  ; Inherit default values from a template
        host_name       babylon3     ; The name we're giving to this host
        alias           My Windows Server       ; A longer name associated with the host
        address         192.168.39.26    ; IP address of the host
        }



###############################################################################
###############################################################################
#
# HOST GROUP DEFINITIONS
#
###############################################################################
###############################################################################


# Define a hostgroup for Windows machines # All hosts that use the windows-server template will automatically be a member of this group

define hostgroup{
	hostgroup_name	windows-servers	; The name of the hostgroup
	alias		Windows Servers	; Long name of the group
	}



###############################################################################
###############################################################################
#
# SERVICE DEFINITIONS
#
###############################################################################
###############################################################################


# Create a service for monitoring the version of NSCLient++ that is installed # Change the host_name to match the name of the host you defined above

define service{
	use			generic-service
	host_name		ori
	service_description	NSClient++ Version
	check_command		check_nt!CLIENTVERSION
	}

define service{
        use                     generic-service
        host_name               tollan
        service_description     NSClient++ Version
        check_command           check_nt!CLIENTVERSION
        }


define service{
        use                     generic-service
        host_name               drazi  
        service_description     NSClient++ Version
        check_command           check_nt!CLIENTVERSION
        }

define service{
        use                     generic-service
        host_name               drakh
        service_description     NSClient++ Version
        check_command           check_nt!CLIENTVERSION
        }

define service{
        use                     generic-service
        host_name               netmon
        service_description     NSClient++ Version
        check_command           check_nt!CLIENTVERSION
        }

define service{
        use                     generic-service
        host_name               cylon2
        service_description     NSClient++ Version
        check_command           check_nt!CLIENTVERSION
        }

define service{
        use                     generic-service
        host_name               rdp-server
        service_description     NSClient++ Version
        check_command           check_nt!CLIENTVERSION
        }

define service{
        use                     generic-service
        host_name               prints
        service_description     NSClient++ Version
        check_command           check_nt!CLIENTVERSION
        }

define service{
        use                     generic-service
        host_name               tokra
        service_description     NSClient++ Version
        check_command           check_nt!CLIENTVERSION
        }

define service{
        use                     generic-service
        host_name               sql
        service_description     NSClient++ Version
        check_command           check_nt!CLIENTVERSION
        }

define service{
        use                     generic-service
        host_name               pablo
        service_description     NSClient++ Version
        check_command           check_nt!CLIENTVERSION
        }

define service{
        use                     generic-service
        host_name               goauld
        service_description     NSClient++ Version
        check_command           check_nt!CLIENTVERSION
        }

define service{
        use                     generic-service
        host_name               sgc
        service_description     NSClient++ Version
        check_command           check_nt!CLIENTVERSION
        }

define service{
        use                     generic-service
        host_name               centari
        service_description     NSClient++ Version
        check_command           check_nt!CLIENTVERSION
        }

define service{
        use                     generic-service
        host_name               vorlon
        service_description     NSClient++ Version
        check_command           check_nt!CLIENTVERSION
        }

define service{
        use                     generic-service
        host_name               shadow
        service_description     NSClient++ Version
        check_command           check_nt!CLIENTVERSION
        }

define service{
        use                     generic-service
        host_name               narn
        service_description     NSClient++ Version
        check_command           check_nt!CLIENTVERSION
        }

define service{
        use                     generic-service
        host_name               ansel
        service_description     NSClient++ Version
        check_command           check_nt!CLIENTVERSION
        }

define service{
        use                     generic-service
        host_name               babylon2
        service_description     NSClient++ Version
        check_command           check_nt!CLIENTVERSION
        }

define service{
        use                     generic-service
        host_name               babylon3
        service_description     NSClient++ Version
        check_command           check_nt!CLIENTVERSION
        }


# Create a service for monitoring the uptime of the server # Change the host_name to match the name of the host you defined above

define service{
	use			generic-service
	host_name		ori
	service_description	Uptime
	check_command		check_nt!UPTIME
	}


define service{
        use                     generic-service
        host_name               tollan
        service_description     Uptime
        check_command           check_nt!UPTIME
        }

define service{
        use                     generic-service
        host_name               drazi
        service_description     Uptime
        check_command           check_nt!UPTIME
        }

define service{
        use                     generic-service
        host_name               drakh
        service_description     Uptime
        check_command           check_nt!UPTIME
        }

define service{
        use                     generic-service
        host_name               netmon
        service_description     Uptime
        check_command           check_nt!UPTIME
        }

define service{
        use                     generic-service
        host_name               cylon2
        service_description     Uptime
        check_command           check_nt!UPTIME
        }

define service{
        use                     generic-service
        host_name               rdp-server
        service_description     Uptime
        check_command           check_nt!UPTIME
        }

define service{
        use                     generic-service
        host_name               prints
        service_description     Uptime
        check_command           check_nt!UPTIME
        }

define service{
        use                     generic-service
        host_name               tokra 
        service_description     Uptime
        check_command           check_nt!UPTIME
        }

define service{
        use                     generic-service
        host_name               sql
        service_description     Uptime
        check_command           check_nt!UPTIME
        }

define service{
        use                     generic-service
        host_name               pablo
        service_description     Uptime
        check_command           check_nt!UPTIME
        }

define service{
        use                     generic-service
        host_name               goauld
        service_description     Uptime
        check_command           check_nt!UPTIME
        }

define service{
        use                     generic-service
        host_name               sgc
        service_description     Uptime
        check_command           check_nt!UPTIME
        }

define service{
        use                     generic-service
        host_name               centari
        service_description     Uptime
        check_command           check_nt!UPTIME
        }

define service{
        use                     generic-service
        host_name               vorlon
        service_description     Uptime
        check_command           check_nt!UPTIME
        }

define service{
        use                     generic-service
        host_name               shadow
        service_description     Uptime
        check_command           check_nt!UPTIME
        }

define service{
        use                     generic-service
        host_name               narn
        service_description     Uptime
        check_command           check_nt!UPTIME
        }

define service{
        use                     generic-service
        host_name               ansel
        service_description     Uptime
        check_command           check_nt!UPTIME
        }

define service{
        use                     generic-service
        host_name               babylon2
        service_description     Uptime
        check_command           check_nt!UPTIME
        }

define service{
        use                     generic-service
        host_name               babylon3
        service_description     Uptime
        check_command           check_nt!UPTIME
        }


# Create a service for monitoring CPU load # Change the host_name to match the name of the host you defined above

define service{
	use			generic-service
	host_name		ori
	service_description	CPU Load
	check_command		check_nt!CPULOAD!-l 5,80,90
	}

define service{
        use                     generic-service
        host_name               tollan
        service_description     CPU Load
        check_command           check_nt!CPULOAD!-l 5,80,90
        }


define service{
        use                     generic-service
        host_name               drazi
        service_description     CPU Load
        check_command           check_nt!CPULOAD!-l 5,80,90
        }

define service{
        use                     generic-service
        host_name               drakh
        service_description     CPU Load
        check_command           check_nt!CPULOAD!-l 5,80,90
        }

define service{
        use                     generic-service
        host_name               netmon
        service_description     CPU Load
        check_command           check_nt!CPULOAD!-l 5,80,90
        }

define service{
        use                     generic-service
        host_name               cylon2
        service_description     CPU Load
        check_command           check_nt!CPULOAD!-l 5,80,90
        }

define service{
        use                     generic-service
        host_name               rdp-server
        service_description     CPU Load
        check_command           check_nt!CPULOAD!-l 5,80,90
        }

define service{
        use                     generic-service
        host_name               prints
        service_description     CPU Load
        check_command           check_nt!CPULOAD!-l 5,80,90
        }

define service{
        use                     generic-service
        host_name               tokra
        service_description     CPU Load
        check_command           check_nt!CPULOAD!-l 5,80,90
        }

define service{
        use                     generic-service
        host_name               sql
        service_description     CPU Load
        check_command           check_nt!CPULOAD!-l 5,80,90
        }

define service{
        use                     generic-service
        host_name               pablo
        service_description     CPU Load
        check_command           check_nt!CPULOAD!-l 5,80,90
        }

define service{
        use                     generic-service
        host_name               goauld
        service_description     CPU Load
        check_command           check_nt!CPULOAD!-l 5,80,90
        }

define service{
        use                     generic-service
        host_name               sgc
        service_description     CPU Load
        check_command           check_nt!CPULOAD!-l 5,80,90
        }

define service{
        use                     generic-service
        host_name               centari
        service_description     CPU Load
        check_command           check_nt!CPULOAD!-l 5,80,90
        }

define service{
        use                     generic-service
        host_name               vorlon
        service_description     CPU Load
        check_command           check_nt!CPULOAD!-l 5,80,90
        }

define service{
        use                     generic-service
        host_name               shadow
        service_description     CPU Load
        check_command           check_nt!CPULOAD!-l 5,80,90
        }

define service{
        use                     generic-service
        host_name               narn
        service_description     CPU Load
        check_command           check_nt!CPULOAD!-l 5,80,90
        }

define service{
        use                     generic-service
        host_name               ansel
        service_description     CPU Load
        check_command           check_nt!CPULOAD!-l 5,80,90
        }

define service{
        use                     generic-service
        host_name               babylon2
        service_description     CPU Load
        check_command           check_nt!CPULOAD!-l 5,80,90
        }

define service{
        use                     generic-service
        host_name               babylon3
        service_description     CPU Load
        check_command           check_nt!CPULOAD!-l 5,80,90
        }


# Create a service for monitoring memory usage # Change the host_name to match the name of the host you defined above

define service{
	use			generic-service
	host_name		ori
	service_description	Memory Usage
	check_command		check_nt!MEMUSE!-w 80 -c 90
	}

define service{
        use                     generic-service
        host_name               tollan
        service_description     Memory Usage
        check_command           check_nt!MEMUSE!-w 80 -c 90
        }

define service{
        use                     generic-service
        host_name               drazi
        service_description     Memory Usage
        check_command           check_nt!MEMUSE!-w 80 -c 90
        }

define service{
        use                     generic-service
        host_name               drakh
        service_description     Memory Usage
        check_command           check_nt!MEMUSE!-w 80 -c 90
        }

define service{
        use                     generic-service
        host_name               netmon
        service_description     Memory Usage
        check_command           check_nt!MEMUSE!-w 80 -c 90
        }

define service{
        use                     generic-service
        host_name               cylon2
        service_description     Memory Usage
        check_command           check_nt!MEMUSE!-w 80 -c 90
        }

define service{
        use                     generic-service
        host_name               rdp-server
        service_description     Memory Usage
        check_command           check_nt!MEMUSE!-w 80 -c 90
        }

define service{
        use                     generic-service
        host_name               prints
        service_description     Memory Usage
        check_command           check_nt!MEMUSE!-w 80 -c 90
        }

define service{
        use                     generic-service
        host_name               tokra
        service_description     Memory Usage
        check_command           check_nt!MEMUSE!-w 80 -c 90
        }

define service{
        use                     generic-service
        host_name               sql
        service_description     Memory Usage
        check_command           check_nt!MEMUSE!-w 80 -c 90
        }

define service{
        use                     generic-service
        host_name               pablo
        service_description     Memory Usage
        check_command           check_nt!MEMUSE!-w 80 -c 90
        }

define service{
        use                     generic-service
        host_name               goauld
        service_description     Memory Usage
        check_command           check_nt!MEMUSE!-w 80 -c 90
        }

define service{
        use                     generic-service
        host_name               sgc
        service_description     Memory Usage
        check_command           check_nt!MEMUSE!-w 80 -c 90
        }

define service{
        use                     generic-service
        host_name               centari
        service_description     Memory Usage
        check_command           check_nt!MEMUSE!-w 80 -c 90
        }

define service{
        use                     generic-service
        host_name               vorlon
        service_description     Memory Usage
        check_command           check_nt!MEMUSE!-w 80 -c 90
        }

define service{
        use                     generic-service
        host_name               shadow
        service_description     Memory Usage
        check_command           check_nt!MEMUSE!-w 80 -c 90
        }

define service{
        use                     generic-service
        host_name               narn  
        service_description     Memory Usage
        check_command           check_nt!MEMUSE!-w 80 -c 90
        }

define service{
        use                     generic-service
        host_name               ansel
        service_description     Memory Usage
        check_command           check_nt!MEMUSE!-w 80 -c 90
        }

define service{
        use                     generic-service
        host_name               babylon2
        service_description     Memory Usage
        check_command           check_nt!MEMUSE!-w 80 -c 90
        }

define service{
        use                     generic-service
        host_name               babylon3
        service_description     Memory Usage
        check_command           check_nt!MEMUSE!-w 80 -c 90
        }


# Create a service for monitoring C:\ disk usage # Change the host_name to match the name of the host you defined above

define service{
	use			generic-service
	host_name		ori
	service_description	C:\ Drive Space
	check_command		check_nt!USEDDISKSPACE!-l c -w 80 -c 90
	}

define service{
        use                     generic-service
        host_name               tollan
        service_description     C:\ Drive Space
        check_command           check_nt!USEDDISKSPACE!-l c -w 80 -c 90
	}

define service{
        use                     generic-service
        host_name               drazi
        service_description     C:\ Drive Space
        check_command           check_nt!USEDDISKSPACE!-l c -w 80 -c 90
        }

define service{
        use                     generic-service
        host_name               drakh
        service_description     C:\ Drive Space
        check_command           check_nt!USEDDISKSPACE!-l c -w 80 -c 90
        }

define service{
        use                     generic-service
        host_name               netmon
        service_description     C:\ Drive Space
        check_command           check_nt!USEDDISKSPACE!-l c -w 80 -c 90
        }

define service{
        use                     generic-service
        host_name               cylon2
        service_description     C:\ Drive Space
        check_command           check_nt!USEDDISKSPACE!-l c -w 80 -c 90
        }

define service{
        use                     generic-service
        host_name               rdp-server
        service_description     C:\ Drive Space
        check_command           check_nt!USEDDISKSPACE!-l c -w 80 -c 90
        }

define service{
        use                     generic-service
        host_name               prints
        service_description     C:\ Drive Space
        check_command           check_nt!USEDDISKSPACE!-l c -w 80 -c 90
        }

define service{
        use                     generic-service
        host_name               tokra
        service_description     C:\ Drive Space
        check_command           check_nt!USEDDISKSPACE!-l c -w 80 -c 90
        }

define service{
        use                     generic-service
        host_name               sql
        service_description     C:\ Drive Space
        check_command           check_nt!USEDDISKSPACE!-l c -w 80 -c 90
        }

define service{
        use                     generic-service
        host_name               pablo
        service_description     C:\ Drive Space
        check_command           check_nt!USEDDISKSPACE!-l c -w 80 -c 90
        }

define service{
        use                     generic-service
        host_name               goauld
        service_description     C:\ Drive Space
        check_command           check_nt!USEDDISKSPACE!-l c -w 80 -c 90
        }

define service{
        use                     generic-service
        host_name               sgc
        service_description     C:\ Drive Space
        check_command           check_nt!USEDDISKSPACE!-l c -w 80 -c 90
        }

define service{
        use                     generic-service
        host_name               centari
        service_description     C:\ Drive Space
        check_command           check_nt!USEDDISKSPACE!-l c -w 80 -c 90
        }

define service{
        use                     generic-service
        host_name               vorlon
        service_description     C:\ Drive Space
        check_command           check_nt!USEDDISKSPACE!-l c -w 80 -c 90
        }

define service{
        use                     generic-service
        host_name               shadow
        service_description     C:\ Drive Space
        check_command           check_nt!USEDDISKSPACE!-l c -w 80 -c 90
        }

define service{
        use                     generic-service
        host_name               narn
        service_description     C:\ Drive Space
        check_command           check_nt!USEDDISKSPACE!-l c -w 80 -c 90
        }

define service{
        use                     generic-service
        host_name               ansel
        service_description     C:\ Drive Space
        check_command           check_nt!USEDDISKSPACE!-l c -w 80 -c 90
        }

define service{
        use                     generic-service
        host_name               babylon2
        service_description     C:\ Drive Space
        check_command           check_nt!USEDDISKSPACE!-l c -w 80 -c 90
        }

define service{
        use                     generic-service
        host_name               babylon3
        service_description     C:\ Drive Space
        check_command           check_nt!USEDDISKSPACE!-l c -w 80 -c 90
        }


#Create a service for monitoring the W3SVC service # Change the host_name to match the name of the host you defined above

define service{
        use                     generic-service
        host_name               drakh
        service_description     W3SVC
        check_command           check_nt!SERVICESTATE!-d SHOWALL -l W3SVC
        }

define service{
        use                     generic-service
        host_name               netmon
        service_description     W3SVC
        check_command           check_nt!SERVICESTATE!-d SHOWALL -l W3SVC
        }

define service{
        use                     generic-service
        host_name               rdp-server
        service_description     W3SVC
        check_command           check_nt!SERVICESTATE!-d SHOWALL -l W3SVC
        }

define service{
        use                     generic-service
        host_name               prints
        service_description     W3SVC
        check_command           check_nt!SERVICESTATE!-d SHOWALL -l W3SVC
        }

define service{
        use                     generic-service
        host_name               tokra 
        service_description     W3SVC
        check_command           check_nt!SERVICESTATE!-d SHOWALL -l W3SVC
        }

define service{
        use                     generic-service
        host_name               sql
        service_description     W3SVC
        check_command           check_nt!SERVICESTATE!-d SHOWALL -l W3SVC
        }

define service{
        use                     generic-service
        host_name               pablo
        service_description     W3SVC
        check_command           check_nt!SERVICESTATE!-d SHOWALL -l W3SVC
        }

define service{
        use                     generic-service
        host_name               goauld
        service_description     W3SVC
        check_command           check_nt!SERVICESTATE!-d SHOWALL -l W3SVC
        }

define service{
        use                     generic-service
        host_name               centari
        service_description     W3SVC
        check_command           check_nt!SERVICESTATE!-d SHOWALL -l W3SVC
        }

define service{
        use                     generic-service
        host_name               vorlon
        service_description     W3SVC
        check_command           check_nt!SERVICESTATE!-d SHOWALL -l W3SVC
        }



# Create a service for monitoring the Explorer.exe process # Change the host_name to match the name of the host you defined above

define service{
	use			generic-service
	host_name		ori
	service_description	Explorer
	check_command		check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
	}

define service{
        use                     generic-service
        host_name               tollan
        service_description     Explorer
        check_command           check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
        }

define service{
        use                     generic-service
        host_name               drazi
        service_description     Explorer
        check_command           check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
        }

define service{
        use                     generic-service
        host_name               drakh
        service_description     Explorer
        check_command           check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
        }

define service{
        use                     generic-service
        host_name               netmon
        service_description     Explorer
        check_command           check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
        }

define service{
        use                     generic-service
        host_name               cylon2
        service_description     Explorer
        check_command           check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
        }

define service{
        use                     generic-service
        host_name               rdp-server
        service_description     Explorer
        check_command           check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
        }

define service{
        use                     generic-service
        host_name               prints
        service_description     Explorer
        check_command           check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
        }


define service{
        use                     generic-service
        host_name               tokra
        service_description     Explorer
        check_command           check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
        }

define service{
        use                     generic-service
        host_name               sql
        service_description     Explorer
        check_command           check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
        }

define service{
        use                     generic-service
        host_name               pablo
        service_description     Explorer
        check_command           check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
        }

define service{
        use                     generic-service
        host_name               goauld
        service_description     Explorer
        check_command           check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
        }

define service{
        use                     generic-service
        host_name               sgc
        service_description     Explorer
        check_command           check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
        }

define service{
        use                     generic-service
        host_name               centari
        service_description     Explorer
        check_command           check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
        }

define service{
        use                     generic-service
        host_name               vorlon
        service_description     Explorer
        check_command           check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
        }

define service{
        use                     generic-service
        host_name               shadow
        service_description     Explorer
        check_command           check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
        }

define service{
        use                     generic-service
        host_name               narn
        service_description     Explorer
        check_command           check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
        }

define service{
        use                     generic-service
        host_name               ansel
        service_description     Explorer
        check_command           check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
        }

define service{
        use                     generic-service
        host_name               babylon2
        service_description     Explorer
        check_command           check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
	}

define service{
        use                     generic-service
        host_name               babylon3
        service_description     Explorer
        check_command           check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
        }

dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: check_ping

Post by dwhitfield »

donnyforbes wrote:If that is the case how can I be notified when a windows server goes down?
I'm not sure I understand the question. Generally speaking people have multiple configs. Here's what mine look like:

Code: Select all

[root@centos6x64 etc]# pwd
/usr/local/nagios/etc
[root@centos6x64 etc]# ll
total 192
-rw-rw-r-- 1 apache nagios   963 Jun  2 15:56 cgi.cfg
-rw-rw-r-- 1 apache nagios 25928 Jun 16 14:42 commands.cfg
-rw-rw-r-- 1 apache nagios  1106 Jun 16 14:42 contactgroups.cfg
-rw-rw-r-- 1 apache nagios  3390 Jun 16 14:42 contacts.cfg
-rw-rw-r-- 1 apache nagios  1675 Jun 16 14:42 contacttemplates.cfg
-rw-rw-r-- 1 apache nagios   817 Jun 16 14:42 hostdependencies.cfg
-rw-rw-r-- 1 apache nagios   819 Jun 16 14:42 hostescalations.cfg
-rw-rw-r-- 1 apache nagios   837 Jun 16 14:42 hostextinfo.cfg
-rw-rw-r-- 1 apache nagios   967 Jun 16 14:42 hostgroups.cfg
drwsrwsr-x 2 apache nagios  4096 Jun  7 16:02 hosts
-rw-rw-r-- 1 apache nagios 16082 Jun 16 14:42 hosttemplates.cfg
drwsrwsr-x 2 apache nagios  4096 Jun 16 14:42 import
-rwxrwxr-x 1 apache nagios  5670 Jun 16 14:42 nagios.cfg
-rw-rw-r-- 1 apache nagios  2229 Oct 28  2016 ndo2db.cfg
-rw-rw-r-- 1 apache nagios  4827 Oct 28  2016 ndomod.cfg
-rw-rw-r-- 1 apache nagios  7988 Oct 28  2016 nrpe.cfg
-rw-rw-r-- 1 apache nagios  5345 Oct 28  2016 nsca.cfg
drwxrwsr-x 4 apache nagios  4096 Jun 20 14:32 pnp
-rwxrwxr-x 1 apache nagios   210 Oct 28  2016 resource.cfg
-rw-rw-r-- 1 apache nagios  1627 Oct 28  2016 send_nsca.cfg
-rw-rw-r-- 1 apache nagios   823 Jun 16 14:42 servicedependencies.cfg
-rw-rw-r-- 1 apache nagios   825 Jun 16 14:42 serviceescalations.cfg
-rw-rw-r-- 1 apache nagios   843 Jun 16 14:42 serviceextinfo.cfg
-rw-rw-r-- 1 apache nagios   813 Jun 16 14:42 servicegroups.cfg
drwsrwsr-x 2 apache nagios  4096 May 31 12:29 services
-rw-rw-r-- 1 apache nagios 24852 Jun 16 14:42 servicetemplates.cfg
drwsrwsr-x 2 apache nagios  4096 Oct 28  2016 static
-rw-rw-r-- 1 apache nagios  5401 Jun 16 14:42 timeperiods.cfg
commands.cfg is generally just for commands, not host and service definitions.

Here's what my commands.cfg looks like:

Code: Select all

###############################################################################
#
# Check command configuration file
#
# Created by: Nagios Core Config Manager 2.6.7
# Date:       2017-06-16 14:42:48
# Version:    Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios CCM will overwrite all manual settings during the next update if you
# would like to edit files manually, place them in the 'static' directory or
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################

define command {
       command_name                             check-host-alive
       command_line                             $USER1$/check_icmp -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5
}

define command {
       command_name                             check-host-alive-http
       command_line                             $USER1$/check_http -H $HOSTADDRESS$
}

define command {
       command_name                             check-host-alive-tftp
       command_line                             tftp $HOSTNAME$ 69
}

define command {
       command_name                             check_bpi
       command_line                             /usr/bin/php $USER1$/check_bpi.php $ARG1$
}

define command {
       command_name                             check_dhcp
       command_line                             $USER1$/check_dhcp $ARG1$
}

define command {
       command_name                             check_dir
       command_line                             $USER1$/check_dir -d $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
}

define command {
       command_name                             check_dns
       command_line                             $USER1$/check_dns -H $HOSTNAME$ $ARG1$
}

define command {
       command_name                             check_dummy
       command_line                             $USER1$/check_dummy $ARG1$ $ARG2$
}

define command {
       command_name                             check_em01_humidity
       command_line                             $USER1$/check_em01.pl --type=hum --hum=$ARG1$,$ARG2$ $HOSTADDRESS$
}

define command {
       command_name                             check_em01_light
       command_line                             $USER1$/check_em01.pl --type=illum --illum=$ARG1$,$ARG2$ $HOSTADDRESS$
}

define command {
       command_name                             check_em01_temp
       command_line                             $USER1$/check_em01.pl --type=temp --temp=$ARG1$,$ARG2$ $HOSTADDRESS$
}

define command {
       command_name                             check_em08_contacts
       command_line                             $USER1$/check_em08 $HOSTADDRESS$ C
}

define command {
       command_name                             check_em08_humidity
       command_line                             $USER1$/check_em08 $HOSTADDRESS$ H $ARG1$ $ARG2$ $ARG3$
}

define command {
       command_name                             check_em08_light
       command_line                             $USER1$/check_em08 $HOSTADDRESS$ I $ARG1$ $ARG2$ $ARG3$
}

define command {
       command_name                             check_em08_rtd
       command_line                             $USER1$/check_em08 $HOSTADDRESS$ R $ARG1$ $ARG2$ $ARG3$
}

define command {
       command_name                             check_em08_temp
       command_line                             $USER1$/check_em08 $HOSTADDRESS$ T $ARG1$ $ARG2$ $ARG3$
}

define command {
       command_name                             check_em08_voltage
       command_line                             $USER1$/check_em08 $HOSTADDRESS$ V $ARG1$ $ARG2$ $ARG3$
}

define command {
       command_name                             check_email_delivery
       command_line                             $USER1$/check_email_delivery $ARG1$
}

define command {
       command_name                             check_esx3_guest
       command_line                             $USER1$/check_esx3.pl -H "$HOSTADDRESS$" -f "$ARG1$" -N "$ARG2$" -l "$ARG3$" $ARG4$
}

define command {
       command_name                             check_esx3_host
       command_line                             $USER1$/check_esx3.pl -H "$HOSTADDRESS$" -f "$ARG1$" -l "$ARG2$" $ARG3$
}

define command {
       command_name                             check_exchange_rbl
       command_line                             $USER1$/check_bl -H $HOSTADDRESS$ $ARG1$
}

define command {
       command_name                             check_file_service
       command_line                             $USER1$/folder_watch.pl $ARG1$ $ARG2$ -f
}

define command {
       command_name                             check_file_size_age
       command_line                             $USER1$/folder_watch.pl $ARG1$ $ARG2$ -f
}

define command {
       command_name                             check_ftp
       command_line                             $USER1$/check_ftp -H $HOSTADDRESS$ $ARG1$
}

define command {
       command_name                             check_ftp_fully
       command_line                             $USER1$/check_ftp_fully "$ARG1$" "$ARG2$" "$ARG3$" $HOSTNAME$
}

define command {
       command_name                             check_hpjd
       command_line                             $USER1$/check_hpjd -H $HOSTADDRESS$ $ARG1$
}

define command {
       command_name                             check_http
       command_line                             $USER1$/check_http -I $HOSTADDRESS$ $ARG1$
}

define command {
       command_name                             check_icmp
       command_line                             $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$
}

define command {
       command_name                             check_imap
       command_line                             $USER1$/check_imap -H $HOSTADDRESS$ $ARG1$
}

define command {
       command_name                             check_local_disk
       command_line                             $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
}

define command {
       command_name                             check_local_load
       command_line                             $USER1$/check_load -w $ARG1$ -c $ARG2$
}

define command {
       command_name                             check_local_mrtgtraf
       command_line                             $USER1$/check_mrtgtraf -F $ARG1$ -a $ARG2$ -w $ARG3$ -c $ARG4$ -e $ARG5$
}

define command {
       command_name                             check_local_procs
       command_line                             $USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$
}

define command {
       command_name                             check_local_swap
       command_line                             $USER1$/check_swap -w $ARG1$ -c $ARG2$
}

define command {
       command_name                             check_local_users
       command_line                             $USER1$/check_users -w $ARG1$ -c $ARG2$
}

define command {
       command_name                             check_mailserver_rbl
       command_line                             $USER1$/check_bl -H $HOSTADDRESS$ $ARG1$
}

define command {
       command_name                             check_mongodb_database
       command_line                             $USER1$/check_mongodb.py -H $HOSTADDRESS$ -A $ARG1$ -P $ARG2$ -W $ARG3$ -C $ARG4$ -u $ARG5$ -p $ARG6$ -d $ARG7$ -D
}

define command {
       command_name                             check_mongodb_server
       command_line                             $USER1$/check_mongodb.py -H $HOSTADDRESS$ -A $ARG1$ -P $ARG2$ -W $ARG3$ -C $ARG4$ -u $ARG5$ -p $ARG6$ -D --all-databases
}

define command {
       command_name                             check_mountpoint
       command_line                             $USER1$/check_mountpoints.sh $ARG1$
}

define command {
       command_name                             check_nagiosxi_performance
       command_line                             /usr/bin/php $USER1$/check_nagios_performance.php $ARG1$ $ARG2$ $ARG3$
}

define command {
       command_name                             check_nagios_performance
       command_line                             $USER1$/check_nagios_performance -o $ARG1$ $ARG2$
}

define command {
       command_name                             check_none
       command_line                             /bin/true
}

define command {
       command_name                             check_nrpe
       command_line                             $USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$
}

define command {
       command_name                             check_nrpeversion
       command_line                             $USER1$/check_nrpe -H $HOSTADDRESS$
}

define command {
       command_name                             check_nt
       command_line                             $USER1$/check_nt -H $HOSTADDRESS$ -p $USER7$ -s $USER8$ -v $ARG1$ $ARG2$
}

define command {
       command_name                             check_php_snmp_bandwidth
       command_line                             $USER1$/get_snmp.php -H=$HOSTADDRESS$ -C=$ARG1$ -2 -I=$ARG2$ -u -w=$ARG3$ -c=$ARG4$ -d=$ARG5$
}

define command {
       command_name                             check_ping
       command_line                             $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5
}

define command {
       command_name                             check_pop
       command_line                             $USER1$/check_pop -H $HOSTADDRESS$ $ARG1$
}

define command {
       command_name                             check_proc_usage
       command_line                             $USER1$/check_proc_usage -p $ARG1$ $ARG2$
}

define command {
       command_name                             check_radius_server_adv
       command_line                             $USER1$/check_radius_adv -r $HOSTADDRESS$ $ARG1$
}

define command {
       command_name                             check_smtp
       command_line                             $USER1$/check_smtp -H $HOSTADDRESS$ $ARG1$
}

define command {
       command_name                             check_snmp
       command_line                             $USER1$/check_snmp -H $HOSTADDRESS$ $ARG1$
}

define command {
       command_name                             check_snmp_int
       command_line                             $USER1$/check_snmp_int.pl -H $HOSTADDRESS$ -C $ARG1$ -2 -n $ARG2$ -f -k -w $ARG3$ -c $ARG4$ $ARG5$
}

define command {
       command_name                             check_ssh
       command_line                             $USER1$/check_ssh $ARG1$ $HOSTADDRESS$
}

define command {
       command_name                             check_tcp
       command_line                             $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$
}

define command {
       command_name                             check_tftp_connect
       command_line                             $USER1$/check_tftp.sh --connect $ARG1$
}

define command {
       command_name                             check_tftp_get
       command_line                             $USER1$/check_tftp.sh --get $ARG1$ '$ARG2$' $ARG3$
}

define command {
       command_name                             check_udp
       command_line                             $USER1$/check_udp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$
}

define command {
       command_name                             check_xi_by_ssh
       command_line                             $USER1$/check_by_ssh -H $HOSTADDRESS$ $ARG1$ $ARG2$
}

define command {
       command_name                             check_xi_deface
       command_line                             $USER1$/check_http -H $HOSTADDRESS$ -r '$ARG1$' -u '$ARG2$' $ARG3$
}

define command {
       command_name                             check_xi_domain_v2
       command_line                             $USER1$/check_domain.php -d $ARG1$ $ARG2$ $ARG3$
}

define command {
       command_name                             check_xi_host_http
       command_line                             $USER1$/check_http -H $HOSTADDRESS$ $ARG1$
}

define command {
       command_name                             check_xi_host_ping
       command_line                             $USER1$/check_icmp -H $HOSTADDRESS$ -w $ARG1$,$ARG2$ -c $ARG3$,$ARG4$ -p 5
}

define command {
       command_name                             check_xi_mssql_database
       command_line                             $USER1$/check_mssql_database.py -H $HOSTADDRESS$ $ARG1$
}

define command {
       command_name                             check_xi_mssql_query
       command_line                             $USER1$/check_mssql -H $HOSTADDRESS$ $ARG1$
}

define command {
       command_name                             check_xi_mssql_server
       command_line                             $USER1$/check_mssql_server.py -H $HOSTADDRESS$ $ARG1$
}

define command {
       command_name                             check_xi_mysql_health
       command_line                             $USER1$/check_mysql_health $ARG1$
}

define command {
       command_name                             check_xi_mysql_query
       command_line                             $USER1$/check_mysql_health $ARG1$
}

define command {
       command_name                             check_xi_nagiosxiserver
       command_line                             /usr/bin/php $USER1$/check_nagiosxiserver.php $ARG1$
}

define command {
       command_name                             check_xi_ncpa
       command_line                             $USER1$/check_ncpa.py -H $HOSTADDRESS$ $ARG1$
}

define command {
       command_name                             check_xi_ncpa_agent
       command_line                             $USER1$/check_ncpa.py -H $HOSTADDRESS$ $ARG1$
}

define command {
       command_name                             check_xi_nna
       command_line                             $USER1$/check_nna.py -H $HOSTADDRESS$ -K $ARG1$ $ARG2$
}

define command {
       command_name                             check_xi_oraclequery
       command_line                             /usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client/lib ORACLE_HOME=/usr/lib/oracle/11.2/client $USER1$/check_oracle_health $ARG1$
}

define command {
       command_name                             check_xi_oracleserverspace
       command_line                             /usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client/lib ORACLE_HOME=/usr/lib/oracle/11.2/client $USER1$/check_oracle_health $ARG1$
}

define command {
       command_name                             check_xi_oracletablespace
       command_line                             /usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client/lib ORACLE_HOME=/usr/lib/oracle/11.2/client $USER1$/check_oracle_health $ARG1$
}

define command {
       command_name                             check_xi_postgres
       command_line                             $USER1$/check_postgres.pl $ARG1$
}

define command {
       command_name                             check_xi_postgres_db
       command_line                             $USER1$/check_postgres.pl $ARG1$
}

define command {
       command_name                             check_xi_postgres_query
       command_line                             $USER1$/check_postgres.pl $ARG1$
}

define command {
       command_name                             check_xi_service_dns
       command_line                             $USER1$/check_dns -H $HOSTADDRESS$ $ARG1$
}

define command {
       command_name                             check_xi_service_dnsquery
       command_line                             $USER1$/check_dns $ARG1$
}

define command {
       command_name                             check_xi_service_ftp
       command_line                             $USER1$/check_ftp -H $HOSTADDRESS$ $ARG1$
}

define command {
       command_name                             check_xi_service_hpjd
       command_line                             $USER1$/check_hpjd -H $HOSTADDRESS$ -C $ARG1$
}

define command {
       command_name                             check_xi_service_http
       command_line                             $USER1$/check_http -H $HOSTADDRESS$ $ARG1$
}

define command {
       command_name                             check_xi_service_http_cert
       command_line                             $USER1$/check_http -H $HOSTADDRESS$ -C $ARG1$
}

define command {
       command_name                             check_xi_service_http_content
       command_line                             $USER1$/check_http -H $HOSTADDRESS$ --onredirect=follow -s "$ARG1$"
}

define command {
       command_name                             check_xi_service_ifoperstatus
       command_line                             $USER1$/check_ifoperstatus -H $HOSTADDRESS$ -C $ARG1$ -k $ARG2$ $ARG3$
}

define command {
       command_name                             check_xi_service_ifoperstatusnag
       command_line                             $USER1$/check_ifoperstatnag $ARG1$ $ARG2$ $HOSTADDRESS$
}

define command {
       command_name                             check_xi_service_imap
       command_line                             $USER1$/check_imap -H $HOSTADDRESS$ $ARG1$
}

define command {
       command_name                             check_xi_service_ldap
       command_line                             $USER1$/check_ldap -H $HOSTADDRESS$ $ARG1$
}

define command {
       command_name                             check_xi_service_mrtgtraf
       command_line                             $USER1$/check_rrdtraf -f /var/lib/mrtg/$ARG1$ -w $ARG2$ -c $ARG3$ -l $ARG4$
}

define command {
       command_name                             check_xi_service_nagioslogserver
       command_line                             $USER1$/check_nagioslogserver.php $ARG1$
}

define command {
       command_name                             check_xi_service_none
       command_line                             $USER1$/check_dummy 0 "Nothing to monitor"
}

define command {
       command_name                             check_xi_service_nsclient
       command_line                             $USER1$/check_nt -H $HOSTADDRESS$ -s "$ARG1$" -p 12489 -v $ARG2$ $ARG3$ $ARG4$
}

define command {
       command_name                             check_xi_service_ping
       command_line                             $USER1$/check_icmp -H $HOSTADDRESS$ -w $ARG1$,$ARG2$ -c $ARG3$,$ARG4$ -p 5
}

define command {
       command_name                             check_xi_service_pop
       command_line                             $USER1$/check_pop -H $HOSTADDRESS$ $ARG1$
}

define command {
       command_name                             check_xi_service_smtp
       command_line                             $USER1$/check_smtp -H $HOSTADDRESS$ $ARG1$
}

define command {
       command_name                             check_xi_service_snmp
       command_line                             $USER1$/check_snmp -H $HOSTADDRESS$ $ARG1$
}

define command {
       command_name                             check_xi_service_snmp_linux_load
       command_line                             $USER1$/check_snmp_load_wizard.pl -H $HOSTADDRESS$ $ARG1$
}

define command {
       command_name                             check_xi_service_snmp_linux_process
       command_line                             $USER1$/check_snmp_process_wizard.pl -H $HOSTADDRESS$ $ARG1$
}

define command {
       command_name                             check_xi_service_snmp_linux_storage
       command_line                             $USER1$/check_snmp_storage_wizard.pl -H $HOSTADDRESS$ $ARG1$
}

define command {
       command_name                             check_xi_service_snmp_watchguard
       command_line                             $USER1$/check_snmp_generic.pl -H $HOSTADDRESS$ $ARG1$
}

define command {
       command_name                             check_xi_service_snmp_win_load
       command_line                             $USER1$/check_snmp_load.pl -H $HOSTADDRESS$ $ARG1$
}

define command {
       command_name                             check_xi_service_snmp_win_process
       command_line                             $USER1$/check_snmp_process.pl -H $HOSTADDRESS$ $ARG1$
}

define command {
       command_name                             check_xi_service_snmp_win_service
       command_line                             $USER1$/check_snmp_win.pl -H $HOSTADDRESS$ $ARG1$
}

define command {
       command_name                             check_xi_service_snmp_win_storage
       command_line                             $USER1$/check_snmp_storage.pl -H $HOSTADDRESS$ $ARG1$
}

define command {
       command_name                             check_xi_service_ssh
       command_line                             $USER1$/check_ssh $ARG1$ $HOSTADDRESS$
}

define command {
       command_name                             check_xi_service_status
       command_line                             sudo /usr/local/nagiosxi/scripts/manage_services.sh status $ARG1$
}

define command {
       command_name                             check_xi_service_tcp
       command_line                             $USER1$/check_tcp -H $HOSTADDRESS$ $ARG1$
}

define command {
       command_name                             check_xi_service_udp
       command_line                             $USER1$/check_udp -H $HOSTADDRESS$ $ARG1$
}

define command {
       command_name                             check_xi_service_webinject
       command_line                             $USER1$/check_webinject.sh $ARG1$
}

define command {
       command_name                             check_xi_service_wmiplus
       command_line                             $USER1$/check_wmi_plus.pl -H $HOSTADDRESS$ -u $ARG1$ -p $ARG2$ -m $ARG3$ $ARG4$
}

define command {
       command_name                             check_xi_service_wmiplus_authfile
       command_line                             $USER1$/check_wmi_plus.pl -H $HOSTADDRESS$ -A $ARG1$ -m $ARG2$ $ARG3$
}

define command {
       command_name                             check_xi_sla
       command_line                             $USER1$/check_xisla.php $ARG1$
}

define command {
       command_name                             notify-host-by-email
       command_line                             /usr/bin/printf "%b" "***** Nagios Monitor XI Alert *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$
}

define command {
       command_name                             notify-service-by-email
       command_line                             /usr/bin/printf "%b" "***** Nagios Monitor XI Alert *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | /bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
}

define command {
       command_name                             process-host-perfdata-file-bulk
       command_line                             /bin/mv /usr/local/nagios/var/host-perfdata /usr/local/nagios/var/spool/xidpe/$TIMET$.perfdata.host
}

define command {
       command_name                             process-host-perfdata-file-pnp-bulk
       command_line                             /bin/mv /usr/local/nagios/var/host-perfdata /usr/local/nagios/var/spool/perfdata/host-perfdata.$TIMET$
}

define command {
       command_name                             process-host-perfdata-pnp-normal
       command_line                             /usr/bin/perl /usr/local/nagios/libexec/process_perfdata.pl -d HOSTPERFDATA
}

define command {
       command_name                             process-service-perfdata-file-bulk
       command_line                             /bin/mv /usr/local/nagios/var/service-perfdata /usr/local/nagios/var/spool/xidpe/$TIMET$.perfdata.service
}

define command {
       command_name                             process-service-perfdata-file-pnp-bulk
       command_line                             /bin/mv /usr/local/nagios/var/service-perfdata /usr/local/nagios/var/spool/perfdata/service-perfdata.$TIMET$
}

define command {
       command_name                             process-service-perfdata-pnp-normal
       command_line                             /usr/bin/perl /usr/local/nagios/libexec/process_perfdata.pl
}

define command {
       command_name                             xi_host_event_handler
       command_line                             /usr/bin/php /usr/local/nagiosxi/scripts/handle_nagioscore_event.php --handler-type=host --host="$HOSTNAME$" --hostaddress="$HOSTADDRESS$" --hoststate=$HOSTSTATE$ --hoststateid=$HOSTSTATEID$ --lasthoststate=$LASTHOSTSTATE$ --lasthoststateid=$LASTHOSTSTATEID$ --hoststatetype=$HOSTSTATETYPE$ --currentattempt=$HOSTATTEMPT$ --maxattempts=$MAXHOSTATTEMPTS$ --hosteventid=$HOSTEVENTID$ --hostproblemid=$HOSTPROBLEMID$ --hostoutput="$HOSTOUTPUT$" --longhostoutput="$LONGHOSTOUTPUT$" --hostdowntime=$HOSTDOWNTIME$
}

define command {
       command_name                             xi_host_notification_handler
       command_line                             /usr/bin/php /usr/local/nagiosxi/scripts/handle_nagioscore_notification.php --notification-type=host --contact="$CONTACTNAME$" --contactemail="$CONTACTEMAIL$" --type=$NOTIFICATIONTYPE$ --escalated="$NOTIFICATIONISESCALATED$" --author="$NOTIFICATIONAUTHOR$" --comments="$NOTIFICATIONCOMMENT$" --host="$HOSTNAME$" --hostaddress="$HOSTADDRESS$" --hostalias="$HOSTALIAS$" --hostdisplayname="$HOSTDISPLAYNAME$" --hoststate=$HOSTSTATE$ --hoststateid=$HOSTSTATEID$ --lasthoststate=$LASTHOSTSTATE$ --lasthoststateid=$LASTHOSTSTATEID$ --hoststatetype=$HOSTSTATETYPE$ --currentattempt=$HOSTATTEMPT$ --maxattempts=$MAXHOSTATTEMPTS$ --hosteventid=$HOSTEVENTID$ --hostproblemid=$HOSTPROBLEMID$ --hostoutput="$HOSTOUTPUT$" --longhostoutput="$LONGHOSTOUTPUT$" --datetime="$LONGDATETIME$"
}

define command {
       command_name                             xi_service_event_handler
       command_line                             /usr/bin/php /usr/local/nagiosxi/scripts/handle_nagioscore_event.php --handler-type=service --host="$HOSTNAME$" --service="$SERVICEDESC$" --hostaddress="$HOSTADDRESS$" --hoststate=$HOSTSTATE$ --hoststateid=$HOSTSTATEID$ --hosteventid=$HOSTEVENTID$ --hostproblemid=$HOSTPROBLEMID$ --servicestate=$SERVICESTATE$ --servicestateid=$SERVICESTATEID$ --lastservicestate=$LASTSERVICESTATE$ --lastservicestateid=$LASTSERVICESTATEID$ --servicestatetype=$SERVICESTATETYPE$ --currentattempt=$SERVICEATTEMPT$ --maxattempts=$MAXSERVICEATTEMPTS$ --serviceeventid=$SERVICEEVENTID$ --serviceproblemid=$SERVICEPROBLEMID$ --serviceoutput="$SERVICEOUTPUT$" --longserviceoutput="$LONGSERVICEOUTPUT$" --servicedowntime=$SERVICEDOWNTIME$
}

define command {
       command_name                             xi_service_notification_handler
       command_line                             /usr/bin/php /usr/local/nagiosxi/scripts/handle_nagioscore_notification.php --notification-type=service --contact="$CONTACTNAME$" --contactemail="$CONTACTEMAIL$" --type=$NOTIFICATIONTYPE$ --escalated="$NOTIFICATIONISESCALATED$" --author="$NOTIFICATIONAUTHOR$" --comments="$NOTIFICATIONCOMMENT$" --host="$HOSTNAME$" --hostaddress="$HOSTADDRESS$" --hostalias="$HOSTALIAS$" --hostdisplayname="$HOSTDISPLAYNAME$" --service="$SERVICEDESC$" --hoststate=$HOSTSTATE$ --hoststateid=$HOSTSTATEID$ --servicestate=$SERVICESTATE$ --servicestateid=$SERVICESTATEID$ --lastservicestate=$LASTSERVICESTATE$ --lastservicestateid=$LASTSERVICESTATEID$ --servicestatetype=$SERVICESTATETYPE$ --currentattempt=$SERVICEATTEMPT$ --maxattempts=$MAXSERVICEATTEMPTS$ --serviceeventid=$SERVICEEVENTID$ --serviceproblemid=$SERVICEPROBLEMID$ --serviceoutput="$SERVICEOUTPUT$" --longserviceoutput="$LONGSERVICEOUTPUT$" --datetime="$LONGDATETIME$"
}

###############################################################################
#
# Check command configuration file
#
# END OF FILE
#
###############################################################################
donnyforbes
Posts: 357
Joined: Tue Jun 13, 2017 2:17 pm

Re: check_ping

Post by donnyforbes »

you said:
That said, if you added ori to commands.cfg, and it's already in windows.cfg, that's one of your issues. Can you post the current state of both of them?

So I thought you wanted to see both command.cfg & windows.cfg file....

my question is how does nagios monitor Windows machine? I put the same code you gave me on my nagios server, however it would not start and was complianing about hosts.
See previous error. Once I removed it all worked again.\
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: check_ping

Post by lmiltchev »

my question is how does nagios monitor Windows machine?

This is a very vague question. You can ping the Windows box to check if it is UP or DOWN. You can also monitor various metrics on it. In the second case, you would need an agent installed, i.e. NCPA, NSClient++, etc. If seems like that you only want to check if the host is UP or DOWN, so the ping should be sufficient.
I put the same code you gave me on my nagios server, however it would not start and was complianing about hosts.
There is a steep learning curve with Nagios Core. If you want to learn how to configure Nagios Core, you will need to read the documentation (https://assets.nagios.com/downloads/nag ... n/toc.html), and spend some time playing with it. Copying random configs will create errors. All of the configs are interrelated. For example, you have two commands defined (your notification handlers) - notify-host-by-email and notify-service-by-email:
# 'notify-host-by-email' command definition
define command{
command_name notify-host-by-email
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$
}

# 'notify-service-by-email' command definition
define command{
command_name notify-service-by-email
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
}
however, you don't use the same commands in your contact definition...
define contact {
contact_name dforbes
alias Donny Forbes
host_notifications_enabled 1
service_notifications_enabled 1
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,u,r
service_notification_commands notify-by-email
host_notification_commands host-notify-by-email
email dforbes@allamericanasphalt.com
can_submit_commands 1
}
You need to change this to:
define contact {
contact_name dforbes
alias Donny Forbes
host_notifications_enabled 1
service_notifications_enabled 1
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,u,r
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
email dforbes@allamericanasphalt.com
can_submit_commands 1
}
Configs posted here: https://assets.nagios.com/downloads/nag ... tions.html are just examples. Your commands, templates, etc. could be named something else...

Every time you make a change to your configs, verify configuration by running:

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
If you see error, try to figure out why nagios is complaining, open the "offending" config, and fix it. Verify configuration again, until there are no more errors. Only then, you can restart nagios so that changes can take effect. Nagios cannot start/restart with configuration errors.

And really, if this is too complicated for you, I would recommend using Nagios XI instead of Nagios Core.
Be sure to check out our Knowledgebase for helpful articles and solutions!
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: check_ping

Post by dwhitfield »

Two additional things: https://assets.nagios.com/downloads/nag ... ndows.html

Most of our videos and documentation are for XI. Some of https://assets.nagios.com/downloads/nag ... ios-XI.pdf will be relevant if you choose NSClient, but the actual nagios side of things won't be.
donnyforbes
Posts: 357
Joined: Tue Jun 13, 2017 2:17 pm

Re: check_ping

Post by donnyforbes »

This is a very vague question. You can ping the Windows box to check if it is UP or DOWN. You can also monitor various metrics on it. In the second case, you would need an agent installed, i.e. NCPA, NSClient++, etc. If seems like that you only want to check if the host is UP or DOWN, so the ping should be sufficient.

YES your right I do want to check to see if the hosts is UP or DOWN, and if it is down we will need to be notified. I have installed the NSClient++ on all my windows servers.
With this, how can I set this up for it to work the way I need it to work in regards to using check ping on each hosts?
donnyforbes
Posts: 357
Joined: Tue Jun 13, 2017 2:17 pm

Re: check_ping

Post by donnyforbes »

I have a question. So are working on getting quotes for nagios XI. Do you recommend I do a new OS and fresh install of RHEL?
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: check_ping

Post by dwhitfield »

donnyforbes wrote:I have a question. So are working on getting quotes for nagios XI.


If you have a new question, you should open a new thread. It's difficult to know if you still want help with the other issue if you just tack on to a different issue.
donnyforbes wrote:Do you recommend I do a new OS and fresh install of RHEL?


You don't need to use RHEL, but you must you a fresh install of either CentOS or RHEL 6 or 7. In order to avoid EOL issues, I'd suggest 7, but if you have no familiarity with systemd, 6 may be a better option. Each organization is different in these regards.
donnyforbes
Posts: 357
Joined: Tue Jun 13, 2017 2:17 pm

Re: check_ping

Post by donnyforbes »

Ok thanks for getting back to me. If we decided to do this I will spin up a new VM with RHEL 7 on it, however did you see this quesiton?

This is a very vague question. You can ping the Windows box to check if it is UP or DOWN. You can also monitor various metrics on it. In the second case, you would need an agent installed, i.e. NCPA, NSClient++, etc. If seems like that you only want to check if the host is UP or DOWN, so the ping should be sufficient.

YES your right I do want to check to see if the hosts is UP or DOWN, and if it is down we will need to be notified. I have installed the NSClient++ on all my windows servers.
With this, how can I set this up for it to work the way I need it to work in regards to using check ping on each hosts?
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: check_ping

Post by dwhitfield »

You will need to post your new commands.cfg and windows.cfg so that we can verify the changes that were suggested on Friday.
Locked