Page 1 of 1

RESOLVED: External command fails

Posted: Fri Jan 16, 2026 10:09 am
by chris_hird
We are trying to send back commands from an IBM i to the Nagios XI server, some work but others do not and we cannot figure out what the problem is? We are doing this via NRPE web interface. Here is the request we are sending.
2026-01-16 10:15:48 : main : Request buffer: POST /nrdp/ HTTP/1.1
Host: nagiosxi.shield.local
Content-Type: application/x-www-form-urlencoded
Content-Length: 101

token=xxxxxxxxx&cmd=submitcmd&command=ENABLE_SVC_CHECK;SAS1005;SAS1005_AAG_EM4I_KEYEXP;13987937749
This is the response from the server
Server: Apache/2.4.58 (Ubuntu)
Vary: Accept-Encoding
Content-Length: 107
Content-Type: text/xml;charset=UTF-8

<?xml version="1.0" encoding="utf-8"?>
<result>
<status>0</status>
<message>OK</message>
</result>
This is the information in the event log
2026-01-16 09:15:49
External command [1768572949] ENABLE_SVC_CHECK;SAS1005;SAS1005_AAG_EM4I_KEYEXP;13987937749 returned error Command failed
I looked through the Apache logs and cannot see any errors logged there and not sure where else to look for errors?

Why does the web interface return OK when internally the command is failing? Where can I find the actual reason the command fails? I have other commands which work OK (ENABLE_HOST_NOTIFICATIONS;DISABLE_HOST_NOTIFICATIONS; etc)

We are running Version: 2026R1.0.1 on Debian.

Chris...

Re: External command fails

Posted: Fri Jan 16, 2026 3:27 pm
by lgute
Hi @chris_hird,

Thanks for reaching out. Have you gone through the NRPE troubleshooting docs? This is the link for the "NRPE General Troubleshooting Tips".

Re: External command fails

Posted: Mon Jan 19, 2026 11:23 am
by chris_hird
Additional Information from the debug log (Note: this is for a separate request but it has the same data involved.) I have removed the token but it is correct.
[Mon, 19 Jan 2026 10:56:30 -0500] check_auth()
[Mon, 19 Jan 2026 10:56:30 -0500] check_token()
[Mon, 19 Jan 2026 10:56:30 -0500] checking token: xxxxxxxxxxx
[Mon, 19 Jan 2026 10:56:30 -0500] * token passed
[Mon, 19 Jan 2026 10:56:30 -0500] nagioscorecmd_process_request(cbtype = PROCESS_REQUEST, args[cmd] = submitcmd
[Mon, 19 Jan 2026 10:56:30 -0500] nagioscorecmd_submit_nagios_command(raw = FALSE)
[Mon, 19 Jan 2026 10:56:30 -0500] nagioscorecmd_is_token_authorized(token=xxxxxxxxxxxx, command=DISABLE_SVC_CHECK)
[Mon, 19 Jan 2026 10:56:30 -0500] no deny_tokens specified, everything is okay! returning..
[Mon, 19 Jan 2026 10:56:30 -0500] so far so good.. moving ahead with writing the command!
[Mon, 19 Jan 2026 10:56:30 -0500] 1 commands written

Re: External command fails

Posted: Tue Jan 20, 2026 1:43 pm
by chris_hird
The problem is due to the IBM i command having a CASE of *MONO. SO when we entered the service name it was converted to all upper case. Changed the command definition and it is now working as it should.

Thanks

Re: External command fails

Posted: Wed Jan 21, 2026 9:41 am
by lgute
@chris_hird,

Fantastic. I'm glad you got it working and thanks for the update.