<div dir="ltr">You may need to write a script to handle the check, especially if it does anything tricky with Javascript or JSON.<div><br></div><div>Start with the login page:</div><div><br></div><div>    curl -s -S -L -b cookies -c cookies -o login_page.html -v <a href="http://thing.mydomain.com">http://thing.mydomain.com</a></div><div><br></div><div>The -v option gets you the headers that go back and forth, in case that's useful.  Read through the login_page.html and see what's in the login form, and if it's just a simple POST.  Look for hidden fields to send back,</div><div><br></div><div>    curl -s -S -L -b cookies -c cookies -o page.html -d userid=xxxx -d passwd=xxxx -v <a href="http://thing.mydomain.com">http://thing.mydomain.com</a></div><br><div>that's assuming the variable names in the INPUT fields are "userid" and "passwd".  Then see what page.html contains.  Lather, rinse, repeat, until you get to the page you're interested in.</div><div><br></div><div>If it *does* do anything tricky with Javascript, JSON, or anything else, you may never be able to do it in shell scripts.  You might be able to get something done in python or another language.</div><div><br></div><div>Ralph Mitchell<br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, May 21, 2020 at 7:28 PM Kris Springer <<a href="mailto:kspringer@innovateteam.com">kspringer@innovateteam.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi all.  I'm trying to get xymon to log into a device we have and check <br>
for a keyword on a certain page.  I know how to check a site for keyword <br>
using 'cont', but the device requires a login and I can't seem to get it <br>
to work.  It's just an http device, but the <br>
<a href="http://username:password@1.2.3.4.com" rel="noreferrer" target="_blank">http://username:password@1.2.3.4.com</a> doesn't work, and neither does the <br>
'netrc' file that I found in an old blog post.  Anyone know how to get <br>
this to work?<br>
<br>
-- <br>
Kris Springer<br>
<br>
_______________________________________________<br>
Xymon mailing list<br>
<a href="mailto:Xymon@xymon.com" target="_blank">Xymon@xymon.com</a><br>
<a href="http://lists.xymon.com/mailman/listinfo/xymon" rel="noreferrer" target="_blank">http://lists.xymon.com/mailman/listinfo/xymon</a><br>
</blockquote></div>