srv-stage/files/nagios/srv-stage.cfg
2025-01-19 20:23:14 +01:00

182 lines
6.2 KiB
INI

###############################################################################
# LOCALHOST.CFG - SAMPLE OBJECT CONFIG FILE FOR MONITORING THIS MACHINE
#
#
# NOTE: This config file is intended to serve as an *extremely* simple
# example of how you can create configuration entries to monitor
# the local (Linux) machine.
#
###############################################################################
###############################################################################
#
# SERVICE DEFINITIONS
#
###############################################################################
# Define a service to "ping" the local machine
define service {
use local-service ; Name of service template to use
host_name srv-stage
service_description PING
check_command check_ping!100.0,20%!500.0,60%
}
# Define a service to check the disk space of the root partition
# on the local machine. Warning if < 20% free, critical if
# < 10% free space on partition.
define service {
use local-service ; Name of service template to use
host_name srv-stage
service_description Root Partition
check_command check_local_disk!20%!10%!/
}
# Define a service to check the number of currently logged in
# users on the local machine. Warning if > 20 users, critical
# if > 50 users.
define service {
use local-service ; Name of service template to use
host_name srv-stage
service_description Current Users
check_command check_local_users!20!50
}
# Define a service to check the number of currently running procs
# on the local machine. Warning if > 250 processes, critical if
# > 400 processes.
define service {
use local-service ; Name of service template to use
host_name srv-stage
service_description Total Processes
check_command check_local_procs!250!400!RSZDT
}
# Define a service to check the load on the local machine.
define service {
use local-service ; Name of service template to use
host_name srv-stage
service_description Current Load
check_command check_local_load!5.0,4.0,3.0!10.0,6.0,4.0
}
# Define a service to check the swap usage the local machine.
# Critical if less than 10% of swap is free, warning if less than 20% is free
define service {
use local-service ; Name of service template to use
host_name srv-stage
service_description Swap Usage
check_command check_local_swap!20%!10%
}
# Define a service to check SSH on the local machine.
# Disable notifications for this service by default, as not all users may have SSH enabled.
define service {
use local-service ; Name of service template to use
host_name srv-stage
service_description SSH
check_command check_ssh
notifications_enabled 1
}
# Define a service to check HTTP on the local machine.
# Disable notifications for this service by default, as not all users may have HTTP enabled.
define service {
use local-service ; Name of service template to use
host_name srv-stage
service_description HTTP
check_command check_tcp!80
notifications_enabled 1
}
define service {
use local-service ; Name of service template to use
host_name srv-stage
service_description DNS
check_command check_dns!srv-stage
notifications_enabled 1
}
define service {
use local-service ; Name of service template to use
host_name srv-stage
service_description Webmail
check_command check_website!webmail.stage-ge.org
notifications_enabled 1
}
define service {
use local-service ; Name of service template to use
host_name srv-stage
service_description DB Access
check_command check_mysql_query!root!Pa55w0rd!"select 1+2"
notifications_enabled 1
}
define service {
use local-service ; Name of service template to use
host_name srv-stage
service_description SMTP - Envoi et réception de messages
check_command check_smtp
notifications_enabled 1
}
define service {
use local-service ; Name of service template to use
host_name srv-stage
service_description FTP - transfert de fichier
check_command check_ftp!stagiaire10!password
notifications_enabled 1
}
define service {
use local-service ; Name of service template to use
host_name srv-stage
service_description Annuaire stage-ge.org
check_command check_ldap!"cn=Access LDAP,dc=stage-ge,dc=org"!passw0rd!dc=stage-ge,dc=org
notifications_enabled 1
}
define service {
use local-service ; Name of service template to use
host_name srv-stage
service_description Mailadmin
check_command check_imap_mailbox!imap.stage-ge.org!mailadmin!Pa55w0rd!10!15
notifications_enabled 1
}
define service {
use local-service ; Name of service template to use
host_name srv-stage
service_description PHP-fpm
check_command check_tcp!9000
notifications_enabled 1
}
define service {
use local-service ; Name of service template to use
host_name srv-stage
service_description Chat-box container
check_command check_tcp!8001
notifications_enabled 1
}
define service {
use local-service ; Name of service template to use
host_name srv-stage
service_description Chat-box socket
check_command check_tcp!8090
notifications_enabled 1
}