[Bug 239168] net-mgmt/nagios-plugins: freebsd-patch breaks long ps output
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Fri Jul 12 16:27:28 UTC 2019
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239168
Bug ID: 239168
Summary: net-mgmt/nagios-plugins: freebsd-patch breaks long ps
output
Product: Ports & Packages
Version: Latest
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: Individual Port(s)
Assignee: mat at FreeBSD.org
Reporter: johan at stromnet.se
Flags: maintainer-feedback?(mat at FreeBSD.org)
Assignee: mat at FreeBSD.org
With nagios-plugins 2.2.1_8,1 the check_procs plugin fails to match arguments
on processes with long titles, when executed by ngios.
When running the plugin manually from terminal, it works, but when nagios runs
it the check fails.
I was able to reproduce it in terminal when giving /dev/null as stdin:
$ /usr/local/libexec/nagios//check_procs -w 1: -c 1: -a'python -m pyowmaster
owmaster-dev.yaml' -vv
CMD: /bin/ps -axwo 'stat uid pid ppid jid vsz rss pcpu comm args'
Matched: uid=1001 vsz=18364 rss=5272 pid=4700 ppid=4680 jid=0 pcpu=0.00 stat=I+
etime= prog=python3.6 args=/home/johan/dev/pyowmaster/venv/bin/python -m
pyowmaster owmaster-dev.yaml (python3.6)
PROCS OK: 1 process with args 'python -m pyowmaster owmaster-dev.yaml' |
procs=1;1:;1:;0;
$ /usr/local/libexec/nagios//check_procs -w 1: -c 1: -a'python -m pyowmaster
owmaster-dev.yaml' < /dev/null
CMD: /bin/ps -axwo 'stat uid pid ppid jid vsz rss pcpu comm args'
PROCS CRITICAL: 0 processes with args 'python -m pyowmaster owmaster-dev.yaml'
| procs=0;1:;1:;0;
$
I believe the problem is this patch:
https://svnweb.freebsd.org/ports/head/net-mgmt/nagios-plugins/files/patch-configure?view=markup
It uses "-axwo" but it should be "-axwwo" to ensure ps does not care about
terminal width. Altering the patch to use use -axwwo resolves the issue.
(In HEAD version of ps this has actually been altered, but this is not in 11.x
or even 12.x it seem):
https://svnweb.freebsd.org/base?view=revision&revision=330712
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ports-bugs
mailing list