Page 1 of 1

Free Drive Space Specific Value

Posted: Thu Mar 29, 2018 6:10 am
by swiftarcher
I have the check_nrpe check_drivesize command working but I need to implement this across 600 machines.

These machines were setup with the Windows Server Configuration Wizard. But we cant work with percentage that is applied with this wizard. Some of our servers are warning on <10% and that might be 500GB left.

Is there a way I can edit this wizard to implement the check_nrpe check_drivesize so I can just set these machines up again

Re: Free Drive Space Specific Value

Posted: Thu Mar 29, 2018 10:19 am
by scottwilkerson
That wizard doesn't use check_drivesize, however you can do the following:

Go to CCM -> Bulk Modifications Tool
Select Change Command and Arguments
select the command and enter the argiments
Then select all of the services you want to make the changes to.
Click Save Changes

Re: Free Drive Space Specific Value

Posted: Tue Apr 03, 2018 2:47 am
by swiftarcher
Hi Scott

Do I have to create a new command for every drive. i.e. C:\ D:\ E:\ F:\, etc.

Re: Free Drive Space Specific Value

Posted: Tue Apr 03, 2018 3:32 am
by swiftarcher
Hi Scott

When I add a service to any single host. CCM>Services>Search Host> Add service>then save I always get this error (Attached)

Nagios XI 5.4.7

Re: Free Drive Space Specific Value

Posted: Tue Apr 03, 2018 8:41 am
by scottwilkerson
swiftarcher wrote:Hi Scott

Do I have to create a new command for every drive. i.e. C:\ D:\ E:\ F:\, etc.
I would yes.
swiftarcher wrote:When I add a service to any single host. CCM>Services>Search Host> Add service>then save I always get this error (Attached)
You will want to go to CCM -> Services select the name you blacked out form the Config Name dropdown, then click the disk icon next to any service.

On line 33 starts a service define that doesn't have a host_name or service_description and you will need to fix that

Re: Free Drive Space Specific Value

Posted: Tue Apr 03, 2018 9:46 am
by swiftarcher
Hi Scott

Still the same issue.in regards to
Error: Service has no hosts and/or service_description (config file '/usr/local/nagios/etc/services/XXXX-XXXX.cfg', starting on line 16)

Check the file and it is in there correctly

###############################################################################
#
# Service configuration file
#
# Created by: Nagios Core Config Manager 2.6.7
# Date: 2018-04-03 15:50:11
# 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 service {
host_name xxxxxxxxxx
service_description CPU Usage
use xiwizard_windowsserver_nsclient_service
check_command check_xi_service_nsclient!xxxxxxxxxxxxxx!CPULOAD!-l 5,70,85
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
notifications_enabled 0
contacts xxxxxxxxxxx
_xiwizard windowsserver
register 1
}

define service {
host_name xxxxxxxxxxxxx
service_description Memory Usage
use xiwizard_windowsserver_nsclient_service
check_command check_nrpe!CheckMEM!-a ShowAll type=physical MaxWarn=70% MaxCrit=85%!!!!!!
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
notifications_enabled 0
contacts xxxxxxxxxxx
_xiwizard windowsserver
register 1
}

define service {
host_name xxxxxxxxxxxx
service_description Ping
use xiwizard_windowsserver_ping_service
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
notifications_enabled 0
contacts xxxxxxxxxxxx
_xiwizard windowsserver
register 1
}

define service {
host_name xxxxxxxxxxxxx
service_description Uptime
use xiwizard_windowsserver_nsclient_service
check_command check_xi_service_nsclient!xxxxxxxxxxxxxxxx!UPTIME
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
notifications_enabled 0
contacts xxxxxxxxxxxxxx
_xiwizard windowsserver
register 1
}

###############################################################################
#
# Service configuration file
#
# END OF FILE
#
###############################################################################

Re: Free Drive Space Specific Value

Posted: Tue Apr 03, 2018 9:49 am
by scottwilkerson
swiftarcher wrote:Hi Scott

Still the same issue.in regards to
Error: Service has no hosts and/or service_description (config file '/usr/local/nagios/etc/services/XXXX-XXXX.cfg', starting on line 16)

Check the file and it is in there correctly
Please paste output after clicking disk icon (not the file from the OS) here or PM so we can see it.

It appears you have multiple issues, before it was line 33 of one file, now it is 16 of a different file

Re: Free Drive Space Specific Value

Posted: Tue Apr 03, 2018 10:07 am
by swiftarcher
Hi Scott

This error only comes up when I try to add a service. The system runs fine otherwise.

if I try to add a new disk service I get line 16 error then revert configuration back to known good snapshot then add a new memory service because I want Physical memory not virtual. I get line 33.

If I edit a service and change the command within that service its fine.

Re: Free Drive Space Specific Value

Posted: Tue Apr 03, 2018 11:11 am
by scottwilkerson
swiftarcher wrote:Hi Scott

This error only comes up when I try to add a service. The system runs fine otherwise.

if I try to add a new disk service I get line 16 error then revert configuration back to known good snapshot then add a new memory service because I want Physical memory not virtual. I get line 33.

If I edit a service and change the command within that service its fine.
Are you adding a host to the service?