It would depend on exactly how the page/application is handling logins.
I would suggest first trying to write this as a web transaction with WebInject since this has the most seamless integration with Nagios XI:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Assuming it's an HTML form that references some sort of POST action, you can use
check_http to POST directly to the login page. However, most modern web forms will have
CSRF tokens to prevent this.
An alternative which can work around CSRF tokens would be to use a proper web driver framework like Selenium. There's official integration docs for Nagios XI available here:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
I've also written a small Python based plugin that can interpret
CasperJS tests if you don't want something as heavy as Selenium. I meant to do a write-up on Nagios XI integration, but haven't gotten around to it:
https://github.com/mcapra/nagios-check_casperjs
Frankly, CasperJS is probably the most lightweight and versatile option since Nagios XI already ships with
PhantomJS. However, it requires you to know some intimate details about web back/front ends to get the full use out of it. You can use something like
Resurrectio to record a test and export it to CasperJS, but it's not always perfect.
TL;DR there's options. It depends on the specifics of the login page.