Time saving advice
Posted: Mon Mar 23, 2015 11:12 am
I am looking for a way to save time on this. I am doing check_ping on 40 different networks is there a way I can just define this all in one line? Trying to follow this http://nagios.sourceforge.net/docs/3_0/ ... ricks.html but I have mostly everything already in groups so how would I define a group and group defs for this?
So when I try this
Error: Could not find any hostgroup matching 'Network' (config file '/usr/local/nagios/etc/objects/network.cfg', starting on line 4)
Error: Failed to process hostgroup names for host '*' (config file '/usr/local/nagios/etc/objects/network.cfg', starting at line 4)
Error processing object config files!
I'm guessing I can't use a * for host_name
So when I try this
Code: Select all
###############################################
## HOST DEFINITIONS
###############################################
define host{
use generic-network
host_name *
alias Our Network
hostgroups Network
}
################################################
## HOST GROUP DEFINITIONS
################################################
define hostgroup{
hostgroup_name Host1 10.1.1.1, Host2 10.2.2.1, Host3 10.3.3.1
alias Network
}
#################################
# This is just checking to see if the connection is alive
#################################
define service{
use generic-service
host_name Host1 10.1.1.1, Host2 10.2.2.1, Host3 10.3.3.1
service_description PING
check_command check_ping!200.0,20%!600.0,60%
normal_check_interval 1
retry_check_interval 1
}
Error: Failed to process hostgroup names for host '*' (config file '/usr/local/nagios/etc/objects/network.cfg', starting at line 4)
Error processing object config files!
I'm guessing I can't use a * for host_name