Hi Don
Maybe you should try this:
https://github.com/AlexeiBaranov/ile_logger
You can use ile_logger to produce syslog messages using printf style calls. In case of syslog server inaccessibility, or in any other errors in logging, it will write messages to job log.
Regards,
Alexei
-------- Original Message --------
Subject : How to monitor for a curl error
From : Don Brown via MIDRANGE-L midrange-l@xxxxxxxxxxxxxxxxxx
To : midrange-l@xxxxxxxxxxxxxxxxxx
Cc : Don Brown <DBrown@xxxxxxxxxx>
Date : Wednesday, September 8, 2021 10:55
Hi All
I am out of my depth with this curl stuff and hoping someone can advise.
I have been searching for curl information - maybe I should be searching
for qsh ?
I am using curl to write to a GreyLog syslog server.
I am using qcmdexc to run the qsh command that uses curl to post to the
syslog server.
This works but I have found if there are many messages to be written I can
get an error
curl: (7) Failed to connect ... connection refused
This message appears in the joblog
My call looks like this;
callp(e) QCmdExc(Cmd:CmdLen);
if %error();
I do get an error but how do I retrieve the actual error that is being
sent to the job log (or the qsh session if run interactively) ?
I think the server is just having a hard time keeping up so if I get this
error I was going to retry sending the post or perhaps put a short sleep
to handle this issue.
Appreciate any suggestions
Thank you
Don
--
This email has been scanned for computer viruses. Although MSD has taken reasonable precautions to ensure no viruses are present in this email, MSD cannot accept responsibility for any loss or damage arising from the use of this email or attachments..
As an Amazon Associate we earn from qualifying purchases.