New upstream version 0.6.27

This commit is contained in:
geos_one
2025-08-06 18:11:51 +02:00
parent a6b4158f1f
commit 56a986c0ba
563 changed files with 45811 additions and 35282 deletions

View File

@@ -0,0 +1,38 @@
# SAMPLE CONFIG SNIPPETS FOR APACHE WEB SERVER
Alias @PNP_URL@ "@datarootdir@"
<Directory "@datarootdir@">
AllowOverride None
<IfVersion >= 2.3>
<RequireAll>
Require all granted
# Require host 127.0.0.1
</RequireAll>
</IfVersion>
<IfVersion < 2.3>
Order allow,deny
Allow from all
</IfVersion>
#
# Use the same value as defined in nagios.cfg
#
AuthName "Nagios Access"
AuthType Basic
AuthUserFile @NAGIOS_PWD@
Require valid-user
<IfModule mod_rewrite.c>
# Turn on URL rewriting
RewriteEngine On
Options symLinksIfOwnerMatch
# Installation directory
RewriteBase @PNP_URL@/
# Protect application and system files from being viewed
RewriteRule "^(?:application|modules|system)/" - [F]
# Allow any files or directories that exist to be displayed directly
RewriteCond "%{REQUEST_FILENAME}" !-f
RewriteCond "%{REQUEST_FILENAME}" !-d
# Rewrite all other URLs to index.php/URL
RewriteRule "^.*$" "index.php/$0" [PT]
</IfModule>
</Directory>

View File

@@ -0,0 +1,293 @@
<?php
##
## Program: @PACKAGE_NAME@-@PACKAGE_VERSION@ , Performance Data Addon for Nagios(r)
## License: GPL
## Copyright (c) 2005-2010 Joerg Linge (http://www.pnp4nagios.org)
##
## This program is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License
## as published by the Free Software Foundation; either version 2
## of the License, or (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
##
# Credit: Tobi Oetiker, http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/
#
# URL rewriting is used by default to create friendly URLs.
# Set this value to '0' if URL rewriting is not available on your system.
#
$conf['use_url_rewriting'] = 1;
#
# Location of rrdtool binary
#
$conf['rrdtool'] = "@RRDTOOL@";
#
# RRDTool image size of graphs
#
$conf['graph_width'] = "500";
$conf['graph_height'] = "100";
#
# RRDTool image size of graphs in zoom window
#
$conf['zgraph_width'] = "500";
$conf['zgraph_height'] = "100";
#
# Right zoom box offset.
# rrdtool 1.3.x = 22px
# rrdtool 1.4.x = 30px
#
$conf['right_zoom_offset'] = 30;
#
# RRDTool image size of PDFs
# dimensions in pt?
if ('@PAPERSIZE@' == 'A4') {
$conf['pdf_width'] = "675";
$conf['pdf_height'] = "100";
$conf['pdf_page_size'] = "A4"; # A4 or Letter
$conf['pdf_margin_top'] = "30";
$conf['pdf_margin_left'] = "17.5";
$conf['pdf_margin_right'] = "10";
} else {
$conf['pdf_width'] = "654";
$conf['pdf_height'] = "140";
$conf['pdf_page_size'] = "letter"; # A4 or Letter
$conf['pdf_margin_top'] = "30";
$conf['pdf_margin_left'] = "20";
$conf['pdf_margin_right'] = "0";
}
#
# Additional options for RRDTool
#
# Example: White background and no border
# "--watermark 'Copyright by example.com' --slope-mode --color BACK#FFF --color SHADEA#FFF --color SHADEB#FFF"
#
$conf['graph_opt'] = "";
#
# Additional options for RRDTool used while creating PDFs
#
$conf['pdf_graph_opt'] = "";
#
# Directory where the RRD Files will be stored
#
$conf['rrdbase'] = "@PERFDATA_DIR@/";
#
# Location of "page" configs
#
$conf['page_dir'] = "@pkgsysconfdir@/pages/";
#
# Site refresh time in seconds
#
$conf['refresh'] = "90";
#
# Max age for RRD files in seconds
#
$conf['max_age'] = 60 * 60 * 6;
#
# Directory for temporary files used for PDF creation
# recent Fedoras prefer /tmp, but get private namespaces
#
$conf['temp'] = "/tmp";
#
# Link back to Nagios or Thruk ( www.thruk.org )
#
$conf['nagios_base'] = "/nagios/cgi-bin";
#
# Link back to check_mk´s multisite ( http://mathias-kettner.de/checkmk_multisite.html )
#
$conf['multisite_base_url'] = "/check_mk";
#
# Multisite Site ID this PNP installation is linked to
# This is the same value as defined in etc/multisite.mk
#
$conf['multisite_site'] = "";
#
# check authorization against mk_livestatus API
# Available since 0.6.10
#
$conf['auth_enabled'] = false;
#
# Livestatus socket path
#
#$conf['livestatus_socket'] = "tcp:localhost:6557";
$conf['livestatus_socket'] = "unix:/usr/local/nagios/var/rw/live";
#
# Which user is allowed to see all services or all hosts?
# Keywords: <USERNAME>
# Example: conf['allowed_for_all_services'] = "nagiosadmin,operator";
# This option is used while $conf['auth_enabled'] = TRUE
$conf['allowed_for_all_services'] = "";
$conf['allowed_for_all_hosts'] = "";
# Which user is allowed to see additional service links ?
# Keywords: EVERYONE NONE <USERNAME>
# Example: conf['allowed_for_service_links'] = "nagiosadmin,operator";
#
$conf['allowed_for_service_links'] = "EVERYONE";
#
# Who can use the host search function ?
# Keywords: EVERYONE NONE <USERNAME>
#
$conf['allowed_for_host_search'] = "EVERYONE";
#
# Who can use the host overview ?
# This function is called if no Service Description is given.
#
$conf['allowed_for_host_overview'] = "EVERYONE";
#
# Who can use the Pages function?
# Keywords: EVERYONE NONE <USERNAME>
# Example: conf['allowed_for_pages'] = "nagiosadmin,operator";
#
$conf['allowed_for_pages'] = "EVERYONE";
#
# Which timerange should be used for the host overview site ?
# use a key from array $views[]
#
$conf['overview-range'] = 1 ;
#
# Scale the preview images used in /popup
#
$conf['popup-width'] = "300px";
#
# jQuery UI Theme
# http://jqueryui.com/themeroller/
# Possible values are: lightness, smoothness, redmond, multisite
$conf['ui-theme'] = 'smoothness';
# Language definitions to use.
# valid options are en_US, de_DE, es_ES, ru_RU, fr_FR
#
$conf['lang'] = "en_US";
#
# Date format
#
$conf['date_fmt'] = "d.m.y G:i";
#
# This option breaks down the template name based on _ and then starts to
# build it up and check the different template directories for a suitable template.
#
# Example:
#
# Template to be used: check_esx3_host_net_usage you create a check_esx3.php
#
# It will find and match on check_esx3 first in templates dir then in templates.dist
#
$conf['enable_recursive_template_search'] = 1;
#
# Direct link to the raw XML file.
#
$conf['show_xml_icon'] = 1;
#
# Use FPDF Lib for PDF creation ?
#
$conf['use_fpdf'] = 1;
#
# Use this file as PDF background.
#
$conf['background_pdf'] = '@pkgsysconfdir@/background-A4.pdf' ;
#$conf['background_pdf'] = '@pkgsysconfdir@/background-letter.pdf' ;
#
# Enable Calendar
#
$conf['use_calendar'] = 1;
#
# Define default views with title and start timerange in seconds
#
# supported keys:
# 'title' => The name of the view, e.g. "4 Hours"
# 'start' => The number of seconds before the current time from whence the graph x-axis should start
# 'extra_args' => additional arguments passed to rrdtool for this view's graph
#
# remarks:
# required escape on " with backslash
# extra_args are appended to args/opts defined elsewhere (e.g. in templates), but no effort is made to de-duplicate
#
#$views[] = array('title' => 'One Hour', 'start' => (60*60) );
$views[] = array('title' => '4 Hours', 'start' => (60 * 60 * 4) );
$views[] = array('title' => '25 Hours', 'start' => (60 * 60 * 25) );
$views[] = array('title' => 'One Week', 'start' => (60 * 60 * 25 * 7) );
$views[] = array('title' => 'One Month', 'start' => (60 * 60 * 24 * 32) );
$views[] = array('title' => 'One Year', 'start' => (60 * 60 * 24 * 380) );
#
# rrdcached support
# Use only with rrdtool svn revision 1511+
#
# $conf['RRD_DAEMON_OPTS'] = 'unix:/tmp/rrdcached.sock';
$conf['RRD_DAEMON_OPTS'] = '';
# A list of directories to search for templates
# @datarootdir@/templates.dist is always the last directory to be searched for templates
#
# Add your own template directories here
# First match wins!
#$conf['template_dirs'][] = '/usr/local/check_mk/pnp-templates';
$conf['template_dirs'][] = '@datarootdir@/templates';
$conf['template_dirs'][] = '@datarootdir@/templates.dist';
#
# Directory to search for special templates
#
$conf['special_template_dir'] = '@datarootdir@/templates.special';
#
# Regex to detect mobile devices
# This regex is evaluated against the USER_AGENT String
#
$conf['mobile_devices'] = 'iPhone|iPod|iPad|android';
#
# additional colour schemes
# values taken from www.colorbrewer2.org
# for details on usage refer to the documentation of the helper functions
#
$scheme['Reds'] = array ('#FEE0D2','#FCBBA1','#FC9272','#FB6A4A','#EF3B2C','#CB181D','#A50F15','#67000D');
$scheme['Greens'] = array ('#E5F5E0','#C7E9C0','#A1D99B','#74C476','#41AB5D','#23AB45','#006D2C','#00441B');
$scheme['Blues'] = array ('#DEEBF7','#C6DBEF','#9ECAE1','#6BAED6','#4292C6','#2171B5','#08519C','#08306B');
$scheme['Oranges'] = array ('#FEE6CE','#FDD0A2','#FDAE6B','#FD8D3C','#F16913','#D94801','#A63603','#7F2704');
$scheme['Purples'] = array ('#EFEDF5','#DADAEB','#BDBDDC','#9E9AC8','#807DBA','#6A51A3','#54278F','#3F007A');
$scheme['RdPu'] = array ('#FDE0DD','#FCC5C0','#FA9FB5','#F768A1','#DD3497','#AE017E','#7A0177','#49006A');
$scheme['Dark2'] = array ('#1B9E77','#D95F02','#7570B3','#E7298A','#66A61E','#E6ab02','#a6761d','#666666');
$scheme['BrBG'] = array ('#543005','#8C510A','#BF812D','#DFC27D','#F6E8C3','#C7EAE5','#80CDC1','#35978F','#01665E','#003C30');
$scheme['PiYG'] = array ('#8E0152','#C51B7D','#DE77AE','#F1B6DA','#FDE0EF','#E6F5D0','#B8E186','#7FBC41','#4D9221','#276419');
$scheme['PRGn'] = array ('#40004B','#762A83','#9970AB','#C2A5CF','#E7D4E8','#D9F0D3','#A6DBA0','#5AAE61','#1B7837','#00441B');
$scheme['PuOr'] = array ('#7F3B08','#B35806','#E08214','#FDB863','#FEE0B6','#D8DAEB','#B2ABD2','#8073AC','#542788','#2D004B');
$scheme['RdBu'] = array ('#67001F','#B2182B','#D6604D','#F4A582','#FDDBC7','#D1E5F0','#92C5DE','#4393C3','#2166AC','#053061');
$scheme['RdGy'] = array ('#67001F','#B2182B','#D6604D','#F4A582','#FDDBC7','#E0E0E0','#BABABA','#878787','#4D4D4D','#1A1A1A');
$scheme['RdYlBu'] = array ('#A50026','#D73027','#F46D43','#FDAE61','#FEE090','#E0F3F8','#ABD9E9','#74ADD1','#4575B4','#313695');
$scheme['RdYlGn'] = array ('#A50026','#D73027','#F46D43','#FDAE61','#FEE08B','#D9EF8B','#A6D96A','#66BD63','#1A9850','#006837');
$scheme['Spectral'] = array ('#9E0142','#D53E4F','#F46D43','#FDAE61','#FEE08B','#E6F598','#ABDDA4','#66C2A5','#3288BD','#5E4FA2');
$scheme['Paired'] = array ('#A6CEE3','#1F78B4','#B2DF8A','#33A02C','#FB9A99','#E31A1C','#FDBF6F','#FF7F00','#CAB2D6','#6A3D9A');
$scheme['mixed1'] = array ('#8C510A','#2166ac','#BF812D','#4393c3','#DFC27D','#92c5de','#F6E8C3','#d1e5f0',
'#fddbc7','#C7EAE5','#f4a582','#80CDC1','#d6604d','#35978F','#b2182b','#01665E');
$scheme['mixed2'] = array ('#b2182b','#2166ac','#d6604d','#4393c3','#f4a582','#92c5de','#fddbc7','#d1e5f0',
'#F6E8C3','#C7EAE5','#DFC27D','#80CDC1','#BF812D','#35978F','#8C510A','#01665E');
$scheme['mixed3'] = array ('#67001F','#80CDC1','#B2182B','#35978F','#D6604D','#01665E','#F4A582','#003C30',
'#FDDBC7','#92C5DE','#D1E5F0','#2166AC','#4393C3','#8C510A','#053061','#BF812D');

View File

@@ -0,0 +1,5 @@
<?php
#
# local config info
#

View File

@@ -0,0 +1,20 @@
#
# Sample Lighttpd Config snippet.
# Tested on Debian.
#
server.modules += ( "mod_auth" )
alias.url += (
"@PNP_URL@" => "@datarootdir@"
)
$HTTP["url"] =~ "(^@PNP_URL@)" {
auth.backend = "htpasswd"
auth.backend.htpasswd.userfile = "@NAGIOS_PWD@"
auth.require = ( "" => (
"method" => "basic",
"realm" => "Nagios Access",
"require" => "valid-user"
)
)
}

View File

@@ -0,0 +1,42 @@
#
# definitions for PNP in nagios.cfg (icinga.cfg)
# please make sure that you don't have duplicate entries
#
# Synchronous mode
#
process_performance_data=1
enable_environment_macros=1 # available since Nagios 3.x
service_perfdata_command=process-service-perfdata
host_perfdata_command=process-host-perfdata # NOT advisable prior to Nagios 3.0
#
# Bulk / NPCD mode
#
process_performance_data=1
# *** the template definition differs from the one in the original nagios.cfg
#
service_perfdata_file=@localstatedir@/service-perfdata
service_perfdata_file_template=DATATYPE::SERVICEPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tSERVICEDESC::$SERVICEDESC$\tSERVICEPERFDATA::$SERVICEPERFDATA$\tSERVICECHECKCOMMAND::$SERVICECHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\tSERVICESTATE::$SERVICESTATE$\tSERVICESTATETYPE::$SERVICESTATETYPE$
service_perfdata_file_mode=a
service_perfdata_file_processing_interval=15
service_perfdata_file_processing_command=process-service-perfdata-file
# *** the template definition differs from the one in the original nagios.cfg
#
host_perfdata_file=@localstatedir@/host-perfdata
host_perfdata_file_template=DATATYPE::HOSTPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tHOSTPERFDATA::$HOSTPERFDATA$\tHOSTCHECKCOMMAND::$HOSTCHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$
host_perfdata_file_mode=a
host_perfdata_file_processing_interval=15
host_perfdata_file_processing_command=process-host-perfdata-file
#
# Module mode
#
event_broker_options=-1 # minimum 4+8=12
process_performance_data=1
broker_module=@libdir@/npcdmod.o config_file=@pkgsysconfdir@/npcd.cfg

View File

@@ -0,0 +1,34 @@
# SAMPLE CONFIG SNIPPETS FOR NGINX WEB SERVER
# Contributed by Thomas Charbonnel <thomas@evax.fr>
#
location @PNP_URL@ {
# e.g. /usr/local/pnp4nagios/share;
alias @datarootdir@;
auth_basic "Nagios Access";
auth_basic_user_file @NAGIOS_PWD@;
index index.php;
# if we have e.g. /pnp4nagios/media/css/common.css
# nginx will check
# /usr/local/png4nagios/share/media/css/common/css
# and return it if it's found
# if it can't find a matching file even adding a trailing /
# the request is handled to the @pnp4nagios location
try_files $uri $uri/ @pnp4nagios;
}
location @pnp4nagios {
# this implies the definition of some backend
# e.g
# upstream php {
# server 127.0.0.1:9000;
# }
fastcgi_pass php;
fastcgi_index index.php;
# implies an external file, but this is common nginx practice
include fastcgi_params;
# this splits out the trailing path
# eg index.php?host -> $fastcgi_path_info == 'host'
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME @datarootdir@/index.php;
}

View File

@@ -0,0 +1,195 @@
# NPCD.cfg - sample configuration file for PNPs NPCD
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation;
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# Privilege Options
user = @nagios_user@
group = @nagios_grp@
#########################
# #
# Logging Options #
# #
#########################
# log_type - define if you want your logs to
# 'syslog' or to a 'file'
#
# log_type = <value>
#
log_type = file
#log_type = syslog
# log_file - define a path to your logfile
# needed if 'log_type'='file'
#
# log_file = </path/to/logpath/filename>
#
log_file = @PNP_LOGDIR@/npcd.log
# max_logfile_size - defines the maximum filesize (bytes)
# before the logfile will rotated.
#
# max_logfile_size = <value> (default 10Mbyte)
#
max_logfile_size = 10485760
# log_level - how much should we log?
#
# log_level = <integer value>
#
# 0 = No logging - except errors
# 1 = Small logging - some few more output
# 2 = More Logging (actual ALL logs)
# -1 = DEBUG Mode - ALL Logging and slower processing
#
log_level = 0
#########################
# #
# NEEDED OPTIONS #
# #
#########################
# perfdata_spool_dir - where we can find the
# performance data files
#
# perfdata_spool_dir = </path/to/directory/>
#
perfdata_spool_dir = @PERFDATA_SPOOL_DIR@
# Execute following command for each found file
# in 'perfdata_spool_dir'
#
# perfdata_file_run_cmd = </path/to/command>
#
# Must be executable by user/group from above
#
# perfdata_file_run_cmd = </path/to/filename>
#
perfdata_file_run_cmd = @libexecdir@/@pp_pl_name@
# perfdata_file_run_cmd_args (optional)
#
# If you wish, you can apply more arguments to the
# perfdata_file_run_cmd
#
# Hint:
# NPCD will create a command line like this:
# '<perfdata_file_run_cmd> <perfdata_file_run_cmd_args> <filename_from_spool_dir>'
#
perfdata_file_run_cmd_args = --bulk
# identify_npcd (optional)
#
# If set to one (by default) npcd will append
# '-n' to the perfdata_file_run_cmd
#
# identify_npcd = 0|1 (default: 1)
identify_npcd = 1
# npcd_max_threads - define how many parallel threads we
# should start
npcd_max_threads = 5
# sleep_time - how many seconds npcd should wait between dirscans
#
# sleep_time = 15 (default)
sleep_time = 15
# EXPERIMENTAL
#
# load_threshold - npcd won't start new threads
# if your system load is above this threshold
#
# load_threshold = <float value> (default: 0.0)
#
# Hint: Do not use "," as decimal delimiter
#
# 07/15/2008: Every value above 0.0 will
# enable this feature
load_threshold = 0.0
# location of your pid file
pid_file=@piddir@/npcd.pid
#########################
# #
# NPCDMOD OPTIONS #
# #
#########################
# perfdata_file - where should the npcdmod.o
# write the performance data
#
# must not be within the same directory as
# perfdata_spool_dir
#
# perfdata_file = </path/to/file>
#
perfdata_file = @localstatedir@/perfdata.dump
# perfdata_spool_filename - declare the destination
# filename for the spooled files
#
# This option allows you a customized filename.
# Usefull if you own different nagios servers
# which write their data to a shared storage.
#
# perfdata_spool_filename = <filename>
#
# Hint:
# The final files will be moved to
# 'perfdata_spool_dir/perfdata_spool_filename-TIMESTAMP'
#
# Example:
#
# perfdata_spool_filename = perfdata-NY
# perfdata_spool_filename = perfdata-LA
perfdata_spool_filename = perfdata
#
# perfdata_file_processing_interval
#
perfdata_file_processing_interval = 15
# We have to end with a newline

View File

@@ -0,0 +1,30 @@
# -*- conf -*-
# definitions for PNP processing commands
# please choose one of the three files
# ( pnp-synchronous.cfg
# pnp-bulk.cfg
# pnp-npcd.cfg )
#
# copy to your nagios object config directory
# /etc/nagios/objects
# then edit /etc/nagios/nagios.conf to load the config file
#
# OR copy to you nagios object config directory
# /etc/nagios/objects.d
# where all of the config files are loaded.
#
#
# Bulk mode
#
define command {
command_name process-service-perfdata-file
command_line @libexecdir@/process_perfdata.pl --bulk @PERFDATA_SPOOL_DIR@/service-perfdata
}
define command {
command_name process-host-perfdata-file
command_line @libexecdir@/process_perfdata.pl --bulk @PERFDATA_SPOOL_DIR@/host-perfdata
}

View File

@@ -0,0 +1,28 @@
# -*- conf -*-
# definitions for PNP processing commands
# please choose one of the three files
# ( pnp-synchronous.cfg
# pnp-bulk.cfg
# pnp-npcd.cfg )
#
# copy to your nagios object config directory
# /etc/nagios/objects
# then edit /etc/nagios/nagios.conf to load the config file
#
# OR copy to you nagios object config directory
# /etc/nagios/objects.d
# where all of the config files are loaded.
#
#
# Bulk with NPCD mode
#
define command {
command_name process-service-perfdata-file
command_line /bin/mv @PERFDATA_SPOOL_DIR@/service-perfdata @PERFDATA_SPOOL_DIR@/service-perfdata.$TIMET$
}
define command {
command_name process-host-perfdata-file
command_line /bin/mv @PERFDATA_SPOOL_DIR@/host-perfdata @PERFDATA_SPOOL_DIR@/host-perfdata.$TIMET$
}

View File

@@ -0,0 +1,31 @@
# -*- conf -*-
# definitions for PNP processing commands
# please choose one of the three files
# ( pnp-synchronous.cfg
# pnp-bulk.cfg
# pnp-npcd.cfg )
#
# copy to your nagios object config directory
# /etc/nagios/objects
# then edit /etc/nagios/nagios.conf to load the config file
#
# OR copy to you nagios object config directory
# /etc/nagios/objects.d
# where all of the config files are loaded.
#
#
# synchronous mode
#
define command {
command_name process-service-perfdata-pnp
command_line @PERL@ @libexecdir@/process_perfdata.pl
}
define command {
command_name process-host-perfdata-pnp
command_line @PERL@ @libexecdir@/process_perfdata.pl -d HOSTPERFDATA
}

View File

@@ -0,0 +1,156 @@
# @PACKAGE_NAME@@PACKAGE_VERSION@
# Config File for process_perfdata.pl
#
# More info on RRDtool can be found at www.rrdtool.org
#
# process_perfdata.pl timeout in seconds
#
TIMEOUT = 15
#
# Use RRDs Perl module
#
USE_RRDs = 1
#
# Path to XML/RRD files
#
RRDPATH = @PERFDATA_DIR@
#
# Location of RRDtool binary
#
RRDTOOL = @RRDTOOL@
#
# Location of PNP config files
#
CFG_DIR = @pkgsysconfdir@
#
# Use a single RRD database per service
# one or more datasources per RRD database
# RRD_STORAGE_TYPE = SINGLE
#
# Use multiple RRD databases per service
# one RRD database per datasource.
# RRD_STORAGE_TYPE = MULTIPLE
#
RRD_STORAGE_TYPE = SINGLE
#
# Max. interval between samples/updates
#
RRD_HEARTBEAT = 8460
#
# File with RRA options used to create new RRD files
#
RRA_CFG = @pkgsysconfdir@/rra.cfg
#
# Interval at which PDPs are generated
#
RRA_STEP = 60
#
# Name of the log file
#
LOG_FILE = @PERFDATA_LOG@
#
# Loglevel 0=silent 1=normal 2=debug
#
LOG_LEVEL = @DEBUG_LEVEL@
#
# XML encoding
# The supported encodings are ISO-8859-1, UTF-8 and US-ASCII.
# http://www.php.net/xml-parser-create
#
XML_ENC = UTF-8
#
# XML update delay in seconds
# 0 = Update XML Files everytime new data arrives
#
# Use this option to reduce disk I/O
#
XML_UPDATE_DELAY = 0
#
# Use only with RRDtool svn revision 1511+
#
# RRD_DAEMON_OPTS = unix:/tmp/rrdcached.sock
RRD_DAEMON_OPTS =
#
# Spool directory used for internal statistics
#
STATS_DIR = @PERFDATA_STATS@
#
# Ignore certain performance data based on host name
#
# You can put it any regular expression that matches the host name
#
#IGNORE_HOST_PATTERN =
#
# Ignore certain performance data based on service name
#
# You can put it any regular expression that matches the service name
#
#IGNORE_SERVICE_PATTERN =
#
# Ignore certain performance data based on label of an individual data point
#
# You can put it any regular expression that matches the label
#
#IGNORE_LABEL_PATTERN =
#########################################################
# Gearman Worker Config
# Only used when running as Gearman worker
#
# How many child processes
#
PREFORK = 1
#
# Gearman server to connect to
# Comma separated list of Gearman job servers
#
GEARMAN_HOST = localhost:4730
#
# Restart child process after a given count of requests
#
REQUESTS_PER_CHILD = 10000
#
# Enables or disables encryption.
# It is strongly advised to not disable encryption, or
# anybody will be able to inject packages to your worker.
# When using encryption, you will have to specify a shared
# secret eithr via the KEY or the KEY_FILE option.
# Default is 1.
#
ENCRYPTION = 1
#
# A shared password which will be used for
# encryption of data pakets. Should be at least 8
# bytes long. Maximum length is 32 characters.
#
KEY = should_be_changed
#
# The shared password will be read from this file.
# Only the first 32 characters will be used.
#
#KEY_FILE = @pkgsysconfdir@/secret.key

View File

@@ -0,0 +1,36 @@
#
# Define the default RRA Step in seconds
# More Infos on
# http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html
#
RRA_STEP=60
#
# PNP default RRA config
#
# you will get 400kb of data per datasource
#
# 2880 entries with 1 minute step = 48 hours
#
RRA:AVERAGE:0.5:1:2880
#
# 2880 entries with 5 minute step = 10 days
#
RRA:AVERAGE:0.5:5:2880
#
# 4320 entries with 30 minute step = 90 days
#
RRA:AVERAGE:0.5:30:4320
#
# 5840 entries with 360 minute step = 4 years
#
RRA:AVERAGE:0.5:360:5840
RRA:MAX:0.5:1:2880
RRA:MAX:0.5:5:2880
RRA:MAX:0.5:30:4320
RRA:MAX:0.5:360:5840
RRA:MIN:0.5:1:2880
RRA:MIN:0.5:5:2880
RRA:MIN:0.5:30:4320
RRA:MIN:0.5:360:5840

View File

@@ -0,0 +1,224 @@
###############################################################################
# TEMPLATES.CFG - SAMPLE OBJECT TEMPLATES
#
#
# NOTES: This config file provides you with some example object definition
# templates that are referred by other host, service, contact, etc.
# definitions in other config files.
#
# You don't need to keep these definitions in a separate file from your
# other object definitions. This has been done just to make things
# easier to understand.
#
###############################################################################
###############################################################################
#
# CONTACT TEMPLATES
#
###############################################################################
# Generic contact definition template
# This is NOT a real contact, just a template!
define contact {
name generic-contact ; The name of this contact template
service_notification_period 24x7 ; service notifications can be sent anytime
host_notification_period 24x7 ; host notifications can be sent anytime
service_notification_options w,u,c,r,f,s ; send notifications for all service states, flapping events, and scheduled downtime events
host_notification_options d,u,r,f,s ; send notifications for all host states, flapping events, and scheduled downtime events
service_notification_commands notify-service-by-email ; send service notifications via email
host_notification_commands notify-host-by-email ; send host notifications via email
register 0 ; DON'T REGISTER THIS DEFINITION - ITS NOT A REAL CONTACT, JUST A TEMPLATE!
}
###############################################################################
#
# HOST TEMPLATES
#
###############################################################################
# Generic host definition template
# This is NOT a real host, just a template!
define host {
name generic-host ; The name of this host template
use host-pnp ; pnp4nagios graphing
notifications_enabled 1 ; Host notifications are enabled
event_handler_enabled 1 ; Host event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
notification_period 24x7 ; Send host notifications at any time
register 0 ; DON'T REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
}
# Linux host definition template
# This is NOT a real host, just a template!
define host {
name linux-server ; The name of this host template
use generic-host ; This template inherits other values from the generic-host template
check_period 24x7 ; By default, Linux hosts are checked round the clock
check_interval 5 ; Actively check the host every 5 minutes
retry_interval 1 ; Schedule host check retries at 1 minute intervals
max_check_attempts 10 ; Check each Linux host 10 times (max)
check_command check-host-alive ; Default command to check Linux hosts
notification_period workhours ; Linux admins hate to be woken up, so we only notify during the day
; Note that the notification_period variable is being overridden from
; the value that is inherited from the generic-host template!
notification_interval 120 ; Resend notifications every 2 hours
notification_options d,u,r ; Only send notifications for specific host states
contact_groups admins ; Notifications get sent to the admins by default
register 0 ; DON'T REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
}
# Windows host definition template
# This is NOT a real host, just a template!
define host {
name windows-server ; The name of this host template
use generic-host ; Inherit default values from the generic-host template
check_period 24x7 ; By default, Windows servers are monitored round the clock
check_interval 5 ; Actively check the server every 5 minutes
retry_interval 1 ; Schedule host check retries at 1 minute intervals
max_check_attempts 10 ; Check each server 10 times (max)
check_command check-host-alive ; Default command to check if servers are "alive"
notification_period 24x7 ; Send notification out at any time - day or night
notification_interval 30 ; Resend notifications every 30 minutes
notification_options d,r ; Only send notifications for specific host states
contact_groups admins ; Notifications get sent to the admins by default
hostgroups windows-servers ; Host groups that Windows servers should be a member of
register 0 ; DON'T REGISTER THIS - ITS JUST A TEMPLATE
}
# We define a generic printer template that can
# be used for most printers we monitor
define host {
name generic-printer ; The name of this host template
use generic-host ; Inherit default values from the generic-host template
check_period 24x7 ; By default, printers are monitored round the clock
check_interval 5 ; Actively check the printer every 5 minutes
retry_interval 1 ; Schedule host check retries at 1 minute intervals
max_check_attempts 10 ; Check each printer 10 times (max)
check_command check-host-alive ; Default command to check if printers are "alive"
notification_period workhours ; Printers are only used during the workday
notification_interval 30 ; Resend notifications every 30 minutes
notification_options d,r ; Only send notifications for specific host states
contact_groups admins ; Notifications get sent to the admins by default
statusmap_image printer.png
register 0 ; DON'T REGISTER THIS - ITS JUST A TEMPLATE
}
# Define a template for switches that we can reuse
define host {
name generic-switch ; The name of this host template
use generic-host ; Inherit default values from the generic-host template
check_period 24x7 ; By default, switches are monitored round the clock
check_interval 5 ; Switches are checked every 5 minutes
retry_interval 1 ; Schedule host check retries at 1 minute intervals
max_check_attempts 10 ; Check each switch 10 times (max)
check_command check-host-alive ; Default command to check if routers are "alive"
notification_period 24x7 ; Send notifications at any time
notification_interval 30 ; Resend notifications every 30 minutes
notification_options d,r ; Only send notifications for specific host states
contact_groups admins ; Notifications get sent to the admins by default
statusmap_image switch.png
register 0 ; DON'T REGISTER THIS - ITS JUST A TEMPLATE
}
# Define a template for routers that we can reuse
define host{
name generic-router ; The name of this host template
use generic-switch ; Inherit default values from the generic-host template
statusmap_image router.png
register 0 ; DONT REGISTER THIS - ITS JUST A TEMPLATE
}
###############################################################################
#
# SERVICE TEMPLATES
#
###############################################################################
# Generic service definition template
# This is NOT a real service, just a template!
define service {
name generic-service ; The 'name' of this service template
use service-pnp ; pnp4nagios graphing
active_checks_enabled 1 ; Active service checks are enabled
passive_checks_enabled 1 ; Passive service checks are enabled/accepted
parallelize_check 1 ; Active service checks should be parallelized (disabling this can lead to major performance problems)
obsess_over_service 1 ; We should obsess over this service (if necessary)
check_freshness 0 ; Default is to NOT check service 'freshness'
notifications_enabled 1 ; Service notifications are enabled
event_handler_enabled 1 ; Service event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
is_volatile 0 ; The service is not volatile
check_period 24x7 ; The service can be checked at any time of the day
max_check_attempts 3 ; Re-check the service up to 3 times in order to determine its final (hard) state
check_interval 10 ; Check the service every 10 minutes under normal conditions
retry_interval 2 ; Re-check the service every two minutes until a hard state can be determined
contact_groups admins ; Notifications get sent out to everyone in the 'admins' group
notification_options w,u,c,r ; Send notifications about warning, unknown, critical, and recovery events
notification_interval 60 ; Re-notify about service problems every hour
notification_period 24x7 ; Notifications can be sent out at any time
register 0 ; DON'T REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
}
# Local service definition template
# This is NOT a real service, just a template!
define service {
name local-service ; The name of this service template
use generic-service ; Inherit default values from the generic-service definition
max_check_attempts 4 ; Re-check the service up to 4 times in order to determine its final (hard) state
check_interval 5 ; Check the service every 5 minutes under normal conditions
retry_interval 1 ; Re-check the service every minute until a hard state can be determined
register 0 ; DON'T REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
}
######################################################
#
# pnp4nagios
#
define host {
name host-pnp
action_url /pnp4nagios/index.php/graph?host=$HOSTNAME$&srv=_HOST_
register 0
}
define service {
name service-pnp
action_url /pnp4nagios/index.php/graph?host=$HOSTNAME$&srv=$SERVICEDESC$
register 0
}