summaryrefslogtreecommitdiffstats
path: root/plugins-scripts/check_mailq.pl
AgeCommit message (Collapse)AuthorFilesLines
2023-10-26check_mailq: exit on empty strings and exit earlySven Nierlein1-76/+69
in case of $utils::PATH_TO_MAILQ beeing an empty string, the "defined" is still true and leads to misleading error messages. While on it, rewrite cascaded if/elsifs to more readably exit-early ifs.
2023-10-26check_mailq: unify tabs/spacesSven Nierlein1-508/+507
2023-10-26check_mailq: remove trailing whitespacesSven Nierlein1-23/+23
2023-04-14Fix a lot of typos reported by codespellrefs/pull/1864/headJan Wagner1-1/+1
2023-02-03check_mailq.pl: separate submission queuerefs/pull/1192/headJan Wagner1-6/+30
check_mailq.pl ignores the separate submission queue used in (modern?) sendmail implementations. For the queue output below with one message in the submission queue and no messages in the transport queue, check_mailq.pl reports zero messages in the queue because the request count from the last queue always overwrites previous queues. If the sendmail MTA isn't running or has become wedged, messages will sit in the submission queue forever. The attached patch fixes this in a backwards compatible way (i.e., it shouldn't break any of the currently supported formats). -- Just turning attached patch of github issue #972 into a push request. (Closes #972)
2023-01-18Fixing nullmailer regexandrew bezella1-2/+2
attached is a patch that updates the format expected in the nullmailer mailq output. the regex is a little more flexible and less specific than the previous version.
2022-03-26remove duplicate W=i/C=i args (#1755)Tobias Fiebig1-2/+0
Co-authored-by: Tobias Fiebig <t.fiebig@tudelft.nl>
2022-01-21Rebase to master (#1731)Lorenz1-7/+9
2021-12-02Fix syntax error resulting from mergingrefs/pull/1490/headRincewindsHat1-1/+1
2021-12-02Merge branch 'master' into mailq-add-config-dirRincewindsHat1-3/+5
2021-11-29Merge pull request #1493 from darksoul42/masterRincewindsHat1-1/+1
Fix regexp for nullmailer "mailq" output. Looks good. Thank you very much.
2020-12-08check_mailq: restore accidentially removed optionsrefs/pull/1650/headSven Nierlein1-3/+5
with https://github.com/monitoring-plugins/monitoring-plugins/issues/381 -W and -C have been removed. It would have been sufficient to only remove the long options. Restoring short options.. - fixes https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=954961
2017-06-07Fix regexp for nullmailer "mailq" outputrefs/pull/1493/headStephane Lapie1-1/+1
As it currently is, the regular expression does not match mailq command output on a Debian Jessie setup. Three erroneous behaviors fixed : - Meaningful lines do not end with the "bytes" word - There might be one or more space before the byte count, not 2 - Time match was completely broken, it only accounted for 0-29 minutes and 0-29 seconds.
2017-05-16Add mailq -C option for config dir or config fileLee Clemens1-9/+17
New variable, mailq_args, is appended for postfix mta mailq commands Fixes #1489
2015-10-04change exit code to unknown on help and version infoSven Nierlein1-2/+2
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2015-10-02drop superfluous libexecdirElan Ruusamäe1-1/+0
utils.pm locate is already convered by FindBin
2014-12-02check_mailq: Add sudo supportHolger Weiss1-8/+22
This addition is based on a patch contributed by Christopher Schultz. Closes #1099. Closes #1171.
2014-09-29check_mailq: fixed mailer namesSimon Meggle1-2/+2
(Closes #1289)
2014-07-06Don't rely on FindBin module to locate utils.pmHolger Weiss1-0/+1
As the FindBin module doesn't work with ePN, set the path to utils.pm explicitly at build time. Keep using FindBin additionally, so that the plugins can also be executed from the build directory. Closes #1271.
2014-02-28Replace "plugins-scripts/subst.in" fooHolger Weiss1-2/+2
Remove the buggy and complex awk(1) magic in "plugins-scripts/subst.in" in favor of simple sed(1) substitutions. The plugins in the "plugins-scripts" directory now always use the PATH specified via "./configure --trusted-path", or the default PATH hard-coded in "configure.ac". Fixes #1242.
2014-02-28Merge remote-tracking branch 'awiddersheim/fix_trusted_path'Holger Weiss1-1/+1
* awiddersheim/fix_trusted_path: Fix trusted path Conflicts: plugins-scripts/check_ntp.pl plugins-scripts/subst.in Closes #1212.
2014-02-27utils.pm: use FindBin instead of awk to find the path toEvgeni Golov1-1/+2
'use lib utils.pm' is not valid Perl syntax: Bareword "utils" not allowed while "strict subs" in use at plugins-scripts/check_ircd.pl line 52. Bareword "pm" not allowed while "strict subs" in use at plugins-scripts/check_ircd.pl line 52. This makes it impossible to use the plugins directly from the git tree, e.g. while hacking on them. Using FindBin::Bin as the library path allows that, while preserving the original behaviour of adding the libexec path when the plugin is properly installed.
2014-02-27check_mailq: add $mailq to check output, so it is easily visible what was ↵Evgeni Golov1-17/+17
autodetected Closes: #1242
2014-02-27check_mailq: document autodetection in the usage outputEvgeni Golov1-1/+3
2014-02-27check_mailq: try to autodetect which mailq implementation we are usingEvgeni Golov1-1/+24
This is done by looking at some common directories and files each MTA installs on the system. If no known file is found, the old default sendmail is used. Of course this still can be overridden by -M.
2014-01-29check_mailq: adding nullmailer supportJan Wagner1-2/+39
Adding nullmailer support to check_mailq submitted by Luca Corti Closes: #740 Closes: #1189
2014-01-29Just fixing small typo in commentJan Wagner1-1/+1
2014-01-22fix outdated Free Software Foundation addressLars Vogdt1-2/+2
2013-10-22Fix trusted pathrefs/pull/1212/headawiddersheim1-1/+1
When configuring the plugins you have the option to specify a trusted path with --with-trusted-path. This option seems to have been deprecated at some point for unknown reasons and had typically had no affect. This commit makes this option work again for those who have a desire to use it. There should be no affect on those who have not chosen to specify a trusted path.
2009-02-20Typo fixes (Jan Wagner - SF 1878971)Ton Voon1-1/+1
2008-11-23Removing CVS/SVN tags and replacing with git-based versioningThomas Guyot-Sionnest1-3/+2
For contrib/, full tags have been imported from subversion git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2091 f882894a-f735-0410-b71e-b25c423dba1c
2006-07-05Fixed checking of return codes from external mailq programsTon Voon1-15/+14
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1443 f882894a-f735-0410-b71e-b25c423dba1c
2005-04-14check_mailq fix, don't be case sensitive matching /^\s+Total\sRequests:\s(\d+)$/M. Sean Finney1-1/+1
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1162 f882894a-f735-0410-b71e-b25c423dba1c
2005-01-03fixes for #1094324Benoit Mortier1-2/+2
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1076 f882894a-f735-0410-b71e-b25c423dba1c
2003-09-15Added Exim support (768445 - Eric Bollengier)Ton Voon1-4/+39
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@726 f882894a-f735-0410-b71e-b25c423dba1c
2003-05-14Added postfix support (Thomas Nilsen - 735218)Ton Voon1-2/+86
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@513 f882894a-f735-0410-b71e-b25c423dba1c
2003-04-13Added sendmail multi-queue support (Canau), merged qmail support (Schmid)Subhendu Ghosh1-50/+362
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@490 f882894a-f735-0410-b71e-b25c423dba1c
2002-10-30monitor mailqSubhendu Ghosh1-0/+179
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@163 f882894a-f735-0410-b71e-b25c423dba1c