Page 2 of 4

Re: C and D drive reporting unknown

Posted: Mon Oct 24, 2016 12:55 pm
by rbizzell39

Code: Select all

[root@splab-nagios libexec]# ./check_nt -H 172.16.0.97 -p 12489 -v USEDDISKSPACE -l c -w 80 -c 90
c:\ - total: 149.66 Gb - used: 27.69 Gb (19%) - free 121.97 Gb (81%) | 'c:\ Used Space'=27.69Gb;119.72;134.69;0.00;149.66

Code: Select all

[root@splab-nagios libexec]# ./check_nt -H 172.16.0.97 -p 12489 -v USEDDISKSPACE -l d -w 80 -c 90
d:\ - total: 4095.87 Gb - used: 799.24 Gb (20%) - free 3296.63 Gb (80%) | 'd:\ Used Space'=799.24Gb;3276.70;3686.29;0.00;4095.87

Code: Select all

[root@splab-nagios libexec]# ./check_nt -H 172.16.0.94 -p 12489 -v USEDDISKSPACE -l d -w 80 -c 90
d:\ - total: 3993.47 Gb - used: 3527.43 Gb (88%) - free 466.05 Gb (12%) | 'd:\ Used Space'=3527.43Gb;3194.78;3594.13;0.00;3993.47

Code: Select all

[root@splab-nagios libexec]# ./check_nt -H 172.16.0.94 -p 12489 -v USEDDISKSPACE -l c -w 80 -c 90
c:\ - total: 59.66 Gb - used: 35.30 Gb (59%) - free 24.36 Gb (41%) | 'c:\ Used Space'=35.30Gb;47.72;53.69;0.00;59.66
all of them except the one that was green

Code: Select all

 LOCALHOST.CFG - SAMPLE OBJECT CONFIG FILE FOR MONITORING THIS MACHINE
#
#
# NOTE: This config file is intended to serve as an *extremely* simple
#       example of how you can create configuration entries to monitor
#       the local (Linux) machine.
#
###############################################################################




###############################################################################
###############################################################################
#
# HOST DEFINITION
#
###############################################################################
###############################################################################

# Define a host for the local machine

define host{
        use                     linux-server
        host_name               localhost
        alias                   localhost
        address                 127.0.0.1
        }

define host{
        use                     linux-server
        host_name               Ubuntu1404_QA
        alias                   Ubuntu1404_QA
        address                 172.16.2.178
        }

###############################################################################
###############################################################################
#
# HOST GROUP DEFINITION
#
###############################################################################
###############################################################################

# Define an optional hostgroup for Linux machines

define hostgroup{
        hostgroup_name  linux-servers ; The name of the hostgroup
        alias           Linux Servers ; Long name of the group
        members         localhost,Ubunttu1404_QA     ; Comma separated list of hosts that belong to this group
        }



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


# Define a service to "ping" the local machine

define service{
        use                             local-service         ; Name of service template to use
        host_name                       localhost
        service_description             PING
        check_command                   check_ping!100.0,20%!500.0,60%
        }


define service{
        use                              local-service
        host_name                        Ubuntu1404_QA
        service_description              PING
        check_command                    check_ping!100.0,20%!500.0,60%
        }

# Define a service to check the disk space of the root partition
# on the local machine.  Warning if < 20% free, critical if
# < 10% free space on partition.

define service{
        use                             local-service         ; Name of service template to use
        host_name                       localhost
        service_description             Root Partition
        check_command                   check_local_disk!20%!10%!/
        }



# Define a service to check the number of currently logged in
# users on the local machine.  Warning if > 20 users, critical
# if > 50 users.

define service{
        use                             local-service         ; Name of service template to use
        host_name                       localhost
        service_description             Current Users
        check_command                   check_local_users!20!50
        }


# Define a service to check the number of currently running procs
# on the local machine.  Warning if > 250 processes, critical if
# > 400 users.

define service{
        use                             local-service         ; Name of service template to use
        host_name                       localhost
        service_description             Total Processes
        check_command                   check_local_procs!250!400!RSZDT
        }



# Define a service to check the load on the local machine.

define service{
        use                             local-service         ; Name of service template to use
        host_name                       localhost
        service_description             Current Load
        check_command                   check_local_load!5.0,4.0,3.0!10.0,6.0,4.0
        }



# Define a service to check the swap usage the local machine.
# Critical if less than 10% of swap is free, warning if less than 20% is free

define service{
        use                             local-service         ; Name of service template to use
        host_name                       localhost
        service_description             Swap Usage
        check_command                   check_local_swap!20!10
        }



# Define a service to check SSH on the local machine.
# Disable notifications for this service by default, as not all users may have SSH enabled.

define service{
        use                             local-service         ; Name of service template to use
        host_name                       localhost
        service_description             SSH
        check_command                   check_ssh
        notifications_enabled           0
        }



# Define a service to check HTTP on the local machine.
# Disable notifications for this service by default, as not all users may have HTTP enabled.

define service{
        use                             local-service         ; Name of service template to use
        host_name                       localhost
        service_description             HTTP
        check_command                   check_http
        notifications_enabled           0
        }
is this the file your are talking about

Re: C and D drive reporting unknown

Posted: Mon Oct 24, 2016 3:53 pm
by dwhitfield
/usr/local/nagios/var/objects.cache should be in that location in the standard core install. If you are using repos, all bets are off.

That said, the file should start with the below:

Code: Select all

########################################
#       NAGIOS OBJECT CACHE FILE
#
# THIS FILE IS AUTOMATICALLY GENERATED
# BY NAGIOS.  DO NOT MODIFY THIS FILE!
#
# Created: Mon Oct 24 08:22:20 2016
########################################

Re: C and D drive reporting unknown

Posted: Tue Oct 25, 2016 8:12 am
by rbizzell39

Code: Select all

########################################
#       NAGIOS OBJECT CACHE FILE
#
# THIS FILE IS AUTOMATICALLY GENERATED
# BY NAGIOS.  DO NOT MODIFY THIS FILE!
#
# Created: Mon Sep 26 14:58:27 2016
########################################

define timeperiod {
	timeperiod_name	24x7
	alias	24 Hours A Day, 7 Days A Week
	sunday	00:00-24:00
	monday	00:00-24:00
	tuesday	00:00-24:00
	wednesday	00:00-24:00
	thursday	00:00-24:00
	friday	00:00-24:00
	saturday	00:00-24:00
	}

define timeperiod {
	timeperiod_name	24x7_sans_holidays
	alias	24x7 Sans Holidays
	december 25	00:00-00:00
	july 4	00:00-00:00
	january 1	00:00-00:00
	thursday 4 november	00:00-00:00
	monday 1 september	00:00-00:00
	monday -1 may	00:00-00:00
	sunday	00:00-24:00
	monday	00:00-24:00
	tuesday	00:00-24:00
	wednesday	00:00-24:00
	thursday	00:00-24:00
	friday	00:00-24:00
	saturday	00:00-24:00
	}

define timeperiod {
	timeperiod_name	none
	alias	No Time Is A Good Time
	}

define timeperiod {
	timeperiod_name	us-holidays
	alias	U.S. Holidays
	january 1	00:00-00:00
	july 4	00:00-00:00
	december 25	00:00-00:00
	monday -1 may	00:00-00:00
	monday 1 september	00:00-00:00
	thursday 4 november	00:00-00:00
	}

define timeperiod {
	timeperiod_name	workhours
	alias	Normal Work Hours
	monday	09:00-17:00
	tuesday	09:00-17:00
	wednesday	09:00-17:00
	thursday	09:00-17:00
	friday	09:00-17:00
	}

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

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

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

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_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_nt
	command_line	$USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -v $ARG1$ $ARG2$
	}

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_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_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_udp
	command_line	$USER1$/check_udp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$
	}

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" | /usr/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 *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
	}

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
	}

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
	}

define contactgroup {
	contactgroup_name	admins
	alias	Nagios Administrators
	members	nagiosadmin
	}

define hostgroup {
	hostgroup_name	linux-servers
	alias	Linux Servers
	members	localhost
	}

define hostgroup {
	hostgroup_name	windows-servers
	alias	Windows Servers
	members	SPLAB2K12DC01,q-peg-db-w51,q-peg-web-w52
	}

define contact {
	contact_name	nagiosadmin
	alias	Nagios Admin
	service_notification_period	24x7
	host_notification_period	24x7
	service_notification_options	r,w,u,c,f,s
	host_notification_options	r,d,u,f,s
	service_notification_commands	notify-service-by-email
	host_notification_commands	notify-host-by-email
	email	[email protected],[email protected]
	minimum_importance	0
	host_notifications_enabled	1
	service_notifications_enabled	1
	can_submit_commands	1
	retain_status_information	1
	retain_nonstatus_information	1
	}

define host {
	host_name	SPLAB2K12DC01
	alias	SPLAB2K12DC01
	address	172.16.0.10
	check_period	24x7
	check_command	check-host-alive
	contact_groups	admins
	notification_period	24x7
	initial_state	o
	importance	0
	check_interval	5.000000
	retry_interval	1.000000
	max_check_attempts	10
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,d
	notifications_enabled	1
	notification_interval	30.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	retain_status_information	1
	retain_nonstatus_information	1
	}

define host {
	host_name	Ubuntu1404_QA
	alias	Ubuntu1404_QA
	address	172.16.2.178
	check_period	24x7
	check_command	check-host-alive
	contact_groups	admins
	notification_period	workhours
	initial_state	o
	importance	0
	check_interval	5.000000
	retry_interval	1.000000
	max_check_attempts	10
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,d,u
	notifications_enabled	1
	notification_interval	120.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	retain_status_information	1
	retain_nonstatus_information	1
	}

define host {
	host_name	localhost
	alias	localhost
	address	127.0.0.1
	check_period	24x7
	check_command	check-host-alive
	contact_groups	admins
	notification_period	workhours
	initial_state	o
	importance	0
	check_interval	5.000000
	retry_interval	1.000000
	max_check_attempts	10
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,d,u
	notifications_enabled	1
	notification_interval	120.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	retain_status_information	1
	retain_nonstatus_information	1
	}

define host {
	host_name	q-peg-db-w51
	alias	q-peg-db-w51
	address	172.16.2.171
	check_period	24x7
	check_command	check-host-alive
	contact_groups	admins
	notification_period	24x7
	initial_state	o
	importance	0
	check_interval	5.000000
	retry_interval	1.000000
	max_check_attempts	10
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,d
	notifications_enabled	1
	notification_interval	30.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	retain_status_information	1
	retain_nonstatus_information	1
	}

define host {
	host_name	q-peg-web-w52
	alias	q-peg-web-w52
	address	172.16.2.169
	check_period	24x7
	check_command	check-host-alive
	contact_groups	admins
	notification_period	24x7
	initial_state	o
	importance	0
	check_interval	5.000000
	retry_interval	1.000000
	max_check_attempts	10
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,d
	notifications_enabled	1
	notification_interval	30.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	retain_status_information	1
	retain_nonstatus_information	1
	}

define service {
	host_name	SPLAB2K12DC01
	service_description	C:\ Drive Space
	check_period	24x7
	check_command	check_nt!USEDDISKSPACE!-l c -w 80 -c 90
	contact_groups	admins
	notification_period	24x7
	initial_state	o
	importance	0
	check_interval	10.000000
	retry_interval	2.000000
	max_check_attempts	3
	is_volatile	0
	parallelize_check	1
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,w,u,c
	notifications_enabled	1
	notification_interval	60.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	retain_status_information	1
	retain_nonstatus_information	1
	}

define service {
	host_name	SPLAB2K12DC01
	service_description	CPU Load
	check_period	24x7
	check_command	check_nt!CPULOAD!-l 5,80,90
	contact_groups	admins
	notification_period	24x7
	initial_state	o
	importance	0
	check_interval	10.000000
	retry_interval	2.000000
	max_check_attempts	3
	is_volatile	0
	parallelize_check	1
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,w,u,c
	notifications_enabled	1
	notification_interval	60.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	retain_status_information	1
	retain_nonstatus_information	1
	}

define service {
	host_name	SPLAB2K12DC01
	service_description	Explorer
	check_period	24x7
	check_command	check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
	contact_groups	admins
	notification_period	24x7
	initial_state	o
	importance	0
	check_interval	10.000000
	retry_interval	2.000000
	max_check_attempts	3
	is_volatile	0
	parallelize_check	1
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,w,u,c
	notifications_enabled	1
	notification_interval	60.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	retain_status_information	1
	retain_nonstatus_information	1
	}

define service {
	host_name	SPLAB2K12DC01
	service_description	Memory Usage
	check_period	24x7
	check_command	check_nt!MEMUSE!-w 80 -c 90
	contact_groups	admins
	notification_period	24x7
	initial_state	o
	importance	0
	check_interval	10.000000
	retry_interval	2.000000
	max_check_attempts	3
	is_volatile	0
	parallelize_check	1
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,w,u,c
	notifications_enabled	1
	notification_interval	60.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	retain_status_information	1
	retain_nonstatus_information	1
	}

define service {
	host_name	SPLAB2K12DC01
	service_description	NSClient++ 0.4.1.73 Version
	check_period	24x7
	check_command	check_nt!CLIENTVERSION
	contact_groups	admins
	notification_period	24x7
	initial_state	o
	importance	0
	check_interval	10.000000
	retry_interval	2.000000
	max_check_attempts	3
	is_volatile	0
	parallelize_check	1
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,w,u,c
	notifications_enabled	1
	notification_interval	60.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	retain_status_information	1
	retain_nonstatus_information	1
	}

define service {
	host_name	SPLAB2K12DC01
	service_description	Uptime
	check_period	24x7
	check_command	check_nt!UPTIME
	contact_groups	admins
	notification_period	24x7
	initial_state	o
	importance	0
	check_interval	10.000000
	retry_interval	2.000000
	max_check_attempts	3
	is_volatile	0
	parallelize_check	1
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,w,u,c
	notifications_enabled	1
	notification_interval	60.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	retain_status_information	1
	retain_nonstatus_information	1
	}

define service {
	host_name	SPLAB2K12DC01
	service_description	W3SVC
	check_period	24x7
	check_command	check_nt!SERVICESTATE!-d SHOWALL -l W3SVC
	contact_groups	admins
	notification_period	24x7
	initial_state	o
	importance	0
	check_interval	10.000000
	retry_interval	2.000000
	max_check_attempts	3
	is_volatile	0
	parallelize_check	1
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,w,u,c
	notifications_enabled	1
	notification_interval	60.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	retain_status_information	1
	retain_nonstatus_information	1
	}

define service {
	host_name	Ubuntu1404_QA
	service_description	PING
	check_period	24x7
	check_command	check_ping!100.0,20%!500.0,60%
	contact_groups	admins
	notification_period	24x7
	initial_state	o
	importance	0
	check_interval	5.000000
	retry_interval	1.000000
	max_check_attempts	4
	is_volatile	0
	parallelize_check	1
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,w,u,c
	notifications_enabled	1
	notification_interval	60.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	retain_status_information	1
	retain_nonstatus_information	1
	}

define service {
	host_name	localhost
	service_description	Current Load
	check_period	24x7
	check_command	check_local_load!5.0,4.0,3.0!10.0,6.0,4.0
	contact_groups	admins
	notification_period	24x7
	initial_state	o
	importance	0
	check_interval	5.000000
	retry_interval	1.000000
	max_check_attempts	4
	is_volatile	0
	parallelize_check	1
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,w,u,c
	notifications_enabled	1
	notification_interval	60.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	retain_status_information	1
	retain_nonstatus_information	1
	}

define service {
	host_name	localhost
	service_description	Current Users
	check_period	24x7
	check_command	check_local_users!20!50
	contact_groups	admins
	notification_period	24x7
	initial_state	o
	importance	0
	check_interval	5.000000
	retry_interval	1.000000
	max_check_attempts	4
	is_volatile	0
	parallelize_check	1
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,w,u,c
	notifications_enabled	1
	notification_interval	60.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	retain_status_information	1
	retain_nonstatus_information	1
	}

define service {
	host_name	localhost
	service_description	HTTP
	check_period	24x7
	check_command	check_http
	contact_groups	admins
	notification_period	24x7
	initial_state	o
	importance	0
	check_interval	5.000000
	retry_interval	1.000000
	max_check_attempts	4
	is_volatile	0
	parallelize_check	1
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,w,u,c
	notifications_enabled	0
	notification_interval	60.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	retain_status_information	1
	retain_nonstatus_information	1
	}

define service {
	host_name	localhost
	service_description	PING
	check_period	24x7
	check_command	check_ping!100.0,20%!500.0,60%
	contact_groups	admins
	notification_period	24x7
	initial_state	o
	importance	0
	check_interval	5.000000
	retry_interval	1.000000
	max_check_attempts	4
	is_volatile	0
	parallelize_check	1
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,w,u,c
	notifications_enabled	1
	notification_interval	60.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	retain_status_information	1
	retain_nonstatus_information	1
	}

define service {
	host_name	localhost
	service_description	Root Partition
	check_period	24x7
	check_command	check_local_disk!20%!10%!/
	contact_groups	admins
	notification_period	24x7
	initial_state	o
	importance	0
	check_interval	5.000000
	retry_interval	1.000000
	max_check_attempts	4
	is_volatile	0
	parallelize_check	1
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,w,u,c
	notifications_enabled	1
	notification_interval	60.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	retain_status_information	1
	retain_nonstatus_information	1
	}

define service {
	host_name	localhost
	service_description	SSH
	check_period	24x7
	check_command	check_ssh
	contact_groups	admins
	notification_period	24x7
	initial_state	o
	importance	0
	check_interval	5.000000
	retry_interval	1.000000
	max_check_attempts	4
	is_volatile	0
	parallelize_check	1
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,w,u,c
	notifications_enabled	0
	notification_interval	60.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	retain_status_information	1
	retain_nonstatus_information	1
	}

define service {
	host_name	localhost
	service_description	Swap Usage
	check_period	24x7
	check_command	check_local_swap!20!10
	contact_groups	admins
	notification_period	24x7
	initial_state	o
	importance	0
	check_interval	5.000000
	retry_interval	1.000000
	max_check_attempts	4
	is_volatile	0
	parallelize_check	1
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,w,u,c
	notifications_enabled	1
	notification_interval	60.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	retain_status_information	1
	retain_nonstatus_information	1
	}

define service {
	host_name	localhost
	service_description	Total Processes
	check_period	24x7
	check_command	check_local_procs!250!400!RSZDT
	contact_groups	admins
	notification_period	24x7
	initial_state	o
	importance	0
	check_interval	5.000000
	retry_interval	1.000000
	max_check_attempts	4
	is_volatile	0
	parallelize_check	1
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,w,u,c
	notifications_enabled	1
	notification_interval	60.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	retain_status_information	1
	retain_nonstatus_information	1
	}

define service {
	host_name	q-peg-db-w51
	service_description	C:\ Drive Space
	check_period	24x7
	check_command	check_nt!USEDDISKSPACE!-l c -w 80 -c 90
	contact_groups	admins
	notification_period	24x7
	initial_state	o
	importance	0
	check_interval	10.000000
	retry_interval	2.000000
	max_check_attempts	3
	is_volatile	0
	parallelize_check	1
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,w,u,c
	notifications_enabled	1
	notification_interval	60.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	retain_status_information	1
	retain_nonstatus_information	1
	}

define service {
	host_name	q-peg-db-w51
	service_description	CPU Load
	check_period	24x7
	check_command	check_nt!CPULOAD!-l 5,80,90
	contact_groups	admins
	notification_period	24x7
	initial_state	o
	importance	0
	check_interval	10.000000
	retry_interval	2.000000
	max_check_attempts	3
	is_volatile	0
	parallelize_check	1
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,w,u,c
	notifications_enabled	1
	notification_interval	60.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	retain_status_information	1
	retain_nonstatus_information	1
	}

define service {
	host_name	q-peg-db-w51
	service_description	Explorer
	check_period	24x7
	check_command	check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
	contact_groups	admins
	notification_period	24x7
	initial_state	o
	importance	0
	check_interval	10.000000
	retry_interval	2.000000
	max_check_attempts	3
	is_volatile	0
	parallelize_check	1
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,w,u,c
	notifications_enabled	1
	notification_interval	60.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	retain_status_information	1
	retain_nonstatus_information	1
	}

define service {
	host_name	q-peg-db-w51
	service_description	Memory Usage
	check_period	24x7
	check_command	check_nt!MEMUSE!-w 80 -c 90
	contact_groups	admins
	notification_period	24x7
	initial_state	o
	importance	0
	check_interval	10.000000
	retry_interval	2.000000
	max_check_attempts	3
	is_volatile	0
	parallelize_check	1
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,w,u,c
	notifications_enabled	1
	notification_interval	60.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	retain_status_information	1
	retain_nonstatus_information	1
	}

define service {
	host_name	q-peg-db-w51
	service_description	NSClient++ 0.4.1.73 Version
	check_period	24x7
	check_command	check_nt!CLIENTVERSION
	contact_groups	admins
	notification_period	24x7
	initial_state	o
	importance	0
	check_interval	10.000000
	retry_interval	2.000000
	max_check_attempts	3
	is_volatile	0
	parallelize_check	1
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,w,u,c
	notifications_enabled	1
	notification_interval	60.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	retain_status_information	1
	retain_nonstatus_information	1
	}

define service {
	host_name	q-peg-db-w51
	service_description	Uptime
	check_period	24x7
	check_command	check_nt!UPTIME
	contact_groups	admins
	notification_period	24x7
	initial_state	o
	importance	0
	check_interval	10.000000
	retry_interval	2.000000
	max_check_attempts	3
	is_volatile	0
	parallelize_check	1
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,w,u,c
	notifications_enabled	1
	notification_interval	60.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	retain_status_information	1
	retain_nonstatus_information	1
	}

define service {
	host_name	q-peg-db-w51
	service_description	W3SVC
	check_period	24x7
	check_command	check_nt!SERVICESTATE!-d SHOWALL -l W3SVC
	contact_groups	admins
	notification_period	24x7
	initial_state	o
	importance	0
	check_interval	10.000000
	retry_interval	2.000000
	max_check_attempts	3
	is_volatile	0
	parallelize_check	1
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,w,u,c
	notifications_enabled	1
	notification_interval	60.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	retain_status_information	1
	retain_nonstatus_information	1
	}

define service {
	host_name	q-peg-web-w52
	service_description	C:\ Drive Space
	check_period	24x7
	check_command	check_nt!USEDDISKSPACE!-l c -w 80 -c 90
	contact_groups	admins
	notification_period	24x7
	initial_state	o
	importance	0
	check_interval	10.000000
	retry_interval	2.000000
	max_check_attempts	3
	is_volatile	0
	parallelize_check	1
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,w,u,c
	notifications_enabled	1
	notification_interval	60.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	retain_status_information	1
	retain_nonstatus_information	1
	}

define service {
	host_name	q-peg-web-w52
	service_description	CPU Load
	check_period	24x7
	check_command	check_nt!CPULOAD!-l 5,80,90
	contact_groups	admins
	notification_period	24x7
	initial_state	o
	importance	0
	check_interval	10.000000
	retry_interval	2.000000
	max_check_attempts	3
	is_volatile	0
	parallelize_check	1
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,w,u,c
	notifications_enabled	1
	notification_interval	60.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	retain_status_information	1
	retain_nonstatus_information	1
	}

define service {
	host_name	q-peg-web-w52
	service_description	Explorer
	check_period	24x7
	check_command	check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
	contact_groups	admins
	notification_period	24x7
	initial_state	o
	importance	0
	check_interval	10.000000
	retry_interval	2.000000
	max_check_attempts	3
	is_volatile	0
	parallelize_check	1
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,w,u,c
	notifications_enabled	1
	notification_interval	60.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	retain_status_information	1
	retain_nonstatus_information	1
	}

define service {
	host_name	q-peg-web-w52
	service_description	Memory Usage
	check_period	24x7
	check_command	check_nt!MEMUSE!-w 80 -c 90
	contact_groups	admins
	notification_period	24x7
	initial_state	o
	importance	0
	check_interval	10.000000
	retry_interval	2.000000
	max_check_attempts	3
	is_volatile	0
	parallelize_check	1
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,w,u,c
	notifications_enabled	1
	notification_interval	60.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	retain_status_information	1
	retain_nonstatus_information	1
	}

define service {
	host_name	q-peg-web-w52
	service_description	NSClient++ 0.4.1.73 Version
	check_period	24x7
	check_command	check_nt!CLIENTVERSION
	contact_groups	admins
	notification_period	24x7
	initial_state	o
	importance	0
	check_interval	10.000000
	retry_interval	2.000000
	max_check_attempts	3
	is_volatile	0
	parallelize_check	1
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,w,u,c
	notifications_enabled	1
	notification_interval	60.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	retain_status_information	1
	retain_nonstatus_information	1
	}

define service {
	host_name	q-peg-web-w52
	service_description	Uptime
	check_period	24x7
	check_command	check_nt!UPTIME
	contact_groups	admins
	notification_period	24x7
	initial_state	o
	importance	0
	check_interval	10.000000
	retry_interval	2.000000
	max_check_attempts	3
	is_volatile	0
	parallelize_check	1
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,w,u,c
	notifications_enabled	1
	notification_interval	60.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	retain_status_information	1
	retain_nonstatus_information	1
	}

define service {
	host_name	q-peg-web-w52
	service_description	W3SVC
	check_period	24x7
	check_command	check_nt!SERVICESTATE!-d SHOWALL -l W3SVC
	contact_groups	admins
	notification_period	24x7
	initial_state	o
	importance	0
	check_interval	10.000000
	retry_interval	2.000000
	max_check_attempts	3
	is_volatile	0
	parallelize_check	1
	active_checks_enabled	1
	passive_checks_enabled	1
	obsess	1
	event_handler_enabled	1
	low_flap_threshold	0.000000
	high_flap_threshold	0.000000
	flap_detection_enabled	1
	flap_detection_options	a
	freshness_threshold	0
	check_freshness	0
	notification_options	r,w,u,c
	notifications_enabled	1
	notification_interval	60.000000
	first_notification_delay	0.000000
	stalking_options	n
	process_perf_data	1
	retain_status_information	1
	retain_nonstatus_information	1
	}

Re: C and D drive reporting unknown

Posted: Tue Oct 25, 2016 1:06 pm
by dwhitfield
Can you run all those commands again as the nagios user and report the output here? Thanks!

Re: C and D drive reporting unknown

Posted: Tue Oct 25, 2016 11:43 pm
by rbizzell39
Which command in the objects.cache file?

Re: C and D drive reporting unknown

Posted: Wed Oct 26, 2016 9:12 am
by dwhitfield
These are the four commands:

Code: Select all

    [root@splab-nagios libexec]# ./check_nt -H 172.16.0.97 -p 12489 -v USEDDISKSPACE -l c -w 80 -c 90
    c:\ - total: 149.66 Gb - used: 27.69 Gb (19%) - free 121.97 Gb (81%) | 'c:\ Used Space'=27.69Gb;119.72;134.69;0.00;149.66


    [root@splab-nagios libexec]# ./check_nt -H 172.16.0.97 -p 12489 -v USEDDISKSPACE -l d -w 80 -c 90
    d:\ - total: 4095.87 Gb - used: 799.24 Gb (20%) - free 3296.63 Gb (80%) | 'd:\ Used Space'=799.24Gb;3276.70;3686.29;0.00;4095.87



    [root@splab-nagios libexec]# ./check_nt -H 172.16.0.94 -p 12489 -v USEDDISKSPACE -l d -w 80 -c 90
    d:\ - total: 3993.47 Gb - used: 3527.43 Gb (88%) - free 466.05 Gb (12%) | 'd:\ Used Space'=3527.43Gb;3194.78;3594.13;0.00;3993.47


    [root@splab-nagios libexec]# ./check_nt -H 172.16.0.94 -p 12489 -v USEDDISKSPACE -l c -w 80 -c 90
    c:\ - total: 59.66 Gb - used: 35.30 Gb (59%) - free 24.36 Gb (41%) | 'c:\ Used Space'=35.30Gb;47.72;53.69;0.00;59.66
To run them as the nagios user, use su nagios before running the commands.

Re: C and D drive reporting unknown

Posted: Wed Oct 26, 2016 10:13 am
by rbizzell39
[nagios@splab-nagios root]$ ./check_nt -H 172.16.0.97 -p 12489 -v USEDDISKSPACE -l c -w 80 -c 90
bash: ./check_nt: Permission denied
[nagios@splab-nagios root]$ ./check_nt -H 172.16.0.97 -p 12489 -v USEDDISKSPACE -l d -w 80 -c 90
bash: ./check_nt: Permission denied
[nagios@splab-nagios root]$ ./check_nt -H 172.16.0.94 -p 12489 -v USEDDISKSPACE -l d -w 80 -c 90
bash: ./check_nt: Permission denied

Re: C and D drive reporting unknown

Posted: Wed Oct 26, 2016 11:59 am
by dwhitfield
ok, let's make nagios the owner: chown nagios:nagios /PATHTOFILE/check_nt

Let us know if that fixes the issue for you.

Re: C and D drive reporting unknown

Posted: Wed Oct 26, 2016 12:19 pm
by rbizzell39
when you say path of file are you talking about check_nt

Re: C and D drive reporting unknown

Posted: Wed Oct 26, 2016 12:23 pm
by dwhitfield
yes, it looks like that is probably /root/check_nt