Free Drive Space Specific Value

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
swiftarcher
Posts: 26
Joined: Thu Feb 08, 2018 8:43 am

Free Drive Space Specific Value

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Free Drive Space Specific Value

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
swiftarcher
Posts: 26
Joined: Thu Feb 08, 2018 8:43 am

Re: Free Drive Space Specific Value

Post by swiftarcher »

Hi Scott

Do I have to create a new command for every drive. i.e. C:\ D:\ E:\ F:\, etc.
swiftarcher
Posts: 26
Joined: Thu Feb 08, 2018 8:43 am

Re: Free Drive Space Specific Value

Post 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
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Free Drive Space Specific Value

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
swiftarcher
Posts: 26
Joined: Thu Feb 08, 2018 8:43 am

Re: Free Drive Space Specific Value

Post 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
#
###############################################################################
Last edited by swiftarcher on Tue Apr 03, 2018 9:53 am, edited 1 time in total.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Free Drive Space Specific Value

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
swiftarcher
Posts: 26
Joined: Thu Feb 08, 2018 8:43 am

Re: Free Drive Space Specific Value

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Free Drive Space Specific Value

Post 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?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked