Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
cURL scripts to monitor an APIby jim.fazzone.5i (Initiate) |
on Aug 19, 2013 at 23:37 UTC ( [id://1050104]=perlquestion: print w/replies, xml ) | Need Help?? |
jim.fazzone.5i has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks!
My Perl-fu is severely lacking, but I was hoping I could turn to all of you to help me with some monitoring I'm trying to get working on a Nagios box. I know how the cURL scripts should look, but I'm having trouble with getting PERL to run these as a monitoring job. Essentially the flow goes like this: 1) POST command calls an SSO service with a user/pass 2) That SSO token then gets inserted into the header of the request of the subsequent URL 3) The API spits back data Simple enough, right? My cURL scripts run like so:
Then, I'd like to be able to capture whatever the browser would spit back into a .log file. If it has stuff in it, great! If it returns with ERROR, we want it to alarm. Easy enough, but I'm totally stuck on how to get started here. Any thoughts?
Back to
Seekers of Perl Wisdom
|
|