curl error when running nrdp

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

curl error when running nrdp

Post by bosecorp »

I get this error when the job tries to run. I have this in a cron job every five minutes

this happens in AIX only

$ /opt/nagios/nrdp/clients/nrds/nrds.pl -H 'tledev.bose.com'
curl: option --insecure is unknown
curl: try 'curl --help' for more information

the error seems to be coming from script send_nrdp.sh

line 36

send_data() {
pdata="token=$token&cmd=submitcheck&XMLDATA=$1"
if [ ! "x$curl" == "x" ];then
rslt=`curl -f --silent --insecure -d "$pdata" "$url/"`
ret=$?
else
rslt=`wget -q -O - --post-data="$pdata" "$url/"`
ret=$?
fi
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: curl error when running nrdp

Post by abrist »

The AIX curl bin may not have an insecure switch. What is the output of:

Code: Select all

curl --help | grep insecure
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Re: curl error when running nrdp

Post by bosecorp »

if I remove the switch.

can still do https?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: curl error when running nrdp

Post by abrist »

Only if your cert is not self-signed. . .
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Re: curl error when running nrdp

Post by bosecorp »

removed the insecure and this is the error I get now

[3/31/2015 3:26 PM] Viens, Ernest:
/opt/nagios/nrdp/clients/nrds/nrds.pl -H 'eccha1.bose.com'
ERROR: could not connect to NRDP server at http://nagmonus1/nrdp/
curl exited with error 1792
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: curl error when running nrdp

Post by scottwilkerson »

Can this AIX server resolve the host?

Code: Select all

ping nagmonus1
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Re: curl error when running nrdp

Post by bosecorp »

keep in mind this device is behind the firewall and we only allow 443



eccha1{root}:/} 04/01/15 09:39 :
# ping nagmonus1
PING nagmonus1.bose.com: (10.100.30.111): 56 data bytes
64 bytes from 10.100.30.111: icmp_seq=0 ttl=61 time=1 ms
64 bytes from 10.100.30.111: icmp_seq=1 ttl=61 time=1 m
cmerchant
Posts: 546
Joined: Wed Sep 24, 2014 11:19 am

Re: curl error when running nrdp

Post by cmerchant »

I believe you need to specify your URL as: https://nagmonus1/nrdp/
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Re: curl error when running nrdp

Post by bosecorp »

I tried changing it in all the places I could find and still see in my firewall cul trying to use http instead of https

this is the error

gtsha2{root}:/opt/nagios/nrdp/clients/nrds} 04/01/15 13:46 :
# /opt/nagios/nrdp/clients/nrds/nrds.pl -H 'gtsha2.bose.com'
ERROR: could not connect to NRDP server at https://nagmonus1/nrdp/
curl exited with error 256

the problem is the curl for AIX does not support --insecure, what is the replacement for that in AIX
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: curl error when running nrdp

Post by tgriep »

Can you run the following and post the full output in case the command line is different in AIX?

Code: Select all

curl --help
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked