web hosts

This commit is contained in:
Kameron Kenny 2024-12-30 11:00:56 -05:00
parent 370e4ce9be
commit ad2f04e6a0
5 changed files with 61 additions and 6 deletions

View File

@ -4,7 +4,7 @@
#
# NOTES: This config file provides you with some example command definitions
# that you can reference in host, service, and contact definitions.
#
#
# You don't need to keep commands in a separate file from your other
# object definitions. This has been done just to make things easier to
# understand.
@ -17,7 +17,7 @@
# SAMPLE NOTIFICATION COMMANDS
#
# These are some example notification commands. They may or may not work on
# your system without modification. As an example, some systems will require
# your system without modification. As an example, some systems will require
# you to use "/usr/bin/mailx" instead of "/usr/bin/mail" in the commands below.
#
################################################################################
@ -47,7 +47,7 @@ define command{
# This command checks to see if a host is "alive" by pinging it
# The check must result in a 100% packet loss or 5 second (5000ms) round trip
# The check must result in a 100% packet loss or 5 second (5000ms) round trip
# average time to produce a critical error.
# Note: Five ICMP echo packets are sent (determined by the '-p 5' argument)
@ -65,7 +65,7 @@ define command{
# SAMPLE SERVICE CHECK COMMANDS
#
# These are some example service check commands. They may or may not work on
# your system, as they must be modified for your plugins. See the HTML
# your system, as they must be modified for your plugins. See the HTML
# documentation on the plugins for examples of how to configure command definitions.
#
# NOTE: The following 'check_local_...' functions are designed to monitor
@ -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{
@ -231,7 +236,7 @@ define command {
#
# These are sample performance data commands that can be used to send performance
# data output to two text files (one for hosts, another for services). If you
# plan on simply writing performance data out to a file, consider using the
# plan on simply writing performance data out to a file, consider using the
# host_perfdata_file and service_perfdata_file options in the main config file.
#
################################################################################

View File

@ -97,6 +97,21 @@ define host{
register 0
}
define host{
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{

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}