-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strange truncation issue with nrpe? #35
Comments
As a test, have you tried creating a [check_procs_test] command with the full command instead of parsing it as an argument?
|
Just tested. No difference from passing the arguments to -a. |
The may be the same issue I fixed in the "maint" branch of nagios-plugins Go into |
I don't think that's the case as running |
This particular server was running an old version of |
Hello,
Commands like
check_procs
seems to fail when used throughcheck_nrpe
/nrpe
when the output parsed by the command executed exceeds some length. That is - we're not talking about the output returned by check_nrpe, nor check_procs for that matter, but the output parsed by the command called by nrpe. (check_procs
in this example).See the following example:
We're first executing
check_procs
directly without the involvement ofnrpe
, which succeeds.Then we're executing
check_procs
throughnrpe
, passing the exact same arguments, which fails when the output parsed by the command execeeds a certain length. This is the case even though the output parsed by check_procs isn't returned to nrpe. This "size theory" is based on the fact thatcheck_procs
works properly withcheck_nrpe
when the output parsed bycheck_procs
is smaller.succeeds - check_procs executed directly without the involvement of nrpe
xxx-s971:/usr/local/nagios/libexec # ./check_procs -C java -a fmsmaster_FSC_BCA_TCUA_PMM_PROD_infodba.xml -vv
CMD: /bin/ps axwo 'stat uid pid ppid vsz rss pcpu cgroup:256 comm args'
Matched: uid=5000 vsz=705568 rss=208800 pid=6287 ppid=1 pcpu=0.00 stat=Sl etime= prog=java args=/usr/java/jdk1.7.0_75/jre/bin/java -d64 -server -Xms256M -Xmx256M -Dcom.sun.management.jmxremote -Dfms.config=./fmsmaster_FSC_BCA_TCUA_PMM_PROD_infodba.xml -Dfsc.config=./FSC_BCA_TCUA_PMM_PROD_infodba.xml -classpath jar/fmsservercache.jar:jar/fmsutil.jar:jar/fscjavaclientproxy.jar:third_party/commons-collections/3.0/commons-collections-3.0.jar:third_party/commons-logging/commons-logging-1.0.4/commons-logging.jar:third_party/commons-httpclient/commons-httpclient-3.1/commons-httpclient-3.1.jar:third_party/commons-codec/commons-codec-1.3/commons-codec.jar:third_party/javamail/1.3/mail.jar:third_party/mld/tc9.1.0.20120806/plmJMXmonitor.jar:third_party/mld/tc9.1.0.20120806/log4j-1.2.13.jar:third_party/mld/tc9.1.0.20120806/jmxtools.jar:third_party/mld/tc9.1.0.20120806/jmxri.jar:third_party/mld/tc9.1.0.20120806/logwriter.jar:third_party/OnionNetworks/webraid-2.6.8_01/lib/onion-common.jar:third_party/OnionNetworks/webraid-2.6.8_01/lib/onion-wantransport-tools.jar:third_party/OnionNetworks/webraid-2.6.8_01/lib/onion-webraid.jar:third_party/OnionNetworks/webraid-2.6.8_01/lib/onion-webraidutil-tools.jar:third_party/OnionNetworks/webraid-2.6.8_01/lib/onion-webraidutil.jar:third_party/OnionNetworks/webraid-2.6.8_01/lib/jdom.jar:third_party/jetty/9.2.0/jetty-server-9.2.0.v20140526.jar:third_party/jetty/9.2.0/jetty-util-9.2.0.v20140526.jar:third_party/jetty/9.2.0/jetty-http-9.2.0.v20140526.jar:third_party/jetty/9.2.0/jetty-io-9.2.0.v20140526.jar:third_party/jetty/9.2.0/servlet-api-3.1.jar:third_party/TcSS/2009.1_20120207/jars/teamcenter_sso_common.jar:third_party/TcSS/2009.1_20120207/jars/teamcenter_sso_proxy.jar:third_party/TcSS/2009.1_20120207/jars/teamcenter_sso_webtoolkit.jar:third_party/TcSS/2009.1_20120207/jars/teamcenter_sso_applib.jar -Djava.library.path=./lib -Dsun.net.client.defaultConnectTimeout=90000 -Dsun.net.client.defaultReadTimeout=90000 -Dcom.teamcenter.mld.logging.prefix=FSC_BCA_TCUA_PMM_PROD_infodba com.teamcenter.fms.servercache.FMSServerCache cgroup_hierarchy=(null)
PROCS OK: 1 process with command name 'java', args 'fmsmaster_FSC_BCA_TCUA_PMM_PROD_infodba.xml' | procs=1;;;0;
fails - check_procs executed with nrpe
xxx-s971:/usr/local/nagios/libexec # ./check_nrpe -H 127.0.0.1 -c check_procs -a "-C java -a fmsmaster_FSC_BCA_TCUA_PMM_PROD_infodba.xml -vv"
CMD: /bin/ps axwo 'stat uid pid ppid vsz rss pcpu cgroup:256 comm args'
PROCS OK: 0 processes with command name 'java', args 'fmsmaster_FSC_BCA_TCUA_PMM_PROD_infodba.xml' | procs=0;;;0;
We're only passing$ARG1$ to
check_procs
in nrpe.cfg.Thanks!
The text was updated successfully, but these errors were encountered: