curl error when running nrdp
curl error when running nrdp
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
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
Re: curl error when running nrdp
The AIX curl bin may not have an insecure switch. What is the output of:
Code: Select all
curl --help | grep insecureFormer 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.
"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.
Re: curl error when running nrdp
if I remove the switch.
can still do https?
can still do https?
Re: curl error when running nrdp
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.
"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.
Re: curl error when running nrdp
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
[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
Can this AIX server resolve the host?
Code: Select all
ping nagmonus1Re: curl error when running nrdp
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
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
Re: curl error when running nrdp
I believe you need to specify your URL as: https://nagmonus1/nrdp/
Re: curl error when running nrdp
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
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
Re: curl error when running nrdp
Can you run the following and post the full output in case the command line is different in AIX?
Code: Select all
curl --helpBe sure to check out our Knowledgebase for helpful articles and solutions!