Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung |
tachtler:icinga2_-_plugins [2016/07/22 10:32] – klaus | tachtler:icinga2_-_plugins [2018/04/25 13:54] (aktuell) – [check_ipmi_sensor] klaus |
---|
/usr/share/perl5/vendor_perl/Nagios/Plugin/Threshold.pm | /usr/share/perl5/vendor_perl/Nagios/Plugin/Threshold.pm |
</code> | </code> |
| |
| ===== Plugins: IPMI-Board ===== |
| |
| ==== check_ipmi_sensor ==== |
| |
| ^ Beschreibung ^ Externer Link / Zusätzliche Informationen ^ |
| | Download | [[https://exchange.nagios.org/directory/Plugins/Hardware/Server-Hardware/IPMI-Sensor-Monitoring-Plugin/details]] | |
| | Abhängigkeiten| Es ist die Installation der ''rpm''-Pakete **''perl-IPC-Run''** und **''freeipmi''** erforderlich | |
| | Beschreibung | List über einen Zugriff auf ein **IPMI**-Board dessen Werte aus und liefert entsprechende Rückgabewerte. | |
| | Konfiguration | <code c>object CheckCommand "my_ipmi_sensor" { |
| import "plugin-check-command" |
| |
| command = [ PluginDir + "/check_ipmi_sensor" ] |
| |
| arguments = { |
| "-H" = { |
| value = "$ipmisensor_hostname$" |
| description = "hostname or IP of the IPMI interface." |
| required = true |
| } |
| "-f" = { |
| value = "$ipmisensor_config_file$" |
| description = "<FreeIPMI config file>" |
| required = false |
| set_if = "$ipmisensor_config_file$" |
| } |
| "-U" = { |
| value = "$ipmisensor_username$" |
| description = "IPMI username" |
| required = true |
| } |
| "-P" = { |
| value = "$ipmisensor_password$" |
| description = "IPMI password" |
| required = true |
| } |
| "-L" = { |
| value = "$ipmisensor_privilege_level$" |
| description = "IPMI privilege level" |
| required = true |
| } |
| "-O" = { |
| value = "$ipmisensor_options$" |
| description = "<FreeIPMI options>" |
| required = false |
| set_if = "$ipmisensor_options$" |
| } |
| "-b" = { |
| value = "$ipmisensor_backward$" |
| description = "backward compatibility mode for FreeIPMI 0.5.*" |
| required = false |
| set_if = "$ipmisensor_backward$" |
| } |
| "-T" = { |
| value = "$ipmisensor_type$" |
| description = "limit sensors to query based on IPMI sensor type." |
| required = false |
| set_if = "$ipmisensor_type$" |
| } |
| "-x" = { |
| value = "$ipmisensor_exclude_id$" |
| description = "exclude sensor matching <sensor id>." |
| required = false |
| set_if = "$ipmisensor_exclude_id$" |
| } |
| "-v" = { |
| value = "$ipmisensor_verbose$" |
| description = "single line output with additional details for warnings" |
| required = false |
| set_if = "$ipmisensor_verbose$" |
| } |
| "-vv" = { |
| value = "$ipmisensor_verbose2$" |
| description = "multi line output, also with additional details for warnings" |
| required = false |
| set_if = "$ipmisensor_verbose2$" |
| } |
| "-vvv" = { |
| value = "$ipmisensor_verbose3$" |
| description = "debugging output, followed by normal multi line output" |
| required = false |
| set_if = "$ipmisensor_verbose3$" |
| } |
| "-o" = { |
| value = "$ipmisensor_zenoss$" |
| description = "create ZENOSS compatible formatted output" |
| required = false |
| set_if = "$ipmisensor_zenoss$" |
| } |
| } |
| |
| } |
| </code> | |
| |
===== Plugins: Betriebssystem ===== | ===== Plugins: Betriebssystem ===== |
} | } |
</code> | | </code> | |
| |
| :!: **WICHTIG** - Ab [[http://www.centos.org|CentOS]] in der **Version 7.3** führt die Option ''$yum_verbose'', wenn diese auf ''[true]'' gesetzt ist, zu Fehlern in [[https://www.icinga.com/|Icinga2]]! |
| |
==== check_cpu ==== | ==== check_cpu ==== |
Perhaps you want to use the -w option?</code> sollte die nachfolgende Zeile, wie dargestellt, um die ''iptables''-Option: ''-w'' ergänzt werden: <code>list_iptables="$iptables -w -n -t $table -L $chain" | Perhaps you want to use the -w option?</code> sollte die nachfolgende Zeile, wie dargestellt, um die ''iptables''-Option: ''-w'' ergänzt werden: <code>list_iptables="$iptables -w -n -t $table -L $chain" |
</code> | | </code> | |
| | ROOT-Rechte | **In der Datei ''/etc/sudoers'' muss nachfolgende Konfiguration durchgeführt werden, da sonst kein Zugriff auf das Plugin und das Binary z.B. ''/sbin/iptables'' durch den Benutzer ''icinga'' erfolgen kann:** \\ \\ <code bash>User_Alias CHECK_IPTABLES=icinga |
| CHECK_IPTABLES ALL=(root) NOPASSWD: /sbin/iptables -w -n -t filter -L INPUT, /sbin/iptables -w -n -t filter -L FORWARD, /sbin/iptables -w-n -t filter -L OUTPUT</code> | |
| Konfiguration | <code c>object CheckCommand "my_iptables" { | | Konfiguration | <code c>object CheckCommand "my_iptables" { |
import "plugin-check-command" | import "plugin-check-command" |
| |
^ Beschreibung ^ Externer Link / Zusätzliche Informationen ^ | ^ Beschreibung ^ Externer Link / Zusätzliche Informationen ^ |
| Download | [[https://exchange.nagios.org/directory/Plugins/Operating-Systems/Linux/check_smartmon/details]] | | | Download | [[https://exchange.nagios.org/directory/Plugins/Operating-Systems/Linux/check_smartmon/details]] | | |
| Download-RAW | [[https://exchange.nagios.org/components/com_mtree/attachment.php?link_id=3452&cf_id=24]] | | |
| Beschreibung | Überprüft unter Angabe des "Device" (z.B. ''/dev/sda'') dei **S.M.A.R.T**-Informationen der Festplatte und gibt de "Gesundheitsstatus" und vorallem die **Temperatur** der Festplatte aus.| | | Beschreibung | Überprüft unter Angabe des "Device" (z.B. ''/dev/sda'') dei **S.M.A.R.T**-Informationen der Festplatte und gibt de "Gesundheitsstatus" und vorallem die **Temperatur** der Festplatte aus.| |
| | ROOT-Rechte | **In der Datei ''/etc/sudoers'' muss nachfolgende Konfiguration durchgeführt werden, da sonst kein Zugriff auf das Plugin und das Binary z.B. ''/usr/sbin/smartctl'' durch den Benutzer ''icinga'' erfolgen kann:** \\ \\ <code bash>Defaults:icinga !requiretty |
| %icinga ALL = (ALL) NOPASSWD: /usr/sbin/smartctl, /usr/lib64/nagios/plugins/check_smartmon.py</code> | |
| Konfiguration | <code c>object CheckCommand "my_smartmon" { | | Konfiguration | <code c>object CheckCommand "my_smartmon" { |
import "plugin-check-command" | import "plugin-check-command" |
| |
command = [ PluginDir + "/check_smartmon.py" ] | command = [ "/usr/bin/sudo", PluginDir + "/check_smartmon.py" ] |
| |
arguments = { | arguments = { |
| |
} | } |
| </code> | |
| |
| ===== Plugin: Zeit_Server ===== |
| |
| ==== check_time ==== |
| |
| ^ Beschreibung ^ Externer Link / Zusätzliche Informationen ^ |
| | Abhängigkeiten| Es ist die Installation des ''rpm''-Pakets **''nagios-plugins-time''** erforderlich | |
| | Beschreibung | List über einen Zugriff via Netzwerk die RFC868 konforme Zeit aus. | |
| | Konfiguration | <code c>object CheckCommand "my_time" { |
| import "plugin-check-command" |
| |
| command = [ PluginDir + "/check_time" ] |
| |
| arguments = { |
| "-H" = { |
| value = "$time_hostname$" |
| description = "Host name, IP Address, or unix socket (must be an absolute path)" |
| required = true |
| } |
| "-p" = { |
| value = "$time_port$" |
| description = "Port number (default: 37)" |
| required = false |
| set_if = "$time_port$" |
| } |
| "-u" = { |
| value = "$time_udp$" |
| description = "Use UDP to connect, not TCP" |
| required = false |
| set_if = "$time_upd$" |
| } |
| "-w" = { |
| value = "$time_warning$" |
| description = "Time difference (sec.) necessary to result in a warning status" |
| required = false |
| set_if = "$time_warning$" |
| } |
| "-c" = { |
| value = "$time_critical$" |
| description = "Time difference (sec.) necessary to result in a critical status" |
| required = false |
| set_if = "$time_critical$" |
| } |
| "-W" = { |
| value = "$time_warning_response$" |
| description = "Response time (sec.) necessary to result in warning status" |
| required = false |
| set_if = "$time_warning_response$" |
| } |
| "-C" = { |
| value = "$time_critical_response$" |
| description = "Response time (sec.) necessary to result in critical status" |
| required = false |
| set_if = "$time_critical_response$" |
| } |
| "-t" = { |
| value = "$time_timeout$" |
| description = "Seconds before connection times out (default: 10)" |
| required = false |
| set_if = "$time_timeout$" |
| } |
| } |
| |
| } |
</code> | | </code> | |
| |
| |
^ Beschreibung ^ Externer Link / Zusätzliche Informationen ^ | ^ Beschreibung ^ Externer Link / Zusätzliche Informationen ^ |
| Download | [[https://exchange.icinga.org/exchange/check_squid]] | | | Download | [[https://exchange.nagios.org/directory/Plugins/Software/check_squid_ng/details]] | |
| Abhängigkeiten| Es muss das ''rpm''-Paket **''perl-libwww-perl''** installiert werden | | | Abhängigkeiten| Es muss das ''rpm''-Paket **''perl-libwww-perl''** installiert werden | |
| Beschreibung | Überprüft, die Verfügbarkeit des Proxy-Servers [[http://www.squid-cache.org/|Squid]] | | | Beschreibung | Überprüft, die Verfügbarkeit des Proxy-Servers [[http://www.squid-cache.org/|Squid]] | |