# AWX and Insights integration

**URL:** <https://forum.ansible.com/t/awx-and-insights-integration/30313>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [May 13, 2019, 8:25am UTC](https://forum.ansible.com/t/awx-and-insights-integration/30313 "2019-05-13T08:25:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Toby](https://avatars.discourse-cdn.com/v4/letter/t/7993a0/32.png) [@Toby](https://forum.ansible.com/u/Toby)\
**Post date:** [May 13, 2019, 8:25am UTC](https://forum.ansible.com/t/awx-and-insights-integration/30313/1 "2019-05-13T08:25:41Z")

</div>

Hi all. Me again. 🙂

I have some odd behaviour after creating an Insights credential and project.

Attempting to sync. the Insights project with the Insights credential attempt to authenticate against an unexpected endpoint in the playbook output:

`

…

TASK [Fetch Insights Playbook(s)] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

fatal: [localhost,]: FAILED! =\> {“changed”: false, “msg”: "Expected **[https://example.org/r/insights/v3/maintenance?ansible=true](https://example.org/r/insights/v3/maintenance?ansible=true)** to return a status code of 200 but returned status code "404" instead with content "\n\n\n Example Domain\n\n \<meta charset="utf-8" /\>\n \<meta http-equiv="Content-type" content="text/html; charset=utf-8" /\>\n \<meta name="viewport" content="width=device-width, initial-scale=1" /\>\n \<style type="text/css"\>\n body {\n background-color: #f0f0f2;\n margin: 0;\n padding: 0;\n font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;\n \n }\n div {\n width: 600px;\n margin: 5em auto;\n padding: 50px;\n background-color: #fff;\n border-radius: 1em;\n }\n a:link, a:visited {\n color: #38488f;\n text-decoration: none;\n }\n @media (max-width: 700px) {\n body {\n background-co…

`

Why is AWX attempting to contact ` **https://example.org/r/insights/v3/maintenance?ansible=true**? `

How can I modify this?

Thanks,  
Toby.

---

<div class="post-metadata">

**Author:** ![Toby](https://avatars.discourse-cdn.com/v4/letter/t/7993a0/32.png) [@Toby](https://forum.ansible.com/u/Toby)\
**Post date:** [May 15, 2019, 9:06am UTC](https://forum.ansible.com/t/awx-and-insights-integration/30313/2 "2019-05-15T09:06:29Z")

</div>

Has anyone else successfully performed Red Hat Insights integration with AWX 4.0.0? I would love to hear from you.

Failing that, I will report an issue on GitHub for the incorrect endpoint address.

---

<div class="post-metadata">

**Author:** ![Toby](https://avatars.discourse-cdn.com/v4/letter/t/7993a0/32.png) [@Toby](https://forum.ansible.com/u/Toby)\
**Post date:** [May 17, 2019, 8:19am UTC](https://forum.ansible.com/t/awx-and-insights-integration/30313/3 "2019-05-17T08:19:10Z")

</div>

Now logged on GitHub: [https://github.com/ansible/awx/issues/3916](https://github.com/ansible/awx/issues/3916)

---

<div class="post-metadata">

**Author:** ![Uriel](https://avatars.discourse-cdn.com/v4/letter/u/53a042/32.png) [@Uriel](https://forum.ansible.com/u/Uriel)\
**Post date:** [May 17, 2019, 2:33pm UTC](https://forum.ansible.com/t/awx-and-insights-integration/30313/4 "2019-05-17T14:33:58Z")

</div>

I poked around a bit and looks like there’s a variable INSIGHTS\_URL\_BASE that defaults to [https://example.org](https://example.org). I’m not too familiar with how the default settings work but I think if you define INSIGHTS\_URL\_BASE in settings.py with your correct URL it should at least try to connect to the right place. It doesn’t look like this value is controlled by an environment variable or in the installer so you might need to customize the build.

[https://github.com/ansible/awx/blob/d9965cfe7e0f7a82fea04acb3b6b49852874f655/awx/settings/defaults.py#L936](https://github.com/ansible/awx/blob/d9965cfe7e0f7a82fea04acb3b6b49852874f655/awx/settings/defaults.py#L936)

---

<div class="post-metadata">

**Author:** ![Toby](https://avatars.discourse-cdn.com/v4/letter/t/7993a0/32.png) [@Toby](https://forum.ansible.com/u/Toby)\
**Post date:** [May 20, 2019, 12:40pm UTC](https://forum.ansible.com/t/awx-and-insights-integration/30313/5 "2019-05-20T12:40:14Z")

</div>

Thanks a lot Uriel. I will take a look at that.
