Merge branch 'master' of https://gitea.lyc-lecastel.fr/uap33-r/pxap33
This commit is contained in:
commit
67c0184123
37
nagios/ap33prod.cfg
Normal file
37
nagios/ap33prod.cfg
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
define host {
|
||||||
|
use linux-server
|
||||||
|
host_name ap33prod
|
||||||
|
alias ap33prod
|
||||||
|
address 10.121.38.70
|
||||||
|
parents pxap33
|
||||||
|
}
|
||||||
|
define service{
|
||||||
|
use generic-service
|
||||||
|
hostgroup_name linux-servers
|
||||||
|
service_description SSH
|
||||||
|
check_command check_ssh
|
||||||
|
}
|
||||||
|
define service{
|
||||||
|
use generic-service ;Use generic-service template
|
||||||
|
host_name ap33prod ; S'applique au groupe en question
|
||||||
|
service_description chk-lin-load ; Nom du service
|
||||||
|
check_command check_lin_load!public!--v2c!netsl!3,2,2!5,4,3 ; Command
|
||||||
|
}
|
||||||
|
define service{
|
||||||
|
use generic-service
|
||||||
|
host_name ap33prod
|
||||||
|
service_description tomcat
|
||||||
|
check_command check_http_port!8080
|
||||||
|
}
|
||||||
|
define service{
|
||||||
|
use generic-service
|
||||||
|
host_name ap33prod
|
||||||
|
service_description chk-mem-load
|
||||||
|
check_command check_mem!public!--v2c!-N!90,20!99,70
|
||||||
|
}
|
||||||
|
define service{
|
||||||
|
use generic-service
|
||||||
|
host_name ap33prod
|
||||||
|
service_description chk-storage
|
||||||
|
check_command check_storage!public!--v2c!"^/$|tmp|usr|var|home"!85!95
|
||||||
|
}
|
37
nagios/ap33wiki.cfg
Normal file
37
nagios/ap33wiki.cfg
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
define host {
|
||||||
|
use linux-server
|
||||||
|
host_name ap33wiki
|
||||||
|
alias ap33wiki
|
||||||
|
address 10.121.38.71
|
||||||
|
parents pxap33
|
||||||
|
}
|
||||||
|
define service{
|
||||||
|
use generic-service
|
||||||
|
hostgroup_name linux-servers
|
||||||
|
service_description SSH
|
||||||
|
check_command check_ssh
|
||||||
|
}
|
||||||
|
define service{
|
||||||
|
use generic-service ;Use generic-service template
|
||||||
|
host_name ap33wiki; S'applique au groupe en question
|
||||||
|
service_description chk-lin-load ; Nom du service
|
||||||
|
check_command check_lin_load!public!--v2c!netsl!3,2,2!5,4,3 ; Command
|
||||||
|
}
|
||||||
|
define service{
|
||||||
|
use generic-service
|
||||||
|
host_name ap33wiki
|
||||||
|
service_description chk-mem-load
|
||||||
|
check_command check_mem!public!--v2c!-N!90,20!99,70
|
||||||
|
}
|
||||||
|
define service{
|
||||||
|
use generic-service
|
||||||
|
host_name ap33wiki
|
||||||
|
service_description chk-storage
|
||||||
|
check_command check_storage!public!--v2c!"^/$|tmp|usr|var|home"!85!95
|
||||||
|
}
|
||||||
|
define service{
|
||||||
|
use generic-service
|
||||||
|
host_name ap33wiki
|
||||||
|
service_description HTTP
|
||||||
|
check_command check_http
|
||||||
|
}
|
422
nagios/cgi.cfg
Normal file
422
nagios/cgi.cfg
Normal file
@ -0,0 +1,422 @@
|
|||||||
|
#################################################################
|
||||||
|
#
|
||||||
|
# CGI.CFG - Sample CGI Configuration File for Nagios 4.4.6
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#################################################################
|
||||||
|
|
||||||
|
|
||||||
|
# MAIN CONFIGURATION FILE
|
||||||
|
# This tells the CGIs where to find your main configuration file.
|
||||||
|
# The CGIs will read the main and host config files for any other
|
||||||
|
# data they might need.
|
||||||
|
|
||||||
|
main_config_file=/etc/nagios4/nagios.cfg
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# PHYSICAL HTML PATH
|
||||||
|
# This is the path where the HTML files for Nagios reside. This
|
||||||
|
# value is used to locate the logo images needed by the statusmap
|
||||||
|
# and statuswrl CGIs.
|
||||||
|
|
||||||
|
physical_html_path=/usr/share/nagios4/htdocs
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# URL HTML PATH
|
||||||
|
# This is the path portion of the URL that corresponds to the
|
||||||
|
# physical location of the Nagios HTML files (as defined above).
|
||||||
|
# This value is used by the CGIs to locate the online documentation
|
||||||
|
# and graphics. If you access the Nagios pages with an URL like
|
||||||
|
# http://www.myhost.com/nagios, this value should be '/nagios'
|
||||||
|
# (without the quotes).
|
||||||
|
|
||||||
|
url_html_path=/nagios4
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# CONTEXT-SENSITIVE HELP
|
||||||
|
# This option determines whether or not a context-sensitive
|
||||||
|
# help icon will be displayed for most of the CGIs.
|
||||||
|
# Values: 0 = disables context-sensitive help
|
||||||
|
# 1 = enables context-sensitive help
|
||||||
|
|
||||||
|
show_context_help=0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# PENDING STATES OPTION
|
||||||
|
# This option determines what states should be displayed in the web
|
||||||
|
# interface for hosts/services that have not yet been checked.
|
||||||
|
# Values: 0 = leave hosts/services that have not been check yet in their original state
|
||||||
|
# 1 = mark hosts/services that have not been checked yet as PENDING
|
||||||
|
|
||||||
|
use_pending_states=1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# AUTHENTICATION USAGE
|
||||||
|
# This option controls whether or not the CGIs will use any
|
||||||
|
# authentication when displaying host and service information, as
|
||||||
|
# well as committing commands to Nagios for processing.
|
||||||
|
#
|
||||||
|
# Read the HTML documentation to learn how the authorization works!
|
||||||
|
#
|
||||||
|
# NOTE: It is a really *bad* idea to disable authorization, unless
|
||||||
|
# you plan on removing the command CGI (cmd.cgi)! Failure to do
|
||||||
|
# so will leave you wide open to kiddies messing with Nagios and
|
||||||
|
# possibly hitting you with a denial of service attack by filling up
|
||||||
|
# your drive by continuously writing to your command file!
|
||||||
|
#
|
||||||
|
# Setting this value to 0 will cause the CGIs to *not* use
|
||||||
|
# authentication (bad idea), while any other value will make them
|
||||||
|
# use the authentication functions (the default).
|
||||||
|
|
||||||
|
use_authentication=1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# x509 CERT AUTHENTICATION
|
||||||
|
# When enabled, this option allows you to use x509 cert (SSL)
|
||||||
|
# authentication in the CGIs. This is an advanced option and should
|
||||||
|
# not be enabled unless you know what you're doing.
|
||||||
|
|
||||||
|
use_ssl_authentication=0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# DEFAULT USER
|
||||||
|
# Setting this variable will define a default user name that can
|
||||||
|
# access pages without authentication. This allows people within a
|
||||||
|
# secure domain (i.e., behind a firewall) to see the current status
|
||||||
|
# without authenticating. You may want to use this to avoid basic
|
||||||
|
# authentication if you are not using a secure server since basic
|
||||||
|
# authentication transmits passwords in the clear.
|
||||||
|
#
|
||||||
|
# Important: Do not define a default username unless you are
|
||||||
|
# running a secure web server and are sure that everyone who has
|
||||||
|
# access to the CGIs has been authenticated in some manner! If you
|
||||||
|
# define this variable, anyone who has not authenticated to the web
|
||||||
|
# server will inherit all rights you assign to this user!
|
||||||
|
|
||||||
|
#default_user_name=guest
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# SYSTEM/PROCESS INFORMATION ACCESS
|
||||||
|
# This option is a comma-delimited list of all usernames that
|
||||||
|
# have access to viewing the Nagios process information as
|
||||||
|
# provided by the Extended Information CGI (extinfo.cgi). By
|
||||||
|
# default, *no one* has access to this unless you choose to
|
||||||
|
# not use authorization. You may use an asterisk (*) to
|
||||||
|
# authorize any user who has authenticated to the web server.
|
||||||
|
|
||||||
|
authorized_for_system_information=nagiosadmin
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# CONFIGURATION INFORMATION ACCESS
|
||||||
|
# This option is a comma-delimited list of all usernames that
|
||||||
|
# can view ALL configuration information (hosts, commands, etc).
|
||||||
|
# By default, users can only view configuration information
|
||||||
|
# for the hosts and services they are contacts for. You may use
|
||||||
|
# an asterisk (*) to authorize any user who has authenticated
|
||||||
|
# to the web server.
|
||||||
|
|
||||||
|
authorized_for_configuration_information=nagiosadmin
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# SYSTEM/PROCESS COMMAND ACCESS
|
||||||
|
# This option is a comma-delimited list of all usernames that
|
||||||
|
# can issue shutdown and restart commands to Nagios via the
|
||||||
|
# command CGI (cmd.cgi). Users in this list can also change
|
||||||
|
# the program mode to active or standby. By default, *no one*
|
||||||
|
# has access to this unless you choose to not use authorization.
|
||||||
|
# You may use an asterisk (*) to authorize any user who has
|
||||||
|
# authenticated to the web server.
|
||||||
|
|
||||||
|
authorized_for_system_commands=nagiosadmin
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# GLOBAL HOST/SERVICE VIEW ACCESS
|
||||||
|
# These two options are comma-delimited lists of all usernames that
|
||||||
|
# can view information for all hosts and services that are being
|
||||||
|
# monitored. By default, users can only view information
|
||||||
|
# for hosts or services that they are contacts for (unless you
|
||||||
|
# you choose to not use authorization). You may use an asterisk (*)
|
||||||
|
# to authorize any user who has authenticated to the web server.
|
||||||
|
|
||||||
|
authorized_for_all_services=nagiosadmin
|
||||||
|
authorized_for_all_hosts=nagiosadmin
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# GLOBAL HOST/SERVICE COMMAND ACCESS
|
||||||
|
# These two options are comma-delimited lists of all usernames that
|
||||||
|
# can issue host or service related commands via the command
|
||||||
|
# CGI (cmd.cgi) for all hosts and services that are being monitored.
|
||||||
|
# By default, users can only issue commands for hosts or services
|
||||||
|
# that they are contacts for (unless you you choose to not use
|
||||||
|
# authorization). You may use an asterisk (*) to authorize any
|
||||||
|
# user who has authenticated to the web server.
|
||||||
|
|
||||||
|
authorized_for_all_service_commands=nagiosadmin
|
||||||
|
authorized_for_all_host_commands=nagiosadmin
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# READ-ONLY USERS
|
||||||
|
# A comma-delimited list of usernames that have read-only rights in
|
||||||
|
# the CGIs. This will block any service or host commands normally shown
|
||||||
|
# on the extinfo CGI pages. It will also block comments from being shown
|
||||||
|
# to read-only users.
|
||||||
|
|
||||||
|
#authorized_for_read_only=user1,user2
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# STATUSMAP BACKGROUND IMAGE
|
||||||
|
# This option allows you to specify an image to be used as a
|
||||||
|
# background in the statusmap CGI. It is assumed that the image
|
||||||
|
# resides in the HTML images path (i.e. /usr/local/nagios/share/images).
|
||||||
|
# This path is automatically determined by appending "/images"
|
||||||
|
# to the path specified by the 'physical_html_path' directive.
|
||||||
|
# Note: The image file may be in GIF, PNG, JPEG, or GD2 format.
|
||||||
|
# However, I recommend that you convert your image to GD2 format
|
||||||
|
# (uncompressed) but ONLY IF YOU WILL USE THE LEGACY MAP EXCLUSIVELY,
|
||||||
|
# as this will cause less CPU load when the CGI generates the image.
|
||||||
|
|
||||||
|
#statusmap_background_image=smbackground.gd2
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# STATUSMAP TRANSPARENCY INDEX COLOR
|
||||||
|
# These options set the r,g,b values of the background color used the statusmap CGI,
|
||||||
|
# so normal browsers that can't show real png transparency set the desired color as
|
||||||
|
# a background color instead (to make it look pretty).
|
||||||
|
# Defaults to white: (R,G,B) = (255,255,255).
|
||||||
|
|
||||||
|
#color_transparency_index_r=255
|
||||||
|
#color_transparency_index_g=255
|
||||||
|
#color_transparency_index_b=255
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# DEFAULT STATUSMAP LAYOUT METHOD
|
||||||
|
# This option allows you to specify the default layout method
|
||||||
|
# the statusmap CGI should use for drawing hosts. If you do
|
||||||
|
# not use this option, the default for the legacy map is to use
|
||||||
|
# user-defined coordinates and the default for the new map is "6"
|
||||||
|
# (Circular Balloon).
|
||||||
|
# Valid options for the legacy map are as follows:
|
||||||
|
# 0 = User-defined coordinates
|
||||||
|
# 1 = Depth layers
|
||||||
|
# 2 = Collapsed tree
|
||||||
|
# 3 = Balanced tree
|
||||||
|
# 4 = Circular
|
||||||
|
# 5 = Circular (Marked Up)
|
||||||
|
# Valid options for the new map are as follows:
|
||||||
|
# 0 = User-defined coordinates
|
||||||
|
# 1 = Depth Layers (Horizontal)
|
||||||
|
# 2 = Collapsed tree (Horizontal)
|
||||||
|
# 3 = Balanced tree (Horizontal)
|
||||||
|
# 4 = DON'T USE
|
||||||
|
# 5 = Circular Markup
|
||||||
|
# 6 = Circular Balloon
|
||||||
|
# 7 = Balanced tree (Vertical)
|
||||||
|
# 8 = Collapsed tree (Vertical)
|
||||||
|
# 9 = Depth Layers (Vertical)
|
||||||
|
# 10 = Force Map
|
||||||
|
|
||||||
|
#default_statusmap_layout=6
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# DEFAULT STATUSWRL LAYOUT METHOD
|
||||||
|
# This option allows you to specify the default layout method
|
||||||
|
# the statuswrl (VRML) CGI should use for drawing hosts. If you
|
||||||
|
# do not use this option, the default is to use user-defined
|
||||||
|
# coordinates. Valid options are as follows:
|
||||||
|
# 0 = User-defined coordinates
|
||||||
|
# 2 = Collapsed tree
|
||||||
|
# 3 = Balanced tree
|
||||||
|
# 4 = Circular
|
||||||
|
|
||||||
|
default_statuswrl_layout=4
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# STATUSWRL INCLUDE
|
||||||
|
# This option allows you to include your own objects in the
|
||||||
|
# generated VRML world. It is assumed that the file
|
||||||
|
# resides in the HTML path (i.e. /usr/local/nagios/share).
|
||||||
|
|
||||||
|
#statuswrl_include=myworld.wrl
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# PING SYNTAX
|
||||||
|
# This option determines what syntax should be used when
|
||||||
|
# attempting to ping a host from the WAP interface (using
|
||||||
|
# the statuswml CGI. You must include the full path to
|
||||||
|
# the ping binary, along with all required options. The
|
||||||
|
# $HOSTADDRESS$ macro is substituted with the address of
|
||||||
|
# the host before the command is executed.
|
||||||
|
# Please note that the syntax for the ping binary is
|
||||||
|
# notorious for being different on virtually ever *NIX
|
||||||
|
# OS and distribution, so you may have to tweak this to
|
||||||
|
# work on your system.
|
||||||
|
|
||||||
|
ping_syntax=/bin/ping -n -U -c 5 $HOSTADDRESS$
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# REFRESH RATE
|
||||||
|
# This option allows you to specify the refresh rate in seconds
|
||||||
|
# of various CGIs (status, statusmap, extinfo, and outages).
|
||||||
|
|
||||||
|
refresh_rate=90
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# PAGE TOUR
|
||||||
|
# Enable page tour for helpful tips and tricks on various pages
|
||||||
|
|
||||||
|
#enable_page_tour=1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# DEFAULT PAGE LIMIT
|
||||||
|
# This option allows you to specify the default number of results
|
||||||
|
# displayed on the status.cgi. This number can be adjusted from
|
||||||
|
# within the UI after the initial page load. Setting this to 0
|
||||||
|
# will show all results.
|
||||||
|
|
||||||
|
result_limit=100
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ESCAPE HTML TAGS
|
||||||
|
# This option determines whether HTML tags in host and service
|
||||||
|
# status output is escaped in the web interface. If enabled,
|
||||||
|
# your plugin output will not be able to contain clickable links.
|
||||||
|
|
||||||
|
escape_html_tags=1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# SOUND OPTIONS
|
||||||
|
# These options allow you to specify an optional audio file
|
||||||
|
# that should be played in your browser window when there are
|
||||||
|
# problems on the network. The audio files are used only in
|
||||||
|
# the status CGI. Only the sound for the most critical problem
|
||||||
|
# will be played. Order of importance (higher to lower) is as
|
||||||
|
# follows: unreachable hosts, down hosts, critical services,
|
||||||
|
# warning services, and unknown services. If there are no
|
||||||
|
# visible problems, the sound file optionally specified by
|
||||||
|
# 'normal_sound' variable will be played.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# <varname>=<sound_file>
|
||||||
|
#
|
||||||
|
# Note: All audio files must be placed in the /media subdirectory
|
||||||
|
# under the HTML path (i.e. /usr/local/nagios/share/media/).
|
||||||
|
|
||||||
|
#host_unreachable_sound=hostdown.wav
|
||||||
|
#host_down_sound=hostdown.wav
|
||||||
|
#service_critical_sound=critical.wav
|
||||||
|
#service_warning_sound=warning.wav
|
||||||
|
#service_unknown_sound=warning.wav
|
||||||
|
#normal_sound=noproblem.wav
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# URL TARGET FRAMES
|
||||||
|
# These options determine the target frames in which notes and
|
||||||
|
# action URLs will open.
|
||||||
|
|
||||||
|
action_url_target=_blank
|
||||||
|
notes_url_target=_blank
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# LOCK AUTHOR NAMES OPTION
|
||||||
|
# This option determines whether users can change the author name
|
||||||
|
# when submitting comments, scheduling downtime. If disabled, the
|
||||||
|
# author names will be locked into their contact name, as defined in Nagios.
|
||||||
|
# Values: 0 = allow editing author names
|
||||||
|
# 1 = lock author names (disallow editing)
|
||||||
|
|
||||||
|
lock_author_names=1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# SPLUNK INTEGRATION OPTIONS
|
||||||
|
# These options allow you to enable integration with Splunk
|
||||||
|
# in the web interface. If enabled, you'll be presented with
|
||||||
|
# "Splunk It" links in various places in the CGIs (log file,
|
||||||
|
# alert history, host/service detail, etc). Useful if you're
|
||||||
|
# trying to research why a particular problem occurred.
|
||||||
|
# For more information on Splunk, visit http://www.splunk.com/
|
||||||
|
|
||||||
|
# This option determines whether the Splunk integration is enabled
|
||||||
|
# Values: 0 = disable Splunk integration
|
||||||
|
# 1 = enable Splunk integration
|
||||||
|
|
||||||
|
#enable_splunk_integration=1
|
||||||
|
|
||||||
|
# This option should be the URL used to access your instance of Splunk
|
||||||
|
#splunk_url=http://127.0.0.1:8000/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# NAVIGATION BAR SEARCH OPTIONS
|
||||||
|
# The following options allow to configure the navbar search. Default
|
||||||
|
# is to search for hostnames. With enabled navbar_search_for_addresses,
|
||||||
|
# the navbar search queries IP addresses as well. It's also possible
|
||||||
|
# to enable search for aliases by setting navbar_search_for_aliases=1.
|
||||||
|
|
||||||
|
navbar_search_for_addresses=1
|
||||||
|
navbar_search_for_aliases=1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# DEFAULTS FOR CHECKBOXES FOR ACKNOWLEDGEMENTS
|
||||||
|
# Enabling ack_no_sticky will default the "Sticky Acknowledgement" to
|
||||||
|
# be unchecked.
|
||||||
|
# Enabling ack_no_send will default the "Send Notification" to
|
||||||
|
# be unchecked.
|
||||||
|
|
||||||
|
#ack_no_sticky=0
|
||||||
|
#ack_no_send=0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# SHOW ONLY HARD STATES IS TACTICAL OVERVIEW
|
||||||
|
# This option controls whether only HARD states are counted on the
|
||||||
|
# Tactical Overview, or if both HARD and SOFT states are counted.
|
||||||
|
# Set to 1 to show only HARD states. Defaults to 0 (HARD+SOFT).
|
||||||
|
|
||||||
|
#tac_cgi_hard_only=0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# COMMAND COMMENTS
|
||||||
|
# These options control whether or not comments are required, optional,
|
||||||
|
# or not allowed for specific commands. The format for each line is:
|
||||||
|
# cmd-name=req,def-comment
|
||||||
|
#
|
||||||
|
# cmd-name is "CMT_" plus a command such as ADD_HOST_COMMENT
|
||||||
|
# req 0 = not allowed, 1 = optional, 2 = required
|
||||||
|
# def-comment optional default comment that will be put in the input field
|
||||||
|
#
|
||||||
|
# The following examples override the default comment requirements in
|
||||||
|
# some way.
|
||||||
|
|
||||||
|
#CMT_ADD_HOST_COMMENT=1
|
||||||
|
#CMT_ACKNOWLEDGE_HOST_PROBLEM=2,"Problem is being looked into"
|
||||||
|
#CMT_SCHEDULE_SVC_CHECK=1
|
||||||
|
#CMT_SCHEDULE_HOST_DOWNTIME=0
|
309
nagios/commands.cfg
Normal file
309
nagios/commands.cfg
Normal file
@ -0,0 +1,309 @@
|
|||||||
|
###############################################################################
|
||||||
|
# COMMANDS.CFG - SAMPLE COMMAND DEFINITIONS FOR NAGIOS 4.4.6
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
#
|
||||||
|
# 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
|
||||||
|
# you to use "/usr/bin/mailx" instead of "/usr/bin/mail" in the commands below.
|
||||||
|
#
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
define command {
|
||||||
|
|
||||||
|
command_name notify-host-by-email
|
||||||
|
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
define command {
|
||||||
|
|
||||||
|
command_name notify-service-by-email
|
||||||
|
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
|
||||||
|
}
|
||||||
|
|
||||||
|
define command {
|
||||||
|
command_name check_http_port
|
||||||
|
command_line /usr/lib/nagios/plugins/check_http -p '$ARG1$' '$HOSTADDRESS$'
|
||||||
|
}
|
||||||
|
|
||||||
|
define command {
|
||||||
|
command_name check_lin_load
|
||||||
|
command_line $USER1$/check_snmp_load.pl -H $HOSTADDRESS$ -C $ARG1$ $ARG2$ -T $ARG3$ -w $ARG4$ -c $ARG5$
|
||||||
|
}
|
||||||
|
|
||||||
|
define command {
|
||||||
|
command_name check_mem
|
||||||
|
command_line $USER1$/check_snmp_mem.pl -H $HOSTADDRESS$ -C $ARG1$ $ARG2$ $ARG3$ -w $ARG4$ -c $ARG5$
|
||||||
|
}
|
||||||
|
|
||||||
|
define command {
|
||||||
|
command_name check_storage
|
||||||
|
command_line $USER1$/check_snmp_storage.pl -H $HOSTADDRESS$ -C $ARG1$ $ARG2$ -m $ARG3$ -w $ARG4$ -c $ARG5$
|
||||||
|
}
|
||||||
|
################################################################################
|
||||||
|
#
|
||||||
|
# SAMPLE HOST CHECK COMMANDS
|
||||||
|
#
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
# Removed in Debian because it conflicts with the command of the same name
|
||||||
|
# defined in ping.cfg, which is part of monitoring-plugins-basic.
|
||||||
|
#
|
||||||
|
## 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
|
||||||
|
## average time to produce a critical error.
|
||||||
|
## Note: Five ICMP echo packets are sent (determined by the '-p 5' argument)
|
||||||
|
#
|
||||||
|
#define command {
|
||||||
|
#
|
||||||
|
# command_name check-host-alive
|
||||||
|
# command_line $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5
|
||||||
|
#}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
#
|
||||||
|
# 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
|
||||||
|
# documentation on the plugins for examples of how to configure command definitions.
|
||||||
|
#
|
||||||
|
# NOTE: The following 'check_local_...' functions are designed to monitor
|
||||||
|
# various metrics on the host that Nagios is running on (i.e. this one).
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
define command {
|
||||||
|
|
||||||
|
command_name check_local_disk
|
||||||
|
command_line $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
define command {
|
||||||
|
|
||||||
|
command_name check_local_load
|
||||||
|
command_line $USER1$/check_load -w $ARG1$ -c $ARG2$
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
define command {
|
||||||
|
|
||||||
|
command_name check_local_procs
|
||||||
|
command_line $USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
define command {
|
||||||
|
|
||||||
|
command_name check_local_users
|
||||||
|
command_line $USER1$/check_users -w $ARG1$ -c $ARG2$
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
define command {
|
||||||
|
|
||||||
|
command_name check_local_swap
|
||||||
|
command_line $USER1$/check_swap -w $ARG1$ -c $ARG2$
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
define command {
|
||||||
|
|
||||||
|
command_name check_local_mrtgtraf
|
||||||
|
command_line $USER1$/check_mrtgtraf -F $ARG1$ -a $ARG2$ -w $ARG3$ -c $ARG4$ -e $ARG5$
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# NOTE: The following 'check_...' commands are used to monitor services on
|
||||||
|
# both local and remote hosts.
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
# Removed in Debian because it conflicts with the command of the same of
|
||||||
|
# defined in ftp.cfg, which is part of monitoring-plugins-basic.
|
||||||
|
#
|
||||||
|
#define command {
|
||||||
|
#
|
||||||
|
# command_name check_ftp
|
||||||
|
# command_line $USER1$/check_ftp -H $HOSTADDRESS$ $ARG1$
|
||||||
|
#}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Removed in Debian because it conflicts with the command of the same of
|
||||||
|
# defined in hppjd.cfg, which is part of monitoring-plugins-standard.
|
||||||
|
#
|
||||||
|
#define command {
|
||||||
|
#
|
||||||
|
# command_name check_hpjd
|
||||||
|
# command_line $USER1$/check_hpjd -H $HOSTADDRESS$ $ARG1$
|
||||||
|
#}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
define command {
|
||||||
|
|
||||||
|
command_name check_snmp
|
||||||
|
command_line $USER1$/check_snmp -H $HOSTADDRESS$ $ARG1$
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Removed in Debian because it conflicts with the command of the same of
|
||||||
|
# defined in http.cfg, which is part of monitoring-plugins-basic.
|
||||||
|
#
|
||||||
|
#define command {
|
||||||
|
#
|
||||||
|
# command_name check_http
|
||||||
|
# command_line $USER1$/check_http -I $HOSTADDRESS$ $ARG1$
|
||||||
|
#}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Removed in Debian because it conflicts with the command of the same of
|
||||||
|
# defined in ssh.cfg, which is part of monitoring-plugins-basic.
|
||||||
|
#
|
||||||
|
#define command {
|
||||||
|
#
|
||||||
|
# command_name check_ssh
|
||||||
|
# command_line $USER1$/check_ssh $ARG1$ $HOSTADDRESS$
|
||||||
|
#}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Removed in Debian because it conflicts with the command of the same of
|
||||||
|
# defined in dhcp.cfg, which is part of monitoring-plugins-basic.
|
||||||
|
#
|
||||||
|
#define command {
|
||||||
|
#
|
||||||
|
# command_name check_dhcp
|
||||||
|
# command_line $USER1$/check_dhcp $ARG1$
|
||||||
|
#}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Removed in Debian because it conflicts with the command of the same of
|
||||||
|
# defined in ping.cfg, which is part of monitoring-plugins-basic.
|
||||||
|
#
|
||||||
|
#define command {
|
||||||
|
#
|
||||||
|
# command_name check_ping
|
||||||
|
# command_line $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5
|
||||||
|
#}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Removed in Debian because it conflicts with the command of the same of
|
||||||
|
# defined in mail.cfg, which is part of monitoring-plugins-basic.
|
||||||
|
#
|
||||||
|
#define command {
|
||||||
|
#
|
||||||
|
# command_name check_pop
|
||||||
|
# command_line $USER1$/check_pop -H $HOSTADDRESS$ $ARG1$
|
||||||
|
#}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Removed in Debian because it conflicts with the command of the same of
|
||||||
|
# defined in mail.cfg, which is part of monitoring-plugins-basic.
|
||||||
|
#
|
||||||
|
#define command {
|
||||||
|
#
|
||||||
|
# command_name check_imap
|
||||||
|
# command_line $USER1$/check_imap -H $HOSTADDRESS$ $ARG1$
|
||||||
|
#}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Removed in Debian because it conflicts with the command of the same of
|
||||||
|
# defined in mail.cfg, which is part of monitoring-plugins-basic.
|
||||||
|
#
|
||||||
|
#define command {
|
||||||
|
#
|
||||||
|
# command_name check_smtp
|
||||||
|
# command_line $USER1$/check_smtp -H $HOSTADDRESS$ $ARG1$
|
||||||
|
#}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Removed in Debian because it conflicts with the command of the same of
|
||||||
|
# defined in tcp_ucp.cfg, which is part of monitoring-plugins-basic.
|
||||||
|
#
|
||||||
|
#define command {
|
||||||
|
#
|
||||||
|
# command_name check_tcp
|
||||||
|
# command_line $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$
|
||||||
|
#}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Removed in Debian because it conflicts with the command of the same of
|
||||||
|
# defined in tcp_ucp.cfg, which is part of monitoring-plugins-basic.
|
||||||
|
#
|
||||||
|
#define command {
|
||||||
|
#
|
||||||
|
# command_name check_udp
|
||||||
|
# command_line $USER1$/check_udp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$
|
||||||
|
#}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Removed in Debian because it conflicts with the command of the same of
|
||||||
|
# defined in nt.cfg, which is part of monitoring-plugins-standard.
|
||||||
|
#
|
||||||
|
#define command {
|
||||||
|
#
|
||||||
|
# command_name check_nt
|
||||||
|
# command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -v $ARG1$ $ARG2$
|
||||||
|
#}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
#
|
||||||
|
# SAMPLE PERFORMANCE DATA COMMANDS
|
||||||
|
#
|
||||||
|
# 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
|
||||||
|
# host_perfdata_file and service_perfdata_file options in the main config file.
|
||||||
|
#
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
define command {
|
||||||
|
|
||||||
|
command_name process-host-perfdata
|
||||||
|
command_line /usr/bin/printf "%b" "$LASTHOSTCHECK$\t$HOSTNAME$\t$HOSTSTATE$\t$HOSTATTEMPT$\t$HOSTSTATETYPE$\t$HOSTEXECUTIONTIME$\t$HOSTOUTPUT$\t$HOSTPERFDATA$\n" >> /var/lib/nagios4/host-perfdata.out
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
define command {
|
||||||
|
|
||||||
|
command_name process-service-perfdata
|
||||||
|
command_line /usr/bin/printf "%b" "$LASTSERVICECHECK$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICESTATE$\t$SERVICEATTEMPT$\t$SERVICESTATETYPE$\t$SERVICEEXECUTIONTIME$\t$SERVICELATENCY$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$\n" >> /var/lib/nagios4/service-perfdata.out
|
||||||
|
}
|
6
nagios/gwsio3.cfg
Normal file
6
nagios/gwsio3.cfg
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
define host {
|
||||||
|
use linux-server
|
||||||
|
host_name gwsio3
|
||||||
|
alias gwsio3
|
||||||
|
address 192.168.0.1
|
||||||
|
}
|
6
nagios/hostgroup.cfg
Normal file
6
nagios/hostgroup.cfg
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
define hostgroup {
|
||||||
|
|
||||||
|
hostgroup_name linux-servers
|
||||||
|
alias Linux Servers
|
||||||
|
members ap33prod, ap33wiki, pxap33, gwsio3, pve
|
||||||
|
}
|
1394
nagios/nagios.cfg
Normal file
1394
nagios/nagios.cfg
Normal file
File diff suppressed because it is too large
Load Diff
28
nagios/nagios4-cgi.conf
Normal file
28
nagios/nagios4-cgi.conf
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
ScriptAlias /cgi-bin/nagios4 /usr/lib/cgi-bin/nagios4
|
||||||
|
ScriptAlias /nagios4/cgi-bin /usr/lib/cgi-bin/nagios4
|
||||||
|
|
||||||
|
Alias /nagios4/stylesheets /etc/nagios4/stylesheets
|
||||||
|
|
||||||
|
Alias /nagios4 /usr/share/nagios4/htdocs
|
||||||
|
|
||||||
|
<DirectoryMatch (/usr/share/nagios4/htdocs|/usr/lib/cgi-bin/nagios4|/etc/nagios4/stylesheets)>
|
||||||
|
Options FollowSymLinks
|
||||||
|
DirectoryIndex index.php index.html
|
||||||
|
AllowOverride AuthConfig
|
||||||
|
AuthDigestDomain "nagios4"
|
||||||
|
AuthDigestProvider file
|
||||||
|
AuthUserFile "/etc/nagios4/htdigest.users"
|
||||||
|
AuthGroupFile "/etc/group"
|
||||||
|
AuthName "Restricted Nagios4 Access"
|
||||||
|
AuthType Digest
|
||||||
|
Require valid-user
|
||||||
|
</DirectoryMatch>
|
||||||
|
|
||||||
|
<Directory /usr/share/nagios4/htdocs>
|
||||||
|
Options +ExecCGI
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
<Directory /usr/lib/cgi-bin/nagios4>
|
||||||
|
Options +ExecCGI
|
||||||
|
AddHandler cgi-script .cgi
|
||||||
|
</Directory>
|
7
nagios/pve.cfg
Normal file
7
nagios/pve.cfg
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
define host {
|
||||||
|
use linux-server
|
||||||
|
host_name pve
|
||||||
|
alias pve
|
||||||
|
address 10.121.38.36
|
||||||
|
parents gwsio3
|
||||||
|
}
|
7
nagios/pxap33.cfg
Normal file
7
nagios/pxap33.cfg
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
define host {
|
||||||
|
use linux-server
|
||||||
|
host_name pxap33
|
||||||
|
alias pxap33
|
||||||
|
address 10.121.38.63
|
||||||
|
parents pve
|
||||||
|
}
|
44
syslog/journald.conf
Normal file
44
syslog/journald.conf
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
# This file is part of systemd.
|
||||||
|
#
|
||||||
|
# systemd is free software; you can redistribute it and/or modify it
|
||||||
|
# under the terms of the GNU Lesser General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2.1 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# Entries in this file show the compile time defaults.
|
||||||
|
# You can change settings by editing this file.
|
||||||
|
# Defaults can be restored by simply deleting this file.
|
||||||
|
#
|
||||||
|
# See journald.conf(5) for details.
|
||||||
|
|
||||||
|
[Journal]
|
||||||
|
#Storage=auto
|
||||||
|
#Compress=yes
|
||||||
|
#Seal=yes
|
||||||
|
#SplitMode=uid
|
||||||
|
#SyncIntervalSec=5m
|
||||||
|
#RateLimitIntervalSec=30s
|
||||||
|
#RateLimitBurst=10000
|
||||||
|
#SystemMaxUse=
|
||||||
|
#SystemKeepFree=
|
||||||
|
#SystemMaxFileSize=
|
||||||
|
#SystemMaxFiles=100
|
||||||
|
#RuntimeMaxUse=
|
||||||
|
#RuntimeKeepFree=
|
||||||
|
#RuntimeMaxFileSize=
|
||||||
|
#RuntimeMaxFiles=100
|
||||||
|
#MaxRetentionSec=
|
||||||
|
#MaxFileSec=1month
|
||||||
|
ForwardToSyslog=yes
|
||||||
|
#ForwardToKMsg=no
|
||||||
|
#ForwardToConsole=no
|
||||||
|
#ForwardToWall=yes
|
||||||
|
#TTYPath=/dev/console
|
||||||
|
#MaxLevelStore=debug
|
||||||
|
#MaxLevelSyslog=debug
|
||||||
|
#MaxLevelKMsg=notice
|
||||||
|
#MaxLevelConsole=info
|
||||||
|
#MaxLevelWall=emerg
|
||||||
|
#LineMax=48K
|
||||||
|
#ReadKMsg=yes
|
||||||
|
#Audit=no
|
25
syslog/rsyslog
Normal file
25
syslog/rsyslog
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
/var/log/syslog
|
||||||
|
/var/log/mail.info
|
||||||
|
/var/log/mail.warn
|
||||||
|
/var/log/mail.err
|
||||||
|
/var/log/mail.log
|
||||||
|
/var/log/daemon.log
|
||||||
|
/var/log/kern.log
|
||||||
|
/var/log/auth.log
|
||||||
|
/var/log/user.log
|
||||||
|
/var/log/lpr.log
|
||||||
|
/var/log/cron.log
|
||||||
|
/var/log/debug
|
||||||
|
/var/log/messages
|
||||||
|
{
|
||||||
|
rotate 4
|
||||||
|
weekly
|
||||||
|
missingok
|
||||||
|
notifempty
|
||||||
|
compress
|
||||||
|
delaycompress
|
||||||
|
sharedscripts
|
||||||
|
postrotate
|
||||||
|
/usr/lib/rsyslog/rsyslog-rotate
|
||||||
|
endscript
|
||||||
|
}
|
93
syslog/rsyslog-cli.conf
Normal file
93
syslog/rsyslog-cli.conf
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
# /etc/rsyslog.conf configuration file for rsyslog
|
||||||
|
#
|
||||||
|
# For more information install rsyslog-doc and see
|
||||||
|
# /usr/share/doc/rsyslog-doc/html/configuration/index.html
|
||||||
|
|
||||||
|
|
||||||
|
#################
|
||||||
|
#### MODULES ####
|
||||||
|
#################
|
||||||
|
|
||||||
|
module(load="imuxsock") # provides support for local system logging
|
||||||
|
module(load="imklog") # provides kernel logging support
|
||||||
|
#module(load="immark") # provides --MARK-- message capability
|
||||||
|
|
||||||
|
# provides UDP syslog reception
|
||||||
|
#module(load="imudp")
|
||||||
|
#input(type="imudp" port="514")
|
||||||
|
|
||||||
|
# provides TCP syslog reception
|
||||||
|
#module(load="imtcp")
|
||||||
|
#input(type="imtcp" port="514")
|
||||||
|
|
||||||
|
|
||||||
|
###########################
|
||||||
|
#### GLOBAL DIRECTIVES ####
|
||||||
|
###########################
|
||||||
|
|
||||||
|
#
|
||||||
|
# Use traditional timestamp format.
|
||||||
|
# To enable high precision timestamps, comment out the following line.
|
||||||
|
#
|
||||||
|
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
|
||||||
|
|
||||||
|
#
|
||||||
|
# Set the default permissions for all log files.
|
||||||
|
#
|
||||||
|
$FileOwner root
|
||||||
|
$FileGroup adm
|
||||||
|
$FileCreateMode 0640
|
||||||
|
$DirCreateMode 0755
|
||||||
|
$Umask 0022
|
||||||
|
|
||||||
|
#
|
||||||
|
# Where to place spool and state files
|
||||||
|
#
|
||||||
|
$WorkDirectory /var/spool/rsyslog
|
||||||
|
|
||||||
|
#
|
||||||
|
# Include all config files in /etc/rsyslog.d/
|
||||||
|
#
|
||||||
|
$IncludeConfig /etc/rsyslog.d/*.conf
|
||||||
|
|
||||||
|
|
||||||
|
###############
|
||||||
|
#### RULES ####
|
||||||
|
###############
|
||||||
|
|
||||||
|
#
|
||||||
|
# First some standard log files. Log by facility.
|
||||||
|
#
|
||||||
|
auth,authpriv.* /var/log/auth.log
|
||||||
|
*.*;auth,authpriv.none -/var/log/syslog
|
||||||
|
#cron.* /var/log/cron.log
|
||||||
|
daemon.* -/var/log/daemon.log
|
||||||
|
kern.* -/var/log/kern.log
|
||||||
|
lpr.* -/var/log/lpr.log
|
||||||
|
mail.* -/var/log/mail.log
|
||||||
|
user.* -/var/log/user.log
|
||||||
|
|
||||||
|
#
|
||||||
|
# Logging for the mail system. Split it up so that
|
||||||
|
# it is easy to write scripts to parse these files.
|
||||||
|
#
|
||||||
|
mail.info -/var/log/mail.info
|
||||||
|
mail.warn -/var/log/mail.warn
|
||||||
|
mail.err /var/log/mail.err
|
||||||
|
|
||||||
|
#
|
||||||
|
# Some "catch-all" log files.
|
||||||
|
#
|
||||||
|
*.=debug;\
|
||||||
|
auth,authpriv.none;\
|
||||||
|
mail.none -/var/log/debug
|
||||||
|
*.=info;*.=notice;*.=warn;\
|
||||||
|
auth,authpriv.none;\
|
||||||
|
cron,daemon.none;\
|
||||||
|
mail.none -/var/log/messages
|
||||||
|
|
||||||
|
#
|
||||||
|
# Emergencies are sent to everybody logged in.
|
||||||
|
#
|
||||||
|
*.emerg :omusrmsg:*
|
||||||
|
*.* @192.168.0.40:514
|
92
syslog/rsyslog.conf
Normal file
92
syslog/rsyslog.conf
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
# /etc/rsyslog.conf configuration file for rsyslog
|
||||||
|
#
|
||||||
|
# For more information install rsyslog-doc and see
|
||||||
|
# /usr/share/doc/rsyslog-doc/html/configuration/index.html
|
||||||
|
|
||||||
|
|
||||||
|
#################
|
||||||
|
#### MODULES ####
|
||||||
|
#################
|
||||||
|
|
||||||
|
module(load="imuxsock") # provides support for local system logging
|
||||||
|
module(load="imklog") # provides kernel logging support
|
||||||
|
#module(load="immark") # provides --MARK-- message capability
|
||||||
|
|
||||||
|
# provides UDP syslog reception
|
||||||
|
module(load="imudp")
|
||||||
|
input(type="imudp" port="514")
|
||||||
|
|
||||||
|
# provides TCP syslog reception
|
||||||
|
#module(load="imtcp")
|
||||||
|
#input(type="imtcp" port="514")
|
||||||
|
|
||||||
|
|
||||||
|
###########################
|
||||||
|
#### GLOBAL DIRECTIVES ####
|
||||||
|
###########################
|
||||||
|
|
||||||
|
#
|
||||||
|
# Use traditional timestamp format.
|
||||||
|
# To enable high precision timestamps, comment out the following line.
|
||||||
|
#
|
||||||
|
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
|
||||||
|
|
||||||
|
#
|
||||||
|
# Set the default permissions for all log files.
|
||||||
|
#
|
||||||
|
$FileOwner root
|
||||||
|
$FileGroup adm
|
||||||
|
$FileCreateMode 0640
|
||||||
|
$DirCreateMode 0755
|
||||||
|
$Umask 0022
|
||||||
|
|
||||||
|
#
|
||||||
|
# Where to place spool and state files
|
||||||
|
#
|
||||||
|
$WorkDirectory /var/spool/rsyslog
|
||||||
|
|
||||||
|
#
|
||||||
|
# Include all config files in /etc/rsyslog.d/
|
||||||
|
#
|
||||||
|
$IncludeConfig /etc/rsyslog.d/*.conf
|
||||||
|
|
||||||
|
|
||||||
|
###############
|
||||||
|
#### RULES ####
|
||||||
|
###############
|
||||||
|
|
||||||
|
#
|
||||||
|
# First some standard log files. Log by facility.
|
||||||
|
#
|
||||||
|
auth,authpriv.* /var/log/auth.log
|
||||||
|
*.*;auth,authpriv.none -/var/log/syslog
|
||||||
|
#cron.* /var/log/cron.log
|
||||||
|
daemon.* -/var/log/daemon.log
|
||||||
|
kern.* -/var/log/kern.log
|
||||||
|
lpr.* -/var/log/lpr.log
|
||||||
|
mail.* -/var/log/mail.log
|
||||||
|
user.* -/var/log/user.log
|
||||||
|
|
||||||
|
#
|
||||||
|
# Logging for the mail system. Split it up so that
|
||||||
|
# it is easy to write scripts to parse these files.
|
||||||
|
#
|
||||||
|
mail.info -/var/log/mail.info
|
||||||
|
mail.warn -/var/log/mail.warn
|
||||||
|
mail.err /var/log/mail.err
|
||||||
|
|
||||||
|
#
|
||||||
|
# Some "catch-all" log files.
|
||||||
|
#
|
||||||
|
*.=debug;\
|
||||||
|
auth,authpriv.none;\
|
||||||
|
mail.none -/var/log/debug
|
||||||
|
*.=info;*.=notice;*.=warn;\
|
||||||
|
auth,authpriv.none;\
|
||||||
|
cron,daemon.none;\
|
||||||
|
mail.none -/var/log/messages
|
||||||
|
|
||||||
|
#
|
||||||
|
# Emergencies are sent to everybody logged in.
|
||||||
|
#
|
||||||
|
*.emerg :omusrmsg:*
|
Loading…
x
Reference in New Issue
Block a user