Logging into a web form

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
delboy1966
Posts: 94
Joined: Thu Oct 22, 2015 5:26 am

Logging into a web form

Post by delboy1966 »

Not sure if this is the correct forum for this question, so apologises if its not.

We have a site I need to put a check against, to ensure the site is authenticating a user and then check the resulting page.
It uses form based authentication and I've not yet been able to find anything I can use to login to the page, I've tried a number of Perl Cpan modules but without success.

Attached is a screen shot of the webpage form and also the code from the source code of the webpage.
form.PNG
form.txt
(8.32 KiB) Downloaded 204 times

Thanks in advance
Tony
User avatar
nozlaf
Posts: 172
Joined: Sun Nov 09, 2014 9:50 pm
Location: Victoria, Australia

Re: Logging into a web form

Post by nozlaf »

you sure can i'm about to head to bed so sorry for the brief response but this old archive has the answer


https://www.mail-archive.com/nagios-use ... 23865.html
Looking forward to seeing you all at #NagiosCon2019?
-Dedicated Lover of Nconf,PNP4Nagios and Nagvis
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Logging into a web form

Post by hsmith »

Thank you, @nozlaf!
Former Nagios Employee.
me.
User avatar
nozlaf
Posts: 172
Joined: Sun Nov 09, 2014 9:50 pm
Location: Victoria, Australia

Re: Logging into a web form

Post by nozlaf »

I'm interested to know why you want to test to see if you can log into your EPO server,

i'm a huge fan of EPO and nagios but not sure of the benefit of doing this

you could check to see if your epo server is running properly a number of different ways like checking for the services via nsclient
Looking forward to seeing you all at #NagiosCon2019?
-Dedicated Lover of Nconf,PNP4Nagios and Nagvis
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Logging into a web form

Post by tmcdonald »

@delboy1966 please let us know if that linked thread helped.
Former Nagios employee
delboy1966
Posts: 94
Joined: Thu Oct 22, 2015 5:26 am

Re: Logging into a web form

Post by delboy1966 »

Hi All

Thanks for your help.

@nozlaf
Its been requested. I agree you I could just check if the service is running and we do. However its been requested to ensure that:
1. Authentication is working
2. The page is displaying correctly
So that we aren't made aware of it when a manager can't login or the page isn't loading.

@tmcdonald
For some reason its not actually working, it just comes back with a connection refused using the check_http plugin.
However I have found that using the CPAN WWW::Mechanize module works fine.

Thanks again
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Logging into a web form

Post by rkennedy »

Just to make sure - are we good to mark this thread as resolved then?
Former Nagios Employee
Locked