Submit NRDP with Curl

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
spurrellian
Posts: 43
Joined: Tue Jan 06, 2015 6:26 am
Location: Bath, UK

Submit NRDP with Curl

Post by spurrellian »

Hi,

I'm trying to send a passive check to my nagios host where the results has a space in it

Code: Select all

curl -X POST -L 'http://nagios-live/nrdp?cmd=submitcmd&token=****&command=PROCESS_SERVICE_CHECK_RESULT;wxapsdpoc03;SQL_Daily_1;1;Backup Failed' --insecure
When it displays in Nagios it misses off " Failed" and just displays the word Backup
sqldaily.PNG
Can anyone help with the syntax?

Thanks

Paul
You do not have the required permissions to view the files attached to this post.
Paul S - Using Nagios XI, Network Analyzer, Log Server
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Submit NRDP with Curl

Post by tmcdonald »

You should replace all spaces with %20 as that is the URL-encoding of the space character - https://www.w3schools.com/tags/ref_urlencode.asp
Former Nagios employee
spurrellian
Posts: 43
Joined: Tue Jan 06, 2015 6:26 am
Location: Bath, UK

Re: Submit NRDP with Curl

Post by spurrellian »

I tried with %20 and it didnt work. but using + did

You can close the call

Thanks :)
Paul S - Using Nagios XI, Network Analyzer, Log Server
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Submit NRDP with Curl

Post by tmcdonald »

Ahh, yea my mistake. I think %20 would only work if the curl command was in double-quotes.

At any rate, glad to (sort of) help!
Former Nagios employee
Locked