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
Free Drive Space Specific Value
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Free Drive Space Specific Value
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
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
-
swiftarcher
- Posts: 26
- Joined: Thu Feb 08, 2018 8:43 am
Re: Free Drive Space Specific Value
Hi Scott
Do I have to create a new command for every drive. i.e. C:\ D:\ E:\ F:\, etc.
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
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
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
I would yes.swiftarcher wrote:Hi Scott
Do I have to create a new command for every drive. i.e. C:\ D:\ E:\ F:\, etc.
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.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)
On line 33 starts a service define that doesn't have a host_name or service_description and you will need to fix that
-
swiftarcher
- Posts: 26
- Joined: Thu Feb 08, 2018 8:43 am
Re: Free Drive Space Specific Value
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
#
###############################################################################
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
Please paste output after clicking disk icon (not the file from the OS) here or PM so we can see it.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
It appears you have multiple issues, before it was line 33 of one file, now it is 16 of a different file
-
swiftarcher
- Posts: 26
- Joined: Thu Feb 08, 2018 8:43 am
Re: Free Drive Space Specific Value
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.
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
Are you adding a host to the service?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.