organize
This commit is contained in:
parent
bdb0583395
commit
370e4ce9be
|
@ -12,7 +12,7 @@ services:
|
|||
build:
|
||||
dockerfile: Dockerfile
|
||||
container_name: nagios
|
||||
image: docker-registry1.in.thelinuxpro.net:5000/tlp/nagios:241228.0.3
|
||||
image: docker-registry1.in.thelinuxpro.net:5000/tlp/nagios:241230.0.1
|
||||
networks:
|
||||
infra_dev_net:
|
||||
ipv4_address: 10.99.23.36
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# NOTES: This config file provides you with some example object definition
|
||||
# templates that are refered by other host, service, contact, etc.
|
||||
# definitions in other config files.
|
||||
#
|
||||
#
|
||||
# You don't need to keep these definitions in a separate file from your
|
||||
# other object definitions. This has been done just to make things
|
||||
# easier to understand.
|
||||
|
@ -67,7 +67,7 @@ define host{
|
|||
name linux-server ; 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
|
||||
check_interval 2 ; 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
|
||||
|
@ -80,43 +80,22 @@ define host{
|
|||
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
|
||||
}
|
||||
|
||||
|
||||
|
||||
# Windows host definition template - This is NOT a real host, just a template!
|
||||
|
||||
### Host Template
|
||||
define host{
|
||||
name windows-server ; The name of this host template
|
||||
use generic-host ; Inherit default values from the generic-host template
|
||||
check_period 24x7 ; By default, Windows servers are monitored round the clock
|
||||
check_interval 5 ; Actively check the server every 5 minutes
|
||||
retry_interval 1 ; Schedule host check retries at 1 minute intervals
|
||||
max_check_attempts 10 ; Check each server 10 times (max)
|
||||
check_command check-host-alive ; Default command to check if servers are "alive"
|
||||
notification_period 24x7 ; Send notification out at any time - day or night
|
||||
notification_interval 30 ; Resend notifications every 30 minutes
|
||||
notification_options d,r ; Only send notifications for specific host states
|
||||
contact_groups admins ; Notifications get sent to the admins by default
|
||||
hostgroups windows-servers ; Host groups that Windows servers should be a member of
|
||||
register 0 ; DONT REGISTER THIS - ITS JUST A TEMPLATE
|
||||
}
|
||||
|
||||
|
||||
# We define a generic printer template that can be used for most printers we monitor
|
||||
|
||||
define host{
|
||||
name generic-printer ; The name of this host template
|
||||
use generic-host ; Inherit default values from the generic-host template
|
||||
check_period 24x7 ; By default, printers are monitored round the clock
|
||||
check_interval 5 ; Actively check the printer every 5 minutes
|
||||
retry_interval 1 ; Schedule host check retries at 1 minute intervals
|
||||
max_check_attempts 10 ; Check each printer 10 times (max)
|
||||
check_command check-host-alive ; Default command to check if printers are "alive"
|
||||
notification_period workhours ; Printers are only used during the workday
|
||||
notification_interval 30 ; Resend notifications every 30 minutes
|
||||
notification_options d,r ; 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
|
||||
}
|
||||
name docker-host
|
||||
use generic-host
|
||||
hostgroups docker-hosts
|
||||
check_period 24x7
|
||||
check_interval 3
|
||||
retry_interval 1
|
||||
max_check_attempts 3
|
||||
check_command check-host-alive
|
||||
notification_period 24x7
|
||||
notification_interval 120
|
||||
notification_options d,u,r
|
||||
contact_groups admins
|
||||
register 0
|
||||
}
|
||||
|
||||
|
||||
# Define a template for switches that we can reuse
|
||||
|
@ -164,8 +143,8 @@ define service{
|
|||
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
|
||||
check_interval 2 ; Check the service every 10 minutes under normal conditions
|
||||
retry_interval 1 ; Re-check the service every two minutes until a hard state can be determined
|
||||
contact_groups admins ; Notifications get sent out to everyone in the 'admins' group
|
||||
notification_options w,u,c,r ; Send notifications about warning, unknown, critical, and recovery events
|
||||
notification_interval 60 ; Re-notify about service problems every hour
|
|
@ -0,0 +1,28 @@
|
|||
### Hosts
|
||||
define host{
|
||||
use docker-host
|
||||
host_name pi501.in.thelinuxpro.net
|
||||
alias pi501
|
||||
address 10.99.22.51
|
||||
}
|
||||
|
||||
define host{
|
||||
use docker-host
|
||||
host_name pi502.in.thelinuxpro.net
|
||||
alias pi502
|
||||
address 10.99.22.52
|
||||
}
|
||||
|
||||
define host{
|
||||
use docker-host
|
||||
host_name pi503.in.thelinuxpro.net
|
||||
alias pi503
|
||||
address 10.99.22.53
|
||||
}
|
||||
|
||||
define host{
|
||||
use docker-host
|
||||
host_name pi504.in.thelinuxpro.net
|
||||
alias pi504
|
||||
address 10.99.22.54
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
|
||||
### Service definitions for all docker hosts
|
||||
define service{
|
||||
use generic-service,graphed-service
|
||||
hostgroup_name docker-hosts
|
||||
service_description PING
|
||||
check_command check_ping!100.0,20%!500.0,60%
|
||||
}
|
||||
|
||||
define service{
|
||||
use generic-service,graphed-service
|
||||
hostgroup_name docker-hosts
|
||||
service_description Docker Daemon
|
||||
check_command check_nrpe!check_proc_docker
|
||||
}
|
||||
|
||||
define service{
|
||||
use generic-service,graphed-service
|
||||
hostgroup_name docker-hosts
|
||||
service_description Disk: /
|
||||
check_command check_nrpe!check_disk
|
||||
}
|
||||
|
||||
define service{
|
||||
use generic-service,graphed-service
|
||||
hostgroup_name docker-hosts
|
||||
service_description Disk: /var/lib/docker/volumes
|
||||
check_command check_nrpe!check_disk_docker
|
||||
}
|
||||
|
||||
define service{
|
||||
use generic-service,graphed-service
|
||||
hostgroup_name docker-hosts
|
||||
service_description System: Load
|
||||
check_command check_nrpe!check_load
|
||||
}
|
||||
|
||||
define service{
|
||||
use generic-service,graphed-service
|
||||
hostgroup_name docker-hosts
|
||||
service_description System: Total Processes
|
||||
check_command check_nrpe!check_procs
|
||||
}
|
|
@ -1,114 +1,3 @@
|
|||
|
||||
### Host Template
|
||||
define host{
|
||||
name docker-host
|
||||
use generic-host
|
||||
hostgroups docker-hosts
|
||||
check_period 24x7
|
||||
check_interval 5
|
||||
retry_interval 1
|
||||
max_check_attempts 3
|
||||
check_command check-host-alive
|
||||
notification_period 24x7
|
||||
notification_interval 120
|
||||
notification_options d,u,r
|
||||
contact_groups admins
|
||||
register 0
|
||||
}
|
||||
|
||||
### Hosts
|
||||
define host{
|
||||
use docker-host
|
||||
host_name pi501.in.thelinuxpro.net
|
||||
alias pi501
|
||||
address 10.99.22.51
|
||||
}
|
||||
|
||||
define host{
|
||||
use docker-host
|
||||
host_name pi502.in.thelinuxpro.net
|
||||
alias pi502
|
||||
address 10.99.22.52
|
||||
}
|
||||
|
||||
define host{
|
||||
use docker-host
|
||||
host_name pi503.in.thelinuxpro.net
|
||||
alias pi503
|
||||
address 10.99.22.53
|
||||
}
|
||||
|
||||
define host{
|
||||
use docker-host
|
||||
host_name pi504.in.thelinuxpro.net
|
||||
alias pi504
|
||||
address 10.99.22.54
|
||||
}
|
||||
|
||||
### Service definitions for all docker hosts
|
||||
define service{
|
||||
use local-service,graphed-service
|
||||
hostgroup_name docker-hosts
|
||||
service_description PING
|
||||
check_command check_ping!100.0,20%!500.0,60%
|
||||
}
|
||||
|
||||
define service{
|
||||
use local-service,graphed-service
|
||||
hostgroup_name docker-hosts
|
||||
service_description Docker Daemon
|
||||
check_command check_nrpe!check_proc_docker
|
||||
}
|
||||
|
||||
define service{
|
||||
use local-service,graphed-service
|
||||
hostgroup_name docker-hosts
|
||||
service_description Disk: /
|
||||
check_command check_nrpe!check_disk
|
||||
}
|
||||
|
||||
define service{
|
||||
use local-service,graphed-service
|
||||
hostgroup_name docker-hosts
|
||||
service_description Disk: /var/lib/docker/volumes
|
||||
check_command check_nrpe!check_disk_docker
|
||||
}
|
||||
|
||||
define service{
|
||||
use local-service,graphed-service
|
||||
hostgroup_name docker-hosts
|
||||
service_description System: Load
|
||||
check_command check_nrpe!check_load
|
||||
}
|
||||
|
||||
define service{
|
||||
use local-service,graphed-service
|
||||
hostgroup_name docker-hosts
|
||||
service_description System: Total Processes
|
||||
check_command check_nrpe!check_procs
|
||||
}
|
||||
|
||||
define service{
|
||||
use local-service,graphed-service
|
||||
hostgroup_name docker-hosts
|
||||
service_description System: Zombie Processes
|
||||
check_command check_nrpe!check_procs
|
||||
}
|
||||
|
||||
define service{
|
||||
use local-service,graphed-service
|
||||
hostgroup_name docker-hosts
|
||||
service_description System: Logged In users
|
||||
check_command check_nrpe!check_users
|
||||
}
|
||||
|
||||
define service{
|
||||
use local-service,graphed-service
|
||||
hostgroup_name docker-hosts
|
||||
service_description DNS Query: A Record
|
||||
check_command check_dns_a
|
||||
}
|
||||
|
||||
### Service Definitions per docker host
|
||||
define service{
|
||||
use local-service,graphed-service
|
Loading…
Reference in New Issue