Skip to content

Commit 7515b66

Browse files
committed
add more plugin pages migrated from labs
1 parent 07e666d commit 7515b66

12 files changed

+1128
-2
lines changed
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
title: check_fujitsu_health
3+
tags:
4+
- plugins
5+
- fujitsu
6+
- hardware
7+
- snmp
8+
- check_fujitsu_health
9+
---
10+
11+
## Description
12+
check_fujitsu_health monitors the hardware health of Fujitsu servers via SNMP.
13+
14+
## Documentation
15+
16+
### Command line parameters
17+
18+
* *\-\-hostname \<hostname or ip>* The hostname or IP address
19+
* *\-\-community \<snmpv2-community>* SNMP community string
20+
* *\-\-mode \<mode>* The monitoring mode
21+
* *\-\-warning \<range>* Warning threshold
22+
* *\-\-critical \<range>* Critical threshold
23+
24+
### Modes
25+
26+
| Keyword| Meaning|
27+
|-------------|---------|
28+
| uptime | Measures how long the device has been running |
29+
| hardware-health | Checks the device hardware (power supply, fans, temperatures, disks, etc.) |
30+
31+
## Installation
32+
Standard procedure: tar zxvf ...; cd ....; ./configure; make; cp plugins-scripts/check_fujitsu_health /destination/path
33+
34+
## Examples
35+
36+
Basic hardware health check:
37+
``` bash
38+
nagios$ check_fujitsu_health --hostname 192.168.1.100 --community public --mode hardware-health
39+
OK - hardware working fine
40+
```
41+
42+
Check uptime:
43+
``` bash
44+
nagios$ check_fujitsu_health --hostname 192.168.1.100 --community public --mode uptime
45+
OK - uptime is 42 days
46+
```
47+
48+
## Download
49+
50+
Go to [Github](https://github.com/lausser/check_fujitsu_health), clone and build.
51+
52+
## Changelog
53+
54+
You can find the changelog [here](https://github.com/lausser/check_fujitsu_health/blob/master/ChangeLog).
55+
56+
## Copyright
57+
58+
Gerhard Lausser
59+
60+
Check_fujitsu_health is released under the GNU General Public License. [GNU GPL](https://www.gnu.org/licenses/licenses.html#GPL)
61+
62+
## Author
63+
64+
Gerhard Lausser [[email protected]](mailto:[email protected])

content/en/docs/plugins/check_logfiles/_index.md

Lines changed: 60 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,8 +314,66 @@ check_logfiles=C:\Perl\bin\perl C:\libexec\check_logfiles --config $ARG1$
314314
* --with-trusted-path=PATH_YOU_TRUST The path where you expect your triggered scripts. (default: /sbin:/usr/sbin:/bin:/usr/bin)
315315
* --with-seekfiles-dir=SEEKFILES_DIR The directory where status files will be kept. (default: /tmp)
316316
* --with-protocols-dir=PROTOCOLS_DIR The directory where protocol files will be written to. (default: /tmp)
317-
* Under Windows you build the plugin with perl winconfig.pl. This will result in plugins-scripts/check_logfiles.
318-
* The file README.exe contains instructions how to build a Windows ninary check_logfiles.exe.
317+
* Under Windows you build the plugin with `perl winconfig.pl`. This will result in plugins-scripts/check_logfiles.
318+
319+
### Creating a Windows Binary check_logfiles.exe
320+
321+
Installing check_logfiles on a Windows machine typically requires a Perl interpreter. This is not always desirable and can lead to significant administrative overhead with a large number of Nagios clients. To minimize this overhead, it's useful to convert check_logfiles into a native binary that runs without additional software.
322+
323+
#### Installing Strawberry Perl
324+
325+
Strawberry Perl is a 100% open source implementation of Perl. It installs to the C:\strawberry directory and includes a mingw32 environment with gcc.
326+
Alternatively, there's also a standalone version of Strawberry Perl available.
327+
328+
For all subsequent steps, it's important that Strawberry Perl is found first in the PATH (in case there are other Perl installations, e.g., ActiveState, VMware Tools, Cygwin, etc.).
329+
330+
``` bash
331+
C:\> echo %PATH%
332+
C:\Programme\VMware\VMware VI Remote CLI\Perl\site\bin;C:\Programme\VMware\VMware VI Remote CLI\Perl\bin;c:\ruby\bin;C:\Perl\site\bin;C:\Perl\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\strawberry\c\bin;C:\strawberry\perl\bin;C:\strawberry\c\bin;C:\strawberry\perl\bin;C:\Programme\Gemeinsame Dateien\Adobe\AGL
333+
334+
C:\>set PATH=C:\strawberry\c\bin;C:\strawberry\perl\bin;%PATH%
335+
C:\>perl -V
336+
Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
337+
Platform:
338+
osname=MSWin32, osvers=5.1, archname=MSWin32-x86-multi-thread
339+
...
340+
...
341+
Built under MSWin32
342+
Compiled at Apr 17 2008 11:36:20
343+
@INC:
344+
C:/strawberry/perl/lib
345+
C:/strawberry/perl/site/lib
346+
.
347+
```
348+
349+
#### Installing PAR::Packer
350+
351+
To generate the binary, you need the Perl modules PAR and PAR::Packer.
352+
353+
``` bash
354+
perl -MCPAN -eshell
355+
install PAR
356+
install PAR::Packer
357+
```
358+
359+
#### Building the Windows Plugin
360+
361+
First, create the Windows variant of the plugin in the *check_logfiles* directory (created by unpacking the tar archive). This will then be located in the plugins-scripts subdirectory.
362+
363+
``` bash
364+
PS C:\path\to\check_logfiles> perl winconfig.pl
365+
```
366+
367+
#### Creating the Binary
368+
369+
PAR::Packer provides the pp program, which can package a Perl script into a single exe file.
370+
371+
``` bash
372+
PS C:\path\to\check_logfiles> cd plugins-scripts
373+
PS C:\path\to\check_logfiles\plugins-scripts> pp -M PerlIO -M Digest::MD5 -M Encode::Encoding -M Encode::Unicode -M Encode::Unicode::UTF7 -M Net::Domain -M Win32::NetResource -M Win32::Daemon -M Time::Piece -M Time::Local -M Win32::EventLog -M Win32::TieRegistry -M Win32::WinError -M Date::Manip -M Win32::OLE -o check_logfiles.exe check_logfiles
374+
PS C:\path\to\check_logfiles\plugins-scripts> .\check_logfiles -V
375+
check_logfiles.exe v2.4.1.7
376+
```
319377

320378
## Scanning of an Oracle-Alertlog with the operating mode "oraclealertlog"
321379
If you want to scan the alert log of an oracle database without having access to the database server on the operating system level (e.g. it is a Windows server or you are not allowed to log in to a Unix server for security reasons) and therefore no access to the alert file, then this file can be mapped to a database table. The contents of the file are then visible through a database connection by executing SQL SELECT statements. If you specify the type "oraclealertlog" in a check_logfiles configuration, this method is used to scan the alert log. You need some extra parameters in the configuration.
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
---
2+
title: check_mailbox_health
3+
tags:
4+
- plugins
5+
- mailbox
6+
- imap
7+
- email
8+
- check_mailbox_health
9+
---
10+
11+
## Description
12+
check_mailbox_health enables the monitoring of mail servers (IMAP), reading and counting emails, filtering by specific criteria, and analyzing email contents and attachments.
13+
14+
## Motivation
15+
Communication between companies, suppliers and purchasing departments, and between suppliers and factories often takes place via automated email traffic. Monitoring the arrival of emails at expected times and the type of email was the requirement that led to the development of this plugin.
16+
17+
## Documentation
18+
19+
### Command line parameters
20+
* *\-\-hostname \<hostname>* The hostname or IP address of the mail server.
21+
* *\-\-port \<port>* The port number if it differs from the standard.
22+
* *\-\-username \<username>* The mailbox user.
23+
* *\-\-password \<password>* The user's password.
24+
* *\-\-folder \<name>* A specific mailbox (default: INBOX)
25+
* *\-\-ssl* Communication with the mail server is encrypted.
26+
* *\-\-protocol \<mail-protocol>* The protocol used. (Currently only IMAP)
27+
* *\-\-mode \<mode>* The mode parameter tells the plugin what to do. See list of possible values below.
28+
* *\-\-select \<rule>* Here you can restrict which type of emails are considered.
29+
* *\-\-name \<objectname>* Used for more precise specification.
30+
* *\-\-name2 \<objectname>* Also for more precise specification.
31+
* *\-\-name3 \<objectname>* Also for more precise specification.
32+
* *\-\-regexp* A flag indicating whether \-\-name[2,3] should be interpreted as a regular expression.
33+
34+
### Modes
35+
36+
| Keyword| Meaning| Thresholds|
37+
| -------------| ---------| ------------|
38+
| connection-time | Measures how long connection establishment and login take | 0..n seconds (Default: 1, 5) |
39+
| mail-age | Alerts when emails are older than n minutes | |
40+
| count-mails | Counts the emails (which may meet certain criteria) | |
41+
| list-mails | Lists the emails (which may meet certain criteria) | |
42+
43+
### Selectors
44+
With the parameter *\-\-select \<selector>=\<condition>* you can limit the selection of emails.
45+
46+
| Selector| Meaning|
47+
| -------------| ---------|
48+
| subject | The subject matches the condition string |
49+
| content | The condition string appears in the email text |
50+
| newer_than | The email is newer than the *Date::Manip* expression |
51+
| older_than | The email is older than the *Date::Manip* expression |
52+
| has_attachments | The email has attachments |
53+
| attachments | The email has attachments whose MIME type matches the condition string |
54+
55+
When selecting by attachments (i.e., \-\-select attachment=...), the following applies:
56+
You can specify a comma-separated list, which is split and then treated as if there were a separate select for each element.
57+
If an element contains a slash, it is assumed that the MIME type of an attachment is meant. If not, it is compared with the file extension of the attachments. For example, if you write *\-\-select attachment='xls,xlsx,xlsm,application/pdf'*, PDF documents and everything with an Excel-like file extension will be selected (MIME types for Excel documents come in various forms and are difficult to handle).
58+
If you append a *\-\-regexp*, then again a slash indicates a MIME type (more precisely, a pattern for MIME types), e.g., *\-\-select attachment='image\/.\*'*. If the slash is missing, the pattern is compared with the entire filename, e.g., *\-\-select attachment='.\*slides.\*'*.
59+
60+
## Installation
61+
``` bash
62+
tar zxf check_mailbox_health...tar.gz; cd check_mailbox_health...; ./configure; make
63+
cp plugins-scripts/check_mailbox_health /destination/path
64+
```
65+
66+
## Examples
67+
``` bash
68+
$ check_mailbox_health --mode connection-time \
69+
--username lausser --password secretpass \
70+
--warning 10 --critical 20
71+
OK - 0.00 seconds to connect as lausser | 'connection_time'=0;10;20;;
72+
73+
$ check_mailbox_health --mode count-mails \
74+
--username lausser --password secretpass \
75+
--warning 1000 --critical 2000
76+
CRITICAL - 12463432 mails in mailbox | 'mails'=12463432;1000;2000;;
77+
78+
# Search all emails that have attachments with filename extension
79+
# pptx or jpg:
80+
$ check_mailbox_health --mode list-mails \
81+
--username lausser --password secretpass \
82+
--select newer_than="today 13:00" --select attachments='pptx,jpg'
83+
Thu Apr 20 14:01:32 2017 Gerhard Lausser <[email protected]>
84+
multipart/alternative --noname--
85+
application/vnd.openxmlformats-officedocument.presentationml.presentation User-Experience_Slide-Timeline.pptx
86+
image/jpeg coshsh_logo_small.jpg
87+
application/pdf Explanation_Target_Protocol.pdf
88+
Thu Apr 20 17:33:51 2017 Michael Kraus <[email protected]> [monitoring-team-l] Greetings from South Tyrol
89+
text/html --noname--
90+
image/jpeg IMG_20170420_164159.jpg
91+
OK - have fun
92+
93+
# Search all emails that have attachments with a filename containing
94+
# a specific pattern:
95+
$ check_mailbox_health --mode list-mails \
96+
--username lausser --password secretpass \
97+
--select attachments='IMG' --regexp
98+
Thu Apr 20 17:33:51 2017 Michael Kraus <[email protected]> [monitoring-team-l] Greetings from South Tyrol
99+
text/html --noname--
100+
image/jpeg IMG_20170420_164159.jpg
101+
OK - have fun
102+
```
103+
104+
## Download
105+
106+
Go to [Github](https://github.com/lausser/check_mailbox_health), clone and build.
107+
108+
## Changelog
109+
110+
You can find the changelog [here](https://github.com/lausser/check_mailbox_health/blob/master/ChangeLog).
111+
112+
## Copyright
113+
114+
Gerhard Lausser
115+
Check_mailbox_health is released under the GNU General Public License. [GNU GPL](https://www.gnu.org/licenses/licenses.html#GPL)
116+
117+
## Author
118+
119+
Gerhard Lausser [[email protected]](mailto:[email protected])
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
title: check_ntp_health
3+
tags:
4+
- plugins
5+
- ntp
6+
- time synchronization
7+
- chronyd
8+
- check_ntp_health
9+
---
10+
11+
## Description
12+
check_ntp_health was developed with the goal of providing a single tool for all aspects of time synchronization monitoring.
13+
14+
## Motivation
15+
Instead of installing a variety of plugins for monitoring NTP, Chronyd, etc., check_ntp_health should be the only plugin needed.
16+
17+
## Documentation
18+
19+
### Command line parameters
20+
21+
* *\-\-mode* The monitoring mode
22+
* *\-\-help* Display help information
23+
* *\-\-hostname \<hostname>* The hostname or IP address
24+
* *\-\-warning \<range>* Warning threshold
25+
* *\-\-critical \<range>* Critical threshold
26+
27+
### Modes
28+
29+
| Keyword| Meaning|
30+
|-------------|---------|
31+
| clock-health | Checks if a daemon is running, if there is a connection to the time server, and alerts if the time difference becomes too large |
32+
33+
## Examples
34+
35+
``` bash
36+
WARNING - no sync peer, no candidates.
37+
CRITICAL - ntpq connection refused
38+
CRITICAL - ntpq: No association ID's returned
39+
CRITICAL - ntp daemon is not running, cannot open /usr/sbin/ntpq
40+
41+
# centrify
42+
$ uname -a
43+
AIX eu-oem-aix02 1 7 00F189244D00
44+
$ check_ntp_health --mode clock-health
45+
OK - clock is in sync with domain ad.consolcustomer.com
46+
```
47+
48+
## Download
49+
50+
Go to [Github](https://github.com/lausser/check_ntp_health), clone and build.
51+
52+
## Changelog
53+
54+
You can find the changelog [here](https://github.com/lausser/check_ntp_health/blob/master/ChangeLog).
55+
56+
## Copyright
57+
58+
Gerhard Lausser
59+
60+
Check_ntp_health is released under the GNU General Public License. [GNU GPL](https://www.gnu.org/licenses/licenses.html#GPL)
61+
62+
## Author
63+
64+
Gerhard Lausser [[email protected]](mailto:[email protected])

0 commit comments

Comments
 (0)