RESOLVED: External command fails

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
chris_hird
Posts: 20
Joined: Mon Jan 18, 2021 8:47 am

RESOLVED: External command fails

Post 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...
Last edited by chris_hird on Mon Jan 19, 2026 11:23 am, edited 1 time in total.
User avatar
lgute
Posts: 411
Joined: Mon Apr 06, 2020 2:49 pm

Re: External command fails

Post 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".
Please let us know if you have any other questions or concerns.

-Laura
chris_hird
Posts: 20
Joined: Mon Jan 18, 2021 8:47 am

Re: External command fails

Post 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
chris_hird
Posts: 20
Joined: Mon Jan 18, 2021 8:47 am

Re: External command fails

Post 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
User avatar
lgute
Posts: 411
Joined: Mon Apr 06, 2020 2:49 pm

Re: External command fails

Post by lgute »

@chris_hird,

Fantastic. I'm glad you got it working and thanks for the update.
Please let us know if you have any other questions or concerns.

-Laura
Locked