summaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
authorLeap devs <sysdev@leap.se>2012-09-19 16:29:34 +0000
committerLeap devs <sysdev@leap.se>2012-09-19 16:29:34 +0000
commiteafb4c73ee82915bf83eac01bb26265c531a68e2 (patch)
treecc43c64a64eed30c601a1aaa04e0521beca43a75 /README
parent66257f3c425fea5fcea2acb999854aae5e7cf9f1 (diff)
parent41fe95b36253826b8f801ee1669acdb28c70076c (diff)
Merge branch 'immerda'
Conflicts: manifests/apache.pp manifests/irc_bot.pp manifests/service/mysql.pp templates/irc_bot/nsa.cfg.erb Conflict resolutions: apache.pp: just cosmetics mysql.pp: The shared modules provides more variables to fine tune the mysql health check so we went for this version. The irc bot conflicts were a result of immerda's branch not being up-to-date with the shared branch. The shared branch had factored out the irc_bot.pp into a directory, and added a few additional variables. Immerda changed the variables from having the prefix $nagios_ to not having it and did not have that refactor. The variable renames were good ones for the 2.7 refactoring work, and future hiera integration, so we want those. So to resolve this, we took the shared version of the refactor, and then took the immerda version of the variable renames. This requires an UPGRADE NOTICE in the README as people may have been using the previous variable names.
Diffstat (limited to 'README')
-rw-r--r--README124
1 files changed, 51 insertions, 73 deletions
diff --git a/README b/README
index de1294d..074b835 100644
--- a/README
+++ b/README
@@ -17,6 +17,11 @@ puppetmaster.
You need to be running verison 0.25 or later of puppet.
+! Upgrade Notice !
+
+ * the irc bot variables changed, they previously had $nagios_ prepended
+ but no longer have that. So you will need to change your local config
+ to use $nsa_server instead of $nagios_nsa_server, for example.
Monitor
-------
@@ -31,11 +36,11 @@ Hosts
-----
On a node which shall be monitored with nagios, include the "nagios::target".
-This just creates a host declaration for this host's "$ipaddress" fact. If
-the $ipaddress of your target is not the one you wish to modify, you can use
-"nagios::target::fqdn" instead, which will use the $fqdn fact of the host instead.
+This just creates a host declaration for this host's "$::ipaddress" fact. If
+the $::ipaddress of your target is not the one you wish to modify, you can use
+"nagios::target::fqdn" instead, which will use the $::fqdn fact of the host instead.
-Set the $nagios_parents variable in the node scope for enabling the reachability
+Pass the $parents variable to the target class for enabling the reachability
features of nagios. If a node needs more customisation, use the
native "@@nagios_host" type directly (the double-ampersand declares the object
as an exported resource).
@@ -68,24 +73,11 @@ files directly.
NRPE Services
-------------
-Some Nagios services need to be checked via NRPE. The following will make the
-nagios server define a service that will check the NRPE command 'check_cpu' on
-the current node:
-
- nagios::service { 'CPU Usage':
- use_nrpe => 'true',
- check_command => "check_cpu",
- nrpe_args => "-t 60"
- }
-
-NRPE Commands
--------------
-
-To be able to call NRPE commands on a host, one needs to define that command
-and what it is going to execute:
+NRPE Services can be defines as i.e.:
- nagios::nrpe::command { 'debsums':
- check_command => '/usr/lib/nagios/plugins/check_debsums openssh-server'
+ nagios::service { 'CPU Usage': use_nrpe => 'true',
+ check_command => "check_cpu",
+ nrpe_args => "-t 60"
}
@@ -95,14 +87,14 @@ Upgrade Notes
The nagios::target bits have been reworked, the notable changes that
may affect an upgrade are:
-. previous versions had nagios::target::nat which used the $fqdn for
+. previous versions had nagios::target::nat which used the $::fqdn for
the address part of nagios::target, this has been renamed to
nagios::target::fqdn to be more clear. if you were using
nagios::target::nat then you will need to change those references to
::fqdn
-. previous versions of this module used $fqdn for the nagios::target
-address, now it is using $ipaddress. If you need $fqdn, use
+. previous versions of this module used $::fqdn for the nagios::target
+address, now it is using $::ipaddress. If you need $::fqdn, use
nagios::target::fqdn instead of nagios::target
. previous versions of nagios_host used the parameter named 'ip', that
@@ -114,7 +106,7 @@ IRC bot
Notifications can easily be sent to an IRC channel by using a bot. To do so,
simply include 'nagios::irc_bot' on the nagios server and define the right
-$nagios_nsa_* variables (see the 'Variables' section below).
+$nsa_* variables (see the 'Variables' section below).
You can then use the notification commands 'notify-by-irc' and
'host-notify-by-irc' with service and host definitions to make them report
@@ -155,63 +147,48 @@ See : http://projects.reductivelabs.com/issues/1180
Variables
=========
-Options to change the behavior of the nagios module:
-
-- nagios_parents: Which host(s) are this node's parents in the nagios host map.
-
-- nagios_allow_external_cmd: Set to true, if you'd like to ensure that your http
- daemon can write to the external command file. You
- may also need to flip "check_external_commands" in
- "nagios.cfg" to enable this functionality.
+Options to change the behavior of the nagios class:
-- nagios_cfgdir: specify an alternative directory where Nagios configurations
- should be managed. Default value depends of the OS of each
- node, but is usually something like '/etc/nagios3'.
+- allow_external_cmd: Set to true, if you'd like to ensure that your http
+ daemon can write to the external command file. You
+ may also need to flip "check_external_commands" in
+ "nagios.cfg" to enable this functionality.
-- nagios_plugin_dir: Change the directory where Nagios plugins should be
- deployed and pointed to by commands.
+For the irc_bot class:
-- nagios_nrpe_cfgdir: Change the directory where NRPE configurations should be
- managed. The default value depends on the node's OS but
- is usually something like '/etc/nagios'.
+- nsa_socket: This optional variable can be used to specify the path to
+ the socket file that the IRC daemon should use.
-- nagios_nrpe_pid_file: Change where the PID file for the Nagios service should
- be written to. It's usually a good idea to keep this
- file where the init script will find it so that it can
- verify the service's status.
+- nsa_server: When using the IRC bot, this defines the server address of
+ the IRC network on which the bot will connect.
-- nagios_nrpe_dont_blame: Set this to 1 to allow arguments to be passed along
- with NRPE command calls. Set it to 0 to disable
- command arguments.
+- nsa_port: Defines the port number on the IRC server on which the bot
+ should connect. When this variable is not set, the port used
+ by default is 6667.
-- nagios_nsa_socket: This optional variable can be used to specify the path to
- the socket file that the IRC daemon should use.
+- nsa_nickname: This is the nickname that the IRC bot will take.
-- nagios_nsa_server: When using the IRC bot, this defines the server address of
- the IRC network on which the bot will connect.
+- nsa_password: Some networks require a password to connect to them.
+ This defines such a password.
-- nagios_nsa_port: Defines the port number on the IRC server on which the bot
- should connect. When this variable is not set, the port used
- by default is 6667.
+- nsa_channel: The name of the channel that the IRC bot will join and
+ will post notifications to.
-- nagios_nsa_nickname: This is the nickname that the IRC bot will take.
+- nsa_pidfile: This optional variable can be used to define the path to
+ the file that will contain the process ID of the IRC bot
+ daemon.
+- nsa_realname: The IRC bot user's real name that will be displayed. By
+ default, the real name is 'Nagios'.
-- nagios_nsa_password: Some networks require a password to connect to them.
- This defines such a password.
+- nsa_usenotices: The IRC bot will by default "say" to the channel the
+ nagios message, but you can switch this variable to
+ 'notice' if you would prefer them to be sent as IRC
+ NOTICE messages.
-- nagios_nsa_channel: The name of the channel that the IRC bot will join and
- will post notifications to.
+PNP4Nagios Nagios Grapher integration
+=====================================
-- nagios_nsa_pidfile: This optional variable can be used to define the path to
- the file that will contain the process ID of the IRC bot
- daemon.
-- nagios_nsa_realname: The IRC bot user's real name that will be displayed. By
- default, the real name is 'Nagios'.
-
-- nagios_nsa_usenotices: The IRC bot will by default "say" to the channel the
- nagios message, but you can switch this variable to
- 'notice' if you would prefer them to be sent as IRC
- NOTICE messages.
+see README.pnp4nagios
Examples
========
@@ -247,9 +224,10 @@ $HOSTADDRESS$'
node target {
- # Monitor th () is host
- $nagios_parents = 'router01'
- include nagios::target
+ # Monitor this host
+ class{'nagios::target':
+ parents = 'router01'
+ }
# monitor a service
$apache2_port = 8080