Nagios configuration for Liberia
ThatOneNeji
2020-07-16 5d68afe8079da0c961641f3a570ca12d24c779e9
day changes
3 files modified
148 ■■■■■ changed files
nagios/NMS_Services.cfg 46 ●●●● patch | view | raw | blame | history
nagios/objects/commands.cfg 2 ●●● patch | view | raw | blame | history
nagios/objects/localhost.cfg 100 ●●●●● patch | view | raw | blame | history
nagios/NMS_Services.cfg
@@ -43,7 +43,7 @@
###
define service{
    use                                nms-generic-service-crit
    host_name                          NMSAPP.TNM.CO.MW
    host_name                          NMSAPP.TNM.CO.MW,NMSDB.TNM.CO.MW,NMSBACKUP.TNM.CO.MW
    service_description                CPU Load
    check_command                      check_nrpe!check_load
    notes                              OSxxxxx
@@ -59,7 +59,7 @@
define service{
    use                                nms-generic-service-crit
    host_name                          NMSAPP.TNM.CO.MW
    host_name                          NMSAPP.TNM.CO.MW,NMSDB.TNM.CO.MW,NMSBACKUP.TNM.CO.MW
    service_description                Memory Usage 
    check_command                      check_nrpe!check_ram
    notes                              OSxxxxx
@@ -67,7 +67,7 @@
define service{
    use                                nms-generic-service-crit
    host_name                          NMSAPP.TNM.CO.MW
    host_name                          NMSAPP.TNM.CO.MW,NMSDB.TNM.CO.MW,NMSBACKUP.TNM.CO.MW
    service_description                Partition - Free Space - /app 
    check_command                      check_nrpe!check_app
    notes                              OSxxxxx
@@ -83,7 +83,7 @@
define service{
    use                                nms-generic-service-crit
    host_name                          NMSAPP.TNM.CO.MW
    host_name                          NMSAPP.TNM.CO.MW,NMSDB.TNM.CO.MW,NMSBACKUP.TNM.CO.MW
    service_description                Partition - Free Space - /root
    check_command                      check_nrpe!check_root 
    notes                              OSxxxxx
@@ -107,7 +107,7 @@
define service{
    use                                nms-generic-service-crit
    host_name                          NMSAPP.TNM.CO.MW
    host_name                          NMSAPP.TNM.CO.MW,NMSDB.TNM.CO.MW,NMSBACKUP.TNM.CO.MW
    service_description                Check DNS 
    check_command                      check_nrpe!check_dns
    notes                              OSxxxxx
@@ -115,7 +115,7 @@
define service{
    use                                nms-generic-service-crit
    host_name                          NMSAPP.TNM.CO.MW
    host_name                          NMSAPP.TNM.CO.MW,NMSDB.TNM.CO.MW,NMSBACKUP.TNM.CO.MW
    service_description                SSH Check
    check_command                      check_ssh!10
    notes                              OSxxxxx
@@ -123,7 +123,7 @@
define service{
    use                                nms-generic-service
    host_name                          NMSAPP.TNM.CO.MW
    host_name                          NMSAPP.TNM.CO.MW,NMSDB.TNM.CO.MW,NMSBACKUP.TNM.CO.MW
    service_description                SUDO Installed
    check_command                      check_nrpe!check_sudo
    notes                              OSxxxxx
@@ -222,21 +222,21 @@
##
#
define service{
    use                                nms-generic-service-crit
    host_name                          NMSAPP.TNM.CO.MW
    service_description                Apache Service
    check_command                      check_url!80!1.0!60.0!"Index of"!"/sm/"
    notes                              SWxxxxx
}
#define service{
#    use                                nms-generic-service-crit
#    host_name                          NMSAPP.TNM.CO.MW
#    service_description                Apache Service
#    check_command                      check_url!443!1.0!60.0!"Index of"!"/sm/"
#    notes                              SWxxxxx
#}
define service{
    use                                nms-generic-service-crit
    host_name                          NMSAPP.TNM.CO.MW
    service_description                Apache Service Running
    check_command                      check_url!80!1.0!60.0!"Apache Server Status"!"/server-status"
    notes                              SWxxxxx
}
#define service{
#    use                                nms-generic-service-crit
#    host_name                          NMSAPP.TNM.CO.MW
#    service_description                Apache Service Running
#    check_command                      check_url!443!1.0!60.0!"Apache Server Status"!"/server-status"
#    notes                              SWxxxxx
#}
##
#  Coldfusion - Common
@@ -245,8 +245,8 @@
define service{
    use                                nms-generic-service-crit
    host_name                          NMSAPP.TNM.CO.MW
    service_description                Apache Service Running. Coldfusion might be having issues
    check_command                      check_url!80!1.0!60.0!"Network Group Home"!"/"
    service_description                Coldfusion10
    check_command                      check_url!8100!1.0!60.0!"NMS Home Page"!"/"
    notes                              SWxxxxx
}
nagios/objects/commands.cfg
@@ -222,7 +222,7 @@
# Always add NRPE command here
define command{
    command_name                       check_nrpe
    command_line                       $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
    command_line                       $USER1$/check_nrpe -2 -H $HOSTADDRESS$ -c $ARG1$
}
define command{
nagios/objects/localhost.cfg
@@ -19,13 +19,10 @@
# Define a host for the local machine
define host {
    use                     linux-server            ; Name of host template to use
                                                    ; This host definition will inherit all variables that are defined
                                                    ; in (or inherited by) the linux-server host template definition.
    host_name               localhost
    alias                   localhost
    address                 127.0.0.1
    use                                linux-server
    host_name                          localhost
    alias                              localhost
    address                            127.0.0.1
}
@@ -37,14 +34,11 @@
###############################################################################
# Define an optional hostgroup for Linux machines
define hostgroup {
    hostgroup_name          linux-servers           ; The name of the hostgroup
    alias                   Linux Servers           ; Long name of the group
    members                 localhost               ; Comma separated list of hosts that belong to this group
    hostgroup_name                     linux-servers           ; The name of the hostgroup
    alias                              Linux Servers           ; Long name of the group
    members                            localhost               ; Comma separated list of hosts that belong to this group
}
###############################################################################
@@ -57,10 +51,10 @@
define service {
    use                     local-service           ; Name of service template to use
    host_name               localhost
    service_description     PING
    check_command           check_ping!100.0,20%!500.0,60%
    use                                local-service           ; Name of service template to use
    host_name                          localhost
    service_description                PING
    check_command                      check_ping!100.0,20%!500.0,60%
}
@@ -71,10 +65,10 @@
define service {
    use                     local-service           ; Name of service template to use
    host_name               localhost
    service_description     Root Partition
    check_command           check_local_disk!20%!10%!/
    use                                local-service           ; Name of service template to use
    host_name                          localhost
    service_description                Root Partition
    check_command                      check_local_disk!20%!10%!/
}
@@ -85,10 +79,10 @@
define service {
    use                     local-service           ; Name of service template to use
    host_name               localhost
    service_description     Current Users
    check_command           check_local_users!20!50
    use                                local-service           ; Name of service template to use
    host_name                          localhost
    service_description                Current Users
    check_command                      check_local_users!20!50
}
@@ -98,11 +92,10 @@
# > 400 processes.
define service {
    use                     local-service           ; Name of service template to use
    host_name               localhost
    service_description     Total Processes
    check_command           check_local_procs!250!400!RSZDT
    use                                local-service           ; Name of service template to use
    host_name                          localhost
    service_description                Total Processes
    check_command                      check_local_procs!700!900!RSZDT
}
@@ -111,10 +104,10 @@
define service {
    use                     local-service           ; Name of service template to use
    host_name               localhost
    service_description     Current Load
    check_command           check_local_load!5.0,4.0,3.0!10.0,6.0,4.0
    use                                local-service           ; Name of service template to use
    host_name                          localhost
    service_description                Current Load
    check_command                      check_local_load!5.0,4.0,3.0!10.0,6.0,4.0
}
@@ -124,36 +117,23 @@
define service {
    use                     local-service           ; Name of service template to use
    host_name               localhost
    service_description     Swap Usage
    check_command           check_local_swap!20%!10%
    use                                local-service           ; Name of service template to use
    host_name                          localhost
    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               localhost
    service_description     SSH
    check_command           check_ssh
    notifications_enabled   0
}
# 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               localhost
    service_description     HTTP
    check_command           check_http
    notifications_enabled   0
}
#define service {
#    use                                local-service           ; Name of service template to use
#    host_name                          localhost
#    service_description                HTTP
#    #check_command                      check_http
#    check_command                      check_url!443!1.0!60.0!"Apache"!"/sm/"
#    notifications_enabled              0
#}