hey, I'm sorry, I'm just getting back to my Nagios, was pulled off for a bit.
looks like I still need your help
. thank you
I am able to get the host defined and is on the Nagios Web console. but, I can't get services associated with the new host. I know I'm doing something wrong.
I made new templates
TEMPLATE.cfg
define host {
name
cloud-hosting ; The name of this host template
use generic-host ; This template inherits other values from the generic-host template
check_period 24x7 ; By default, Linux hosts are checked round the clock
check_interval 5 ; Actively check the host every 5 minutes
retry_interval 1 ; Schedule host check retries at 1 minute intervals
max_check_attempts 10 ; Check each Linux host 10 times (max)
check_command check-host-alive ; Default command to check Linux hosts
notification_period workhours ; Linux admins hate to be woken up, so we only notify during the day
; Note that the notification_period variable is being overridden from
; the value that is inherited from the generic-host template!
notification_interval 60 ; Resend notifications every 2 hours
notification_options d,u,r ; Only send notifications for specific host states
contact_groups cloud-group ; Notifications get sent to the admins by default
register 0 ; DON'T REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
}
SERVICE TEMPLATE
define service {
name generic-cloud-service ; The 'name' of this service template
active_checks_enabled 1 ; Active service checks are enabled
passive_checks_enabled 1 ; Passive service checks are enabled/accepted
parallelize_check 1 ; Active service checks should be parallelized (disabling this can lead to major performance problems)
obsess_over_service 1 ; We should obsess over this service (if necessary)
check_freshness 0 ; Default is to NOT check service 'freshness'
notifications_enabled 1 ; Service notifications are enabled
event_handler_enabled 1 ; Service event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
is_volatile 0 ; The service is not volatile
check_period 24x7 ; The service can be checked at any time of the day
max_check_attempts 3 ; Re-check the service up to 3 times in order to determine its final (hard) state
check_interval 10 ; Check the service every 10 minutes under normal conditions
retry_interval 2 ; Re-check the service every two minutes until a hard state can be determined
contact_groups cloud-group ; Notifications get sent out to everyone in the 'admins' group
notification_options c,r ; Send notifications about warning, unknown, critical, and recovery events
notification_interval 60 ; Re-notify about service problems every hour
notification_period 24x7 ; Notifications can be sent out at any time
register 0 ; DON'T REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
}
define service {
name local-cloud-service ; The name of this service template
use generic-cloud-service ; Inherit default values from the generic-service definition
max_check_attempts 4 ; Re-check the service up to 4 times in order to determine its final (hard) state
check_interval 5 ; Check the service every 5 minutes under normal conditions
retry_interval 1 ; Re-check the service every minute until a hard state can be determined
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
}
HOSTS.cfg
define host{
name cloud-box ; Name of this template
use cloud-hosting ; Inherit default values
check_period 24x7
check_interval 5
retry_interval 1
max_check_attempts 10
check_command check-host-alive
notification_period 24x7
notification_interval 30
notification_options d,r
contact_groups cloud-group
process_perf_data 1
retain_nonstatus_information 0
register 0 ; DONT REGISTER THIS - ITS A TEMPLATE
}
define host{
use cloud-box ; Inherit default values from a template
host_name api-hosting ; The name we're giving to this server
alias API Services server ; A longer name for the server
address 127.0.0.1 ; dummy ping
}
The HOST is a dummy, the plugin calls AWS AZure cloud environments.
SERVICES.cfg
#Job reporting service
define service{
use local-cloud-service
host_name api-hosting
service_description Job MGMT Service
check_command check_api_cloud_service!
https://a8a2ffc4-b04e-4ec1-bfed-7a51dd4 ... .io/health!
notifications_enabled 0
}
#Case reporting service
define service{
use local-cloud-service
host_name api-hosting
service_description Case Reporting Service
check_command check_api_cloud_service!
https://a8a2ffc4-b04e-4ec1-bfed-7a51dd4 ... .io/health!
notifications_enabled 0
}
With this I can not get the services associated with the Host? what am I doing wrong? thank you!!!