Re: Problem using WebDetector in default-foreign-source.xml

JohnD Blackburn <[email protected]>
Newsgroups gmane.network.opennms.general
Message-ID <DB6PR0602MB2902FEC074BCE1A12032F93ACB890@DB6PR0602MB2902.eurprd06.prod.outlook.com>
Thanks,

I have changed my detector to use the HttpDetector setting maxRetCode and checkRetCode, and this seems to perform the way I'm expecting.

If I run curl against the web server that automatically redirects invalid URI's I get the following:

# curl -v http://10.165.4.4/this/is/not/a/valid/uri
* About to connect() to 10.165.4.4 port 80 (#0)
*   Trying 10.165.4.4...
* Connected to 10.165.4.4 (10.165.4.4) port 80 (#0)
> GET /this/is/not/a/valid/uri HTTP/1.1
> User-Agent: curl/7.29.0
> Host: 10.165.4.4
> Accept: */*
> 
< HTTP/1.1 302 Found
< Server: nginx
< Date: Mon, 23 Apr 2018 05:03:07 GMT
< Content-Type: text/html; charset=utf-8
< Content-Length: 97
< Connection: keep-alive
< Cache-Control: no-cache
< Location: http://10.165.4.4/users/sign_in
< Set-Cookie: _gitlab_session=a83b1eb883b5f968ac22afa84820c0c0; path=/; HttpOnly
< X-Content-Type-Options: nosniff
< X-Frame-Options: SAMEORIGIN
< X-Request-Id: 2125017f-167c-4f04-a25c-4d38b91f3412
< X-Runtime: 0.015038
< X-Xss-Protection: 1; mode=block
< 
* Connection #0 to host 10.165.4.4 left intact
<html><body>You are being <a href="http://10.165.4.4/users/sign_in">redirected</a>.</body></html>



A flag to indicate if a re-direct should be followed or not would be useful.



Regards,
John Blackburn

-----Original Message-----
From: Ronald Roskens [mailto:[email protected]] 
Sent: Friday, 20 April 2018 2:13 AM
To: General OpenNMS Discussion <[email protected]>
Subject: Re: [opennms-discuss] Problem using WebDetector in default-foreign-source.xml



The WebDetector uses the Apache http client library to interact with the remote service.

The Http(s)Detector talks the native HTTP protocol.

Looking forward to DevJam 2018… Its only 2 months away!

Ron

> On Apr 19, 2018, at 10:07 AM, Jonathan Heard <[email protected]> wrote:
>
> I'm with you on the inconsistent parameter names David..  I also don't get why we have WebDetector and HttpDetector/HttpsDetector when just one class would suffice.
>
> I personal don't really care about camel case vs underscore naming so long as it's consistent except for anything putting spaces in names - that's just bad and wrong :-D
>
>
> On 19/04/18 13:34, David Hustace wrote:
>> FYI: I do hate the inconsistency in these parameter names and I abhor camel case parameter and attribute names.  Maybe a good DevJam 2018 project for me.
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fsdm.link%2Fslashdot&data=02%7C01%7Cjohnd.blackburn%40au.abb.com%7Ca60310ba8240438f09fb08d5a6142731%7C372ee9e09ce04033a64ac07073a91ecd%7C0%7C1%7C636597527851434417&sdata=jKDOuRfoGxNqS98Ferqy7NvWr8Mm8a30v2ZM43DrjYc%3D&reserved=0
> _______________________________________________
> Please read the OpenNMS Mailing List FAQ:
> https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.opennms.org%2Findex.php%2FMailing_List_FAQ&data=02%7C01%7Cjohnd.blackburn%40au.abb.com%7Ca60310ba8240438f09fb08d5a6142731%7C372ee9e09ce04033a64ac07073a91ecd%7C0%7C1%7C636597527851434417&sdata=BSx2Er12TJGZRY7rECiKtoGJonJmKQ%2FbTlyECJ%2F8M9w%3D&reserved=0
>
> opennms-discuss mailing list
>
> To *unsubscribe* or change your subscription options, see the bottom of this page:
> https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fopennms-discuss&data=02%7C01%7Cjohnd.blackburn%40au.abb.com%7Ca60310ba8240438f09fb08d5a6142731%7C372ee9e09ce04033a64ac07073a91ecd%7C0%7C1%7C636597527851434417&sdata=yoh8bIPrpc6NRUXYyACsgOrscUp0KDLuBaI61l8fT%2B4%3D&reserved=0


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fsdm.link%2Fslashdot&data=02%7C01%7Cjohnd.blackburn%40au.abb.com%7Ca60310ba8240438f09fb08d5a6142731%7C372ee9e09ce04033a64ac07073a91ecd%7C0%7C1%7C636597527851434417&sdata=jKDOuRfoGxNqS98Ferqy7NvWr8Mm8a30v2ZM43DrjYc%3D&reserved=0
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.opennms.org%2Findex.php%2FMailing_List_FAQ&data=02%7C01%7Cjohnd.blackburn%40au.abb.com%7Ca60310ba8240438f09fb08d5a6142731%7C372ee9e09ce04033a64ac07073a91ecd%7C0%7C1%7C636597527851434417&sdata=BSx2Er12TJGZRY7rECiKtoGJonJmKQ%2FbTlyECJ%2F8M9w%3D&reserved=0

opennms-discuss mailing list

To *unsubscribe* or change your subscription options, see the bottom of this page:
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fopennms-discuss&data=02%7C01%7Cjohnd.blackburn%40au.abb.com%7Ca60310ba8240438f09fb08d5a6142731%7C372ee9e09ce04033a64ac07073a91ecd%7C0%7C1%7C636597527851434417&sdata=yoh8bIPrpc6NRUXYyACsgOrscUp0KDLuBaI61l8fT%2B4%3D&reserved=0
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ

opennms-discuss mailing list

To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-discuss
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.