Specify DNS
Posted: Mon Jun 24, 2013 12:59 pm
Am I able to specify certain commands to use a specific DNS Server?
Here is an example object:
define host{
use generic-ps-tp ; Inherit default values from a template
host_name Vienna PS - 1 ; The name we're giving to this switch
alias Vienna PS - 1 ; A longer name associated with the switch
address cm-0003080B4005.pkb.cascable.net ; IP address of the switch
hostgroups ps-tp-75 ; Host groups this switch is associated with
}
# Define a template for switches that we can reuse
define host{
name generic-ps-tp ; The name of this host template
use generic-host ; Inherit default values from the generic-host template
check_period 24x7 ; By default, switches are monitored round the clock
check_interval 5 ; Switches are checked every 5 minutes
retry_interval 1 ; Schedule host check retries at 1 minute intervals
max_check_attempts 10 ; Check each switch 10 times (max)
check_command check-host-alive ; Default command to check if routers are "alive"
notification_period 24x7 ; Send notifications at any time
notification_interval 30 ; Resend notifications every 30 minutes
notification_options ; Only send notifications for specific host states
contact_groups admins ; Notifications get sent to the admins by default
register 0 ; DONT REGISTER THIS - ITS JUST A TEMPLATE
}
I want them to use a different dns than the one specified in resolv.conf to run its tests, is this possible?
The error I receive when using my normal DNS is: getaddrinfo: cm-0003080B4005.pkb.cascable.net Name or service not known
(they are internal addresses so I need them to point to an internal machine for the results to come back correctly)
Here is an example object:
define host{
use generic-ps-tp ; Inherit default values from a template
host_name Vienna PS - 1 ; The name we're giving to this switch
alias Vienna PS - 1 ; A longer name associated with the switch
address cm-0003080B4005.pkb.cascable.net ; IP address of the switch
hostgroups ps-tp-75 ; Host groups this switch is associated with
}
# Define a template for switches that we can reuse
define host{
name generic-ps-tp ; The name of this host template
use generic-host ; Inherit default values from the generic-host template
check_period 24x7 ; By default, switches are monitored round the clock
check_interval 5 ; Switches are checked every 5 minutes
retry_interval 1 ; Schedule host check retries at 1 minute intervals
max_check_attempts 10 ; Check each switch 10 times (max)
check_command check-host-alive ; Default command to check if routers are "alive"
notification_period 24x7 ; Send notifications at any time
notification_interval 30 ; Resend notifications every 30 minutes
notification_options ; Only send notifications for specific host states
contact_groups admins ; Notifications get sent to the admins by default
register 0 ; DONT REGISTER THIS - ITS JUST A TEMPLATE
}
I want them to use a different dns than the one specified in resolv.conf to run its tests, is this possible?
The error I receive when using my normal DNS is: getaddrinfo: cm-0003080B4005.pkb.cascable.net Name or service not known
(they are internal addresses so I need them to point to an internal machine for the results to come back correctly)