- adapted README files and package documentation

- provide /etc/monitoring-plugins/ directory (incl. README) as 
  mentioned in the latest documentation

OBS-URL: https://build.opensuse.org/package/show/server:monitoring/monitoring-plugins?expand=0&rev=6
This commit is contained in:
Lars Vogdt 2014-07-16 14:05:40 +00:00 committed by Git OBS Bridge
parent 64f3dd9eb7
commit fdf63d33a9
9 changed files with 127 additions and 44 deletions

View File

@ -0,0 +1,84 @@
Topics:
* Extra-Opts
* Further use of the /etc/monitoring-plugins directory
Extra-Opts
==========
Starting with the 1.4.12 release, most Monitoring Plugins (those written in C)
support reading options from a configuration file. Since version 2.0, this is
enabled by default.
You can easily know if a plugin supports Extra-Opts by checking the --help
output for the --extra-opts option. Once compiled in, the --extra-opts plugin
option allows reading extra options from a config file. The syntax for the
command is:
--extra-opts=[section][@file]
Some examples:
Read special_opts section of default config file:
$ ./check_stuff --extra-opts=special_opts
Read special_opts section of /etc/myconfig.ini:
$ ./check_stuff --extra-opts=special_opts@/etc/myconfig.ini
Read check_stuff section of /etc/myconfig.ini:
$ ./check_stuff --extra-opts=@/etc/myconfig.ini
Read check_stuff section of default config file and use additional
arguments along with the other specified arguments (Extra-Opts arguments are
always processed first no matter where --extra-opts appears on the command
line):
$ ./check_stuff --extra-opts -jk --some-other-opt
The default nagios plugins file is used if no explicit filename is given. The
current standard locations checked are:
/usr/local/etc/monitoring-plugins/monitoring-plugins.ini
/usr/local/etc/monitoring-plugins.ini
/etc/monitoring-plugins/monitoring-plugins.ini
/etc/monitoring-plugins.ini
To use a custom location, set the MP_CONFIG_FILE environment variable to the
desired path name.
To specify an option without parameter, you can use a key without value, but
the equal sign must remain, for example:
allow-regex=
Also note that repeated keys are allowed within sections just like you can
repeat arguments on the command line.
The basic theory is that options specified in the configuration files are
substituted at the beginning of the command line.
The initial use case for this functionality is for hiding passwords, so you do
not have to define sensitive credentials in the configuration of your
monitoring server and these options won't appear in the command line.
Further use of the /etc/monitoring-plugins directory
====================================================
Some Monitoring Plugins (like check_zypper) support additional configuration
files to be included/sourced in on execution. As long as the location of those
additional configuration files is not fixed, we recommend to use this directory
for it.
@Packagers: please consider encapsulating Plugins with Apparmor or SELinux
profiles. For security and conveniance reasons, please allow your plugins to
read in the /etc/monitoring-plugins directory - or even better: allow your
plugins to read their configuration file below /etc/monitoring-plugins.

View File

@ -1,11 +1,13 @@
README.SUSE for nagios-plugins
README.SUSE for monitoring-plugins
== Features and documentation ==
Please refer to the upstream documentation on
* http://www.nagios.org/docs/
* http://nagiosplugins.org/
* http://www.nagioscommunity.org/wiki/index.php/Main_Page
* http://docs.icinga.org/
* https://shinken.readthedocs.org/
* ...
* https://www.monitoring-plugins.org/
The openSUSE package contains most of the currently available plugins.
@ -19,7 +21,7 @@ The following checks require special handling as they need some root privileges
* check_ide_smart
In a default installation, those checks will not work if executed as user with limited
rights (such as nagios or icinga). Please have a look into the corresponding documentation
for those packages for more details.
( /usr/share/doc/packages/nagios-plugins-icmp/README.SUSE-check_icmp for example )
rights (such as user nagios or icinga). Please have a look into the corresponding
documentation for those packages for more details.
( /usr/share/doc/packages/monitoring-plugins-icmp/README.SUSE-check_icmp for example )

View File

@ -1,27 +1,17 @@
README.SUSE for nagios-plugins-dhcp
README.SUSE for monitoring-plugins-dhcp
== check_cups ==
Nagios plugin for checking cups service
Plugin for checking cups service
This plug-in will check the status of a remote CUPS print service for the printer status,
Its able to check all available printers on the cups, or just one of them.
(for example if you have testing printer - is normally disable/off you don't need to check it.)
It can also check only the queue status. it will provide the size of the queue and
It is able to check all available printers configured on the cups daemon, or just one of them.
It can also check only the queue status. It will provide the size of the queue and
optionally the age of the queue.
Generally I sugesst to create separate check for each printer only and then additional check for
Generally we sugesst to create separate checks for each printer and one additional check for
the queue itself.
it using Nagios standards exit codes:
# Nagios return codes
STATE_OK=0
STATE_WARNING=1
STATE_CRITICAL=2
STATE_UNKNOWN=3
STATE_DEPENDENT=4
Usage: check_cups -H <hostname> -P -p<The CUPS printer name> | -Q <s|b> -w <size warning level> -c <size critical level> -a <max age>
Notes:
@ -98,7 +88,7 @@ define command{
Security:
---------
In the version 0.2 I add appamor profile for the script usr.lib.nagios.plugins.check_cups
In the version 0.2 I added an Apparmor profile for the script usr.lib.nagios.plugins.check_cups
into /etc/apparmor.d

View File

@ -1,12 +1,13 @@
README.SUSE for nagios-plugins-dhcp
README.SUSE for monitoring-plugins-dhcp
== check_dhcp and SuSEfirewall ==
If you run the check_dhcp script on the server, please make sure your UDP ports
67 and 68 on the _client_ are opened in the firewall. You also need to allow
the receive broadcasts for this interface. Otherwise the script will be unable
to receive broadcasts for this interface. Otherwise the script will be unable
to detect anything.
Example:
If your client uses the "external" interface for the check, the entries in
/etc/sysconfig/SuSEfirewall2 should look like:
@ -24,10 +25,10 @@ your system:
Copy the prepared permissions file from this directory to the right place
in your file system:
~ # cp /usr/share/doc/packages/nagios-plugins-common/example/permissions.d/nagios-plugins \
/etc/permissions.d/nagios-plugins
~ # cp /usr/share/doc/packages/monitoring-plugins-common/example/permissions.d/monitoring-plugins \
/etc/permissions.d/monitoring-plugins
...afterwards adapt the file /etc/permissions.d/nagios-plugins to your needs
...afterwards adapt the file /etc/permissions.d/monitoring-plugins to your needs
(see comments in the file) and run:
~ # SuSEconfig --module permissions
@ -39,7 +40,7 @@ This will set the correct permissions (from now on also during an update).
=== Alternative: Use sudo to grant the permission and modify your plugin config ===
This way you need an entry like:
This way you just need an entry like:
nagios ALL = NOPASSWD: /usr/lib/nagios/plugins/check_dhcp

View File

@ -1,4 +1,4 @@
README.SUSE for nagios-plugins-icmp
README.SUSE for monitoring-plugins-icmp
== Special privileges ==
@ -11,10 +11,10 @@ your system:
Copy the prepared permissions file from this directory to the right place
in your file system:
~ # cp /usr/share/doc/packages/nagios-plugins/example/permissions.d/nagios-plugins \
/etc/permissions.d/nagios-plugins
~ # cp /usr/share/doc/packages/monitoring-plugins/example/permissions.d/monitoring-plugins \
/etc/permissions.d/monitoring-plugins
...afterwards adapt the file /etc/permissions.d/nagios-plugins to your needs
...afterwards adapt the file /etc/permissions.d/monitoring-plugins to your needs
(see comments in the file) and run:
~ # SuSEconfig --module permissions
@ -27,7 +27,7 @@ This will set the correct permissions (from now on also during an update).
=== Alternative: Use sudo to grant the permission and modify your plugin config ===
This way you need an entry like:
This way you just need an entry like:
nagios ALL = NOPASSWD: /usr/lib/nagios/plugins/check_icmp

View File

@ -1,4 +1,4 @@
README.SUSE for nagios-plugins-ide_smart
README.SUSE for monitoring-plugins-ide_smart
== Special privileges ==
@ -11,10 +11,10 @@ your system:
Copy the prepared permissions file from this directory to the right place
in your file system:
~ # cp /usr/share/doc/packages/nagios-plugins/example/permissions.d/nagios-plugins \
/etc/permissions.d/nagios-plugins
~ # cp /usr/share/doc/packages/monitoring-plugins/example/permissions.d/monitoring-plugins \
/etc/permissions.d/monitoring-plugins
...afterwards adapt the file /etc/permissions.d/nagios-plugins to your needs
...afterwards adapt the file /etc/permissions.d/monitoring-plugins to your needs
(see comments in the file) and run:
~ # SuSEconfig --module permissions
@ -27,7 +27,7 @@ This will set the correct permissions (from now on also during an update).
=== Alternative: Use sudo to grant the permission and modify your plugin config ===
This way you need an entry like:
This way you just need an entry like:
nagios ALL = NOPASSWD: /usr/lib/nagios/plugins/check_ide_smart

View File

@ -1,6 +1,6 @@
# Please uncomment the needed plugins and place the file in the
# /etc/permissions.d/ directory:
# cp nagios-plugins /etc/permissions.d/
# cp monitoring-plugins /etc/permissions.d/
#
# Afterwards the files below will be adapted after a nagios-plugins
# update via

View File

@ -2,6 +2,9 @@
Tue Jul 15 13:05:27 UTC 2014 - lars@linux-schulserver.de
- package rename: nagios-plugins => monitoring-plugins
- adapted README files and package documentation
- provide /etc/monitoring-plugins/ directory (incl. README) as
mentioned in the latest documentation
- update to 2.0:
Enhancements
+ check_mailq now supports auto detection of qmail, postfix, exim

View File

@ -41,6 +41,7 @@ Source23: usr.lib.nagios.plugins.check_icmp
Source24: usr.lib.nagios.plugins.check_ide_smart
Source25: usr.lib.nagios.plugins.check_ssh
Source26: check_ircd_ssl
Source27: %{name}-README-extra-opts
Patch1: %{name}-1.4.14-ntpd.patch
Patch2: %{name}-1.4.14-check_log.patch
Patch6: %{name}-1.4.6-no_chown.patch
@ -850,11 +851,6 @@ Summary: Test RADIUS server
Group: System/Monitoring
Provides: nagios-plugins-radius = %{version}-%{release}
Obsoletes: nagios-plugins-radius <= 1.5
%if 0%{?suse_version} > 1020
Requires: freeradius-client
%else
Requires: radiusclient
%endif
%description radius
This plugin tests a RADIUS server to see if it is accepting connections. The
@ -1188,6 +1184,10 @@ Nagios plugins.
It does not require the subpackages as you might not have all needed
dependend packages available.
EOF
# install ghost file for extra-opts
install -Dm 644 %{SOURCE27} %{buildroot}/%{_sysconfdir}/%{name}/README
touch %{buildroot}/%{_sysconfdir}/%{name}/%{name}.ini
# find locale files
%find_lang %{name}
@ -1266,6 +1266,9 @@ fi
%doc example
%dir %{nagios_libdir}
%dir %{nagios_plugindir}
%dir %{_sysconfdir}/%{name}
%{_sysconfdir}/%{name}/README
%ghost %config(noreplace) %{_sysconfdir}/%{name}/%{name}.ini
%defattr(0755,root,root)
%{nagios_plugindir}/negate
%{nagios_plugindir}/urlize