Compare commits
2 Commits
bdb0583395
...
ad2f04e6a0
Author | SHA1 | Date |
---|---|---|
|
ad2f04e6a0 | |
|
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
|
||||
|
|
|
@ -143,9 +143,14 @@ define command{
|
|||
# 'check_http' command definition
|
||||
define command{
|
||||
command_name check_http
|
||||
command_line $USER1$/check_http -I $HOSTADDRESS$ $ARG1$
|
||||
command_line $USER1$/check_http -I $HOSTADDRESS$ -H $HOSTNAME$
|
||||
}
|
||||
|
||||
# 'check_https' command definition
|
||||
define command{
|
||||
command_name check_https
|
||||
command_line $USER1$/check_http -S -I $HOSTADDRESS$ -H $HOSTNAME$
|
||||
}
|
||||
|
||||
# 'check_ssh' command definition
|
||||
define command{
|
|
@ -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,45 +80,39 @@ 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
|
||||
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
|
||||
}
|
||||
|
||||
|
||||
# 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 web-host
|
||||
use generic-host
|
||||
hostgroups web-hosts
|
||||
check_period 24x7
|
||||
check_interval 2
|
||||
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
|
||||
define host{
|
||||
name generic-switch ; The name of this host template
|
||||
|
@ -164,8 +158,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,14 @@
|
|||
### Hosts
|
||||
define host{
|
||||
use web-host
|
||||
host_name kameronkenny.com
|
||||
alias kameronkenny.com
|
||||
address 204.8.15.81
|
||||
}
|
||||
|
||||
define host{
|
||||
use web-host
|
||||
host_name thelinux.pro
|
||||
alias thelinux.pro
|
||||
address 204.8.15.81
|
||||
}
|
|
@ -4,3 +4,10 @@ define hostgroup{
|
|||
alias Docker Hosts
|
||||
members pi501.in.thelinuxpro.net,pi502.in.thelinuxpro.net,pi503.in.thelinuxpro.net,pi504.in.thelinuxpro.net
|
||||
}
|
||||
|
||||
### Hostgroup
|
||||
define hostgroup{
|
||||
hostgroup_name web-hosts
|
||||
alias web Hosts
|
||||
members kameronkenny.com,thelinux.pro
|
||||
}
|
|
@ -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
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
### Service definitions for all web hosts
|
||||
define service{
|
||||
use generic-service,graphed-service
|
||||
hostgroup_name web-hosts
|
||||
service_description PING
|
||||
check_command check_ping!100.0,20%!500.0,60%
|
||||
}
|
||||
|
||||
define service{
|
||||
use generic-service,graphed-service
|
||||
hostgroup_name web-hosts
|
||||
service_description HTTPS
|
||||
check_command check_https
|
||||
}
|
|
@ -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