External Command: Malformed Command

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Re: External Command: Malformed Command

Postby shekharalle » Wed Jan 09, 2019 12:39 am

So as pointed by you I have commented out the cpu events.
So as to check whether that is causing any issues.
But I am still able to see the External Command Error:Malformed Command:

Informational Message[01-09-2019 00:39:01] External command error: Malformed command
Informational Message[01-09-2019 00:39:01] External command error: Malformed command
Informational Message[01-09-2019 00:39:01] External command error: Malformed command
Informational Message[01-09-2019 00:39:01] External command error: Malformed command
Informational Message[01-09-2019 00:39:01] External command error: Malformed command
Informational Message[01-09-2019 00:39:01] External command error: Malformed command
Informational Message[01-09-2019 00:39:01] External command error: Malformed command
Informational Message[01-09-2019 00:39:01] External command error: Malformed command
Informational Message[01-09-2019 00:39:01] External command error: Malformed command
Informational Message[01-09-2019 00:39:01] External command error: Malformed command
Informational Message[01-09-2019 00:39:01] External command error: Malformed command
Informational Message[01-09-2019 00:39:01] External command error: Malformed command
Passive Service Check[01-09-2019 00:39:01] PASSIVE SERVICE CHECK: rhel-test;memory;0;78.79% used
External Command[01-09-2019 00:39:01] EXTERNAL COMMAND: PROCESS_SERVICE_CHECK_RESULT;rhel-test;memory;0;78.85% used
Informational Message[01-09-2019 00:39:01] External command error: Malformed command
Informational Message[01-09-2019 00:39:01] External command error: Malformed command
Informational Message[01-09-2019 00:39:01] External command error: Malformed command
Informational Message[01-09-2019 00:39:01] External command error: Malformed command
Informational Message[01-09-2019 00:39:01] External command error: Malformed command
Informational Message[01-09-2019 00:39:01] External command error: Malformed command
Informational Message[01-09-2019 00:39:01] External command error: Malformed command
Informational Message[01-09-2019 00:39:01] External command error: Malformed command
Informational Message[01-09-2019 00:39:01] External command error: Malformed command
Informational Message[01-09-2019 00:39:01] External command error: Malformed command
Informational Message[01-09-2019 00:39:01] External command error: Malformed command
Passive Service Check[01-09-2019 00:39:01] PASSIVE SERVICE CHECK: concourse-ubuntu;memory;0;17.10% used
External Command[01-09-2019 00:39:01] EXTERNAL COMMAND: PROCESS_SERVICE_CHECK_RESULT;concourse-ubuntu;memory;0;17.10% used
Passive Service Check[01-09-2019 00:38:59] PASSIVE SERVICE CHECK: ubuntu-test;disk /;0;44% used
External Command[01-09-2019 00:38:59] EXTERNAL COMMAND: PROCESS_SERVICE_CHECK_RESULT;ubuntu-test;disk /;0;44% used
Informational Message[01-09-2019 00:38:59] External command error: Malformed command
Informational Message[01-09-2019 00:38:59] External command error: Malformed command



And as you can see in the nagios.log I still have the issue of event not being found:
Service Critical[01-09-2019 00:56:09] SERVICE ALERT: ubuntu-test;memory;CRITICAL;SOFT;1;CRITICAL: Didn't got the response from Passive Check (Please Check)


But in my riemann log I can see the event is being generated.
shekharalle
 
Posts: 22
Joined: Mon Dec 10, 2018 3:52 am

Re: External Command: Malformed Command

Postby ssax » Wed Jan 09, 2019 4:00 pm

Have you tried disabling the memory one in riemann to see if that's the one causing the malformed command error?

If you are receiving "Didn't got the response from Passive Check (Please Check)" on it then they are not being received. The other ones are showing up so I would assume it's the memory one.

Let us know the results.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
ssax
Dreams In Code
 
Posts: 3793
Joined: Wed Feb 11, 2015 12:54 pm

Re: External Command: Malformed Command

Postby shekharalle » Wed Jan 09, 2019 8:05 pm

No it's not only the memory one, sometimes it happens for all the services.
shekharalle
 
Posts: 22
Joined: Mon Dec 10, 2018 3:52 am

Re: External Command: Malformed Command

Postby ssax » Fri Jan 11, 2019 5:37 pm

If you run this command and leave it running during the time you receive a Malformed Command error does it list any warnings/errors?

Code: Select all
tail -Fn0 /var/log/httpd/*_log


Are you able to show us what you have set in your Riemann setup?
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
ssax
Dreams In Code
 
Posts: 3793
Joined: Wed Feb 11, 2015 12:54 pm

Re: External Command: Malformed Command

Postby cdienger » Fri Jan 11, 2019 5:49 pm

The commands that appaer to be getting submitted and causing the malformed error look to be information regarding cpu:

Code: Select all
    %CPU   PID COMMAND
    0.0     9 migration/0
    0.0    99 deferwq
    nagios
    0.1  4991 nagios
    %CPU   PID COMMAND
    0.0     9 rcu_sched
    0;55.90% used
    8.1 24298 java
    7.3 16618 gnome-shell
    6.7  8818 firefox
    6.3  8937 Web Content
    5.2  9086 Web Content
    5.1 17108 gnome-software
    5.0  2522 gnome-shell
    3.9  9029 WebExtensions
    2.3 16362 Xorg
    1.9  9269 Web Content


Try disabling the riemann cpu check to see if that reduces the number of malformed errors. If that doesn't help, try disabling disk. Or another approach would be to disable them all and enable them one at time to see where there may be an issue.

Also, how frequently is data getting sent over from riemann? It looks like the same data is getting submitted multiple times a second. Try reducing the frequency the data is sent to once every 5 or 10 minutes. Set the freshness on the service according - https://assets.nagios.com/downloads/nag ... hness.html
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
cdienger
Support Tech
 
Posts: 2679
Joined: Tue Feb 07, 2017 11:26 am

Re: External Command: Malformed Command

Postby shekharalle » Sun Jan 13, 2019 10:23 pm

When I try to find the log using following command:

sudo tail -Fn0 /var/log/httpd/*_log
tail: cannot open ‘/var/log/httpd/*_log’ for reading: No such file or directory


This is what I get.

And I am still getting the External Command: Malformed Error even though I have commented out the cpu service for testing.

[1547436150] External command error: Malformed command
[1547436150] External command error: Malformed command
[1547436150] External command error: Malformed command
[1547436150] External command error: Malformed command
[1547436150] External command error: Malformed command
[1547436150] External command error: Malformed command
[1547436150] External command error: Malformed command
[1547436150] External command error: Malformed command
[1547436151] EXTERNAL COMMAND: PROCESS_SERVICE_CHECK_RESULT;concourse-ubuntu;memory;0;39.24% used
[1547436151] PASSIVE SERVICE CHECK: concourse-ubuntu;memory;0;39.26% used
[1547436151] External command error: Malformed command
[1547436151] External command error: Malformed command
[1547436151] External command error: Malformed command
[1547436151] External command error: Malformed command
[1547436151] External command error: Malformed command
[1547436151] External command error: Malformed command
[1547436151] External command error: Malformed command
[1547436151] External command error: Malformed command
[1547436151] External command error: Malformed command
[1547436151] External command error: Malformed command
[1547436151] External command error: Malformed command
[1547436152] EXTERNAL COMMAND: PROCESS_SERVICE_CHECK_RESULT;rhel-test;memory;0;78.04% used
[1547436152] PASSIVE SERVICE CHECK: rhel-test;memory;0;77.90% used
[1547436152] External command error: Malformed command
[1547436152] External command error: Malformed command
[1547436152] External command error: Malformed command
[1547436152] External command error: Malformed command
[1547436152] External command error: Malformed command
[1547436152] External command error: Malformed command
[1547436152] External command error: Malformed command
[1547436152] External command error: Malformed command
[1547436152] External command error: Malformed command
[1547436152] External command error: Malformed command
[1547436152] External command error: Malformed command
[1547436152] EXTERNAL COMMAND: PROCESS_SERVICE_CHECK_RESULT;rhel-test;disk /;0;52% used
[1547436152] PASSIVE SERVICE CHECK: rhel-test;disk /;0;52% used
shekharalle
 
Posts: 22
Joined: Mon Dec 10, 2018 3:52 am

Re: External Command: Malformed Command

Postby cdienger » Tue Jan 15, 2019 1:42 pm

Try disabling all the checks and then enable them one at a time to see if there is one that is causing the problem.

Also, how frequently is data getting sent over from riemann?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
cdienger
Support Tech
 
Posts: 2679
Joined: Tue Feb 07, 2017 11:26 am

Previous

Return to Nagios Core

Who is online

Users browsing this forum: mikehlim and 16 guests