Blame view

README.md 4 KB
Frederik Lindenaar authored
1
2
3
nagios-plugins
==============
This repository contains my collection of modified and custom written check
Frederik Lindenaar authored
4
plugins and scripts for [Nagios](http://www.nagios.org).
Frederik Lindenaar authored
5
Frederik Lindenaar authored
6
7
Most of these are very custom solutions or modified versions of standard plugins
so distributing them through [NagiosExchange](https://exchange.nagios.org/) is
Frederik Lindenaar authored
8
9
10
11
12
13
14
15
16
17
18
not really appropriate.  I am publishing them separately so that others may
benefit from these as well. Use them freely and please let me know is you
encounter any issues or require changes.

The latest versions, documentation and bugtracker available on my
[GitLab instance](https://gitlab.lindenaar.net/scripts/privacyidea-checkotp)

Copyright (c) 2015 Frederik Lindenaar. free for distribution under the GNU
License, see [below](#license)
Frederik Lindenaar authored
19
20
plugins/check_memory
--------------------
Frederik Lindenaar authored
21
Nagios check script to monitor the memory on Linux systems. Due to changes in
Frederik Lindenaar authored
22
23
24
25
26
27
28
the output of procps v3.3 (the changelog refers to it as modernizing it), it's
output changed and breaks the the check_memory script as shipped with many linux
distributions. This version supports both the old and the new format so that
is indifferent of which version of procps (to date) is used. No other changes
were made to the script.
Frederik Lindenaar authored
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
plugins/plugins/check_multiple_host_addresses
---------------------------------------------
This script is a first attempt to monitor multi-home and dual-stack (i.e. ipv4
and ipv6) servers. In my setup a server should only considered availble if it is
available on all of its primary addresses (i.e. both ipv4 and ipv6). It uses the
excellent check_multi script to perform multiple a ping check to see if a host
is available and reports the consolidated status. Using check_multi has the
advantage that pnp4nagios and other scripting graphing solutions will support
this solution as well.

Installation is straightforward, after installing the script on your server, add
the following to your `commands.cmd` configuration file to make it available:
~~~
  # 'check-host-alive' command definition for multi-homed/dual-stack servers
  define command{
        command_name    check-addresses-alive
        command_line    [install_path]/plugins/check_multiplehost_addresses '$HOSTADDRESS$' '$_HOSTADDRESS6$'
  }
~~~
The example above assumes that the IPv6 address of the host is provided as part
of the host configuration, i.e.:
~~~
  define host {
        ...
        address         192.168.0.1
        _address6       fdf8:f340:ab9d:c213::1
	...
  }
~~~
To use the script either add ` check_command		check-addresses-alive`
to the specific hosts that should use the check or to the generic host used as
template.
Frederik Lindenaar authored
63
64
65
66
67
cgi-bin/nagiosstatus.sh
-----------------------
Very simplistic CGI-BIN script that checkes whether nagios is still running and
still updating its status. It wil always return an HTTP Status 200 (OK) and a
simple text page with one of the following texts:
Frederik Lindenaar authored
68
69
70
 - `STOPPED` - in case the nagios process is not running
 - `STALLED` - in case the nagios status file has not been updated for 5 minutes
 - `OK` - when Nagios is running and updated its status file < 5 minutes ago
Frederik Lindenaar authored
71
72
73
74
75
76

I wrote this script to be used with an external monitoring system, I use it with
the free subscription from [Pingdom](http://www.pingdom.com) to get alerts when
my Nagios monitoring system is no longer reachable.
Frederik Lindenaar authored
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<a name="license">License</a>
-----------------------------
These scripts, documentation & configration examples are free software: you can
redistribute and/or modify it under the terms of the GNU General Public License
as published by the Free Software Foundation, either version 3 of the License,
or (at your option) any later version.

This script, documenatation and configuration examples are 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, download it from <http://www.gnu.org/licenses/>.