Changeset 716 for noc/nagios


Ignore:
Timestamp:
Apr 7, 2008, 6:56:45 AM (17 years ago)
Author:
quentin
Message:
Update Nagios configuration to run on Debian's nagios2
Location:
noc/nagios
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • noc/nagios/checkcommands.cfg

    r429 r716  
    3434################################################################################
    3535
    36 
    37 
    38 
    39 ################################################################################
    40 #
    41 # SAMPLE SERVICE CHECK COMMANDS
    42 #
    43 # These are some example service check commands.  They may or may not work on
    44 # your system, as they must be modified for your plugins.  See the HTML
    45 # documentation on the plugins for examples of how to configure command definitions.
    46 #
    47 ################################################################################
    48 
    49 
    50 # 'check_dns' command definition
    51 define command{
    52         command_name    check_dns
    53         command_line    $USER1$/check_dns -H www.yahoo.com -s $HOSTADDRESS$
    54         }
    55 
    56 
    57 # 'check_ftp' command definition
    58 define command{
    59         command_name    check_ftp
    60         command_line    $USER1$/check_ftp -H $HOSTADDRESS$
    61         }
    62 
    63 
    64 # 'check_hpjd' command definition
    65 define command{
    66         command_name    check_hpjd
    67         command_line    $USER1$/check_hpjd -H $HOSTADDRESS$ -C public
    68         }
    69 
    70 
    71 # 'check_http' command definition
    72 define command{
    73         command_name    check_http
    74         command_line    $USER1$/check_http -H $HOSTADDRESS$
    75         }
    7636
    7737# 'check_http_heartbeat' command definition
     
    11575        }
    11676
    117 
    118 # 'check_nntp' command definition
    119 define command{
    120         command_name    check_nntp
    121         command_line    $USER1$/check_nntp -H $HOSTADDRESS$
    122         }
    123 
    124 
    125 # 'check_ping' command definition
    126 define command{
    127         command_name    check_ping
    128         command_line    $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5
    129         }
    130 
    131 
    132 # 'check_pop' command definition
    133 define command{
    134         command_name    check_pop
    135         command_line    $USER1$/check_pop -H $HOSTADDRESS$
    136         }
    137 
    138 
    139 # 'check_smtp' command definition
    140 define command{
    141         command_name    check_smtp
    142         command_line    $USER1$/check_smtp -H $HOSTADDRESS$
    143         }
    144 
    145 
    146 # 'check_tcp' command definition
    147 define command{
    148         command_name    check_tcp
    149         command_line    $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$
    150         }
    151 
    152 
    153 # 'check_telnet' command definition
    154 define command{
    155         command_name    check_telnet
    156         command_line    $USER1$/check_tcp -H $HOSTADDRESS$ -p 23
    157         }
    158 
    159 
    160 # 'check_udp' command definition
    161 define command{
    162         command_name    check_udp
    163         command_line    $USER1$/check_udp -H $HOSTADDRESS$ -p $ARG1$
    164         }
    165 
    166 
    167 
    168 
    16977################################################################################
    17078#
     
    18593#        }
    18694
    187 define command{
    188         command_name    check-host-alive
    189         command_line    $USER1$/check_ping -H $HOSTADDRESS$ -w 99,99% -c 100,100% -p 1
    190         }
    191 
    192 define command {
    193         command_name    check_ssh
    194         command_line    $USER1$/check_ssh $HOSTADDRESS$
    195 }
     95#define command{
     96#        command_name    check-host-alive
     97#        command_line    $USER1$/check_ping -H $HOSTADDRESS$ -w 99,99% -c 100,100% -p 1
     98#        }
    19699
    197100define command {
     
    251154
    252155define command {
    253         command_name    check_mysql
    254         command_line    $USER1$/check_mysql -H $HOSTADDRESS$ -a $USER3$ $USER4$
    255 }
    256 
    257 define command {
    258156        command_name    check_remote_mysql
    259157        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_mysql -a $USER3$ $USER4$
  • noc/nagios/nagios.cfg

    r535 r716  
    11##############################################################################
    22#
    3 # NAGIOS.CFG - Sample Main Config File for Nagios
    4 #
    5 # Read the documentation for more information on this configuration
    6 # file.  I've provided some comments here, but things may not be so
    7 # clear without further explanation.
    8 #
    9 # Last Modified: 11-23-2005
     3# NAGIOS.CFG - Main Config File for Nagios
    104#
    115##############################################################################
     
    1711# in the config file!!!
    1812
    19 log_file=/var/log/nagios/nagios.log
     13log_file=/var/log/nagios2/nagios.log
    2014
    2115
     
    3529# plugins, so you should use the same config file provided with the
    3630# plugin release rather than the one provided with Nagios.
    37 cfg_file=/etc/nagios/checkcommands.cfg
     31cfg_file=/etc/nagios2/checkcommands.cfg
     32
     33# Debian also defaults to using the check commands defined by the debian
     34# nagios-plugins package
     35cfg_dir=/etc/nagios-plugins/config
    3836
    3937# Misc commands (notification and event handler commands, etc)
    40 cfg_file=/etc/nagios/misccommands.cfg
     38cfg_file=/etc/nagios2/misccommands.cfg
    4139
    4240# You can split other types of object definitions across several
     
    4442# single config file.
    4543
    46 cfg_file=/etc/nagios/base.cfg
    47 
    48 #cfg_file=/etc/nagios/contactgroups.cfg
    49 cfg_file=/etc/nagios/contacts.cfg
    50 #cfg_file=/etc/nagios/dependencies.cfg
    51 #cfg_file=/etc/nagios/escalations.cfg
    52 cfg_file=/etc/nagios/hostgroups.cfg
    53 cfg_file=/etc/nagios/hosts.cfg
    54 cfg_file=/etc/nagios/services.cfg
    55 #cfg_file=/etc/nagios/timeperiods.cfg
     44cfg_file=/etc/nagios2/base.cfg
     45
     46#cfg_file=/etc/nagios2/contactgroups.cfg
     47cfg_file=/etc/nagios2/contacts.cfg
     48#cfg_file=/etc/nagios2/dependencies.cfg
     49#cfg_file=/etc/nagios2/escalations.cfg
     50cfg_file=/etc/nagios2/hostgroups.cfg
     51cfg_file=/etc/nagios2/hosts.cfg
     52cfg_file=/etc/nagios2/services.cfg
     53#cfg_file=/etc/nagios2/timeperiods.cfg
    5654
    5755# Extended host/service info definitions are now stored along with
    5856# other object definitions:
    59 #cfg_file=/etc/nagios/hostextinfo.cfg
    60 #cfg_file=/etc/nagios/serviceextinfo.cfg
     57#cfg_file=/etc/nagios2/hostextinfo.cfg
     58#cfg_file=/etc/nagios2/serviceextinfo.cfg
    6159
    6260# You can also tell Nagios to process all config files (with a .cfg
     
    6462# directive as shown below:
    6563
    66 #cfg_dir=/etc/nagios/servers
    67 #cfg_dir=/etc/nagios/printers
    68 #cfg_dir=/etc/nagios/switches
    69 #cfg_dir=/etc/nagios/routers
     64#cfg_dir=/etc/nagios2/servers
     65#cfg_dir=/etc/nagios2/printers
     66#cfg_dir=/etc/nagios2/switches
     67#cfg_dir=/etc/nagios2/routers
    7068
    7169
     
    7876# when the config files are modified after Nagios starts.
    7977
    80 object_cache_file=/var/log/nagios/objects.cache
     78object_cache_file=/var/cache/nagios2/objects.cache
    8179
    8280
     
    9189# can be placed on this file.
    9290
    93 resource_file=/etc/nagios/private/resource.cfg
     91resource_file=/etc/nagios2/resource.cfg
    9492
    9593
     
    10199#  restarts.
    102100
    103 status_file=/var/log/nagios/status.dat
     101status_file=/var/cache/nagios2/status.dat
    104102
    105103
     
    159157# directory level instead of on the file, as the file is deleted every
    160158# time its contents are processed.
    161 
    162 command_file=/var/spool/nagios/cmd/nagios.cmd
     159# Debian Users: In case you didn't read README.Debian yet, _NOW_ is the
     160# time to do it.
     161
     162command_file=/var/lib/nagios2/rw/nagios.cmd
    163163
    164164
     
    168168# comments.
    169169
    170 comment_file=/var/log/nagios/comments.dat
     170comment_file=/var/lib/nagios2/comments.dat
    171171
    172172
     
    176176# downtime data.
    177177
    178 downtime_file=/var/log/nagios/downtime.dat
     178downtime_file=/var/lib/nagios2/downtime.dat
    179179
    180180
     
    184184# in when it is running in daemon mode.
    185185
    186 lock_file=/var/run/nagios.pid
     186lock_file=/var/run/nagios2/nagios2.pid
    187187
    188188
     
    194194# running.
    195195
    196 temp_file=/var/log/nagios/nagios.tmp
     196temp_file=/var/cache/nagios2/nagios.tmp
    197197
    198198
     
    241241# placed (assuming you've chosen to do log rotation).
    242242
    243 log_archive_path=/var/log/nagios/archives
     243log_archive_path=/var/log/nagios2/archives
    244244
    245245
     
    507507# variable is set to 1.
    508508
    509 state_retention_file=/var/log/nagios/retention.dat
     509state_retention_file=/var/lib/nagios2/retention.dat
    510510
    511511
     
    639639# Values: 1 = process performance data, 0 = do not process performance data
    640640
    641 #process_performance_data=0
     641process_performance_data=0
    642642
    643643
     
    862862# Nagios with embedded Perl support, this option has no effect.
    863863
    864 p1_file=/usr/sbin/p1.pl
     864p1_file=/usr/lib/nagios2/p1.pl
    865865
    866866
     
    951951
    952952
    953 process_performance_data=1
    954 service_perfdata_file=/home/noc/ng/log/perfdata
    955 service_perfdata_file_template=$LASTSERVICECHECK$||$HOSTNAME$||$SERVICEDESC$||$SERVICEOUTPUT$||$SERVICEPERFDATA$
    956 service_perfdata_file_mode=a
    957 service_perfdata_file_processing_interval=60
    958 service_perfdata_file_processing_command=ng-service-perfdata
     953#process_performance_data=1
     954#service_perfdata_file=/home/noc/ng/log/perfdata
     955#service_perfdata_file_template=$LASTSERVICECHECK$||$HOSTNAME$||$SERVICEDESC$||$SERVICEOUTPUT$||$SERVICEPERFDATA$
     956#service_perfdata_file_mode=a
     957#service_perfdata_file_processing_interval=60
     958#service_perfdata_file_processing_command=ng-service-perfdata
    959959# EOF (End of file)
Note: See TracChangeset for help on using the changeset viewer.