organize
This commit is contained in:
parent
bdb0583395
commit
370e4ce9be
|
@ -12,7 +12,7 @@ services:
|
||||||
build:
|
build:
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
container_name: nagios
|
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:
|
networks:
|
||||||
infra_dev_net:
|
infra_dev_net:
|
||||||
ipv4_address: 10.99.23.36
|
ipv4_address: 10.99.23.36
|
||||||
|
|
|
@ -67,7 +67,7 @@ define host{
|
||||||
name linux-server ; The name of this host template
|
name linux-server ; The name of this host template
|
||||||
use generic-host ; This template inherits other values from the generic-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_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
|
retry_interval 1 ; Schedule host check retries at 1 minute intervals
|
||||||
max_check_attempts 10 ; Check each Linux host 10 times (max)
|
max_check_attempts 10 ; Check each Linux host 10 times (max)
|
||||||
check_command check-host-alive ; Default command to check Linux hosts
|
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!
|
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
### Host Template
|
||||||
|
|
||||||
# Windows host definition template - This is NOT a real host, just a template!
|
|
||||||
|
|
||||||
define host{
|
define host{
|
||||||
name windows-server ; The name of this host template
|
name docker-host
|
||||||
use generic-host ; Inherit default values from the generic-host template
|
use generic-host
|
||||||
check_period 24x7 ; By default, Windows servers are monitored round the clock
|
hostgroups docker-hosts
|
||||||
check_interval 5 ; Actively check the server every 5 minutes
|
check_period 24x7
|
||||||
retry_interval 1 ; Schedule host check retries at 1 minute intervals
|
check_interval 3
|
||||||
max_check_attempts 10 ; Check each server 10 times (max)
|
retry_interval 1
|
||||||
check_command check-host-alive ; Default command to check if servers are "alive"
|
max_check_attempts 3
|
||||||
notification_period 24x7 ; Send notification out at any time - day or night
|
check_command check-host-alive
|
||||||
notification_interval 30 ; Resend notifications every 30 minutes
|
notification_period 24x7
|
||||||
notification_options d,r ; Only send notifications for specific host states
|
notification_interval 120
|
||||||
contact_groups admins ; Notifications get sent to the admins by default
|
notification_options d,u,r
|
||||||
hostgroups windows-servers ; Host groups that Windows servers should be a member of
|
contact_groups admins
|
||||||
register 0 ; DONT REGISTER THIS - ITS JUST A TEMPLATE
|
register 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# 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
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# Define a template for switches that we can reuse
|
# Define a template for switches that we can reuse
|
||||||
|
@ -164,8 +143,8 @@ define service{
|
||||||
is_volatile 0 ; The service is not volatile
|
is_volatile 0 ; The service is not volatile
|
||||||
check_period 24x7 ; The service can be checked at any time of the day
|
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
|
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
|
check_interval 2 ; 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
|
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
|
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_options w,u,c,r ; Send notifications about warning, unknown, critical, and recovery events
|
||||||
notification_interval 60 ; Re-notify about service problems every hour
|
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
|
### Service Definitions per docker host
|
||||||
define service{
|
define service{
|
||||||
use local-service,graphed-service
|
use local-service,graphed-service
|
Loading…
Reference in New Issue