# StatHat

[<mark style="color:blue;">StatHat</mark>](https://www.stathat.com/) makes detailed time series charts of all your stats. Compare multiple stats from the past hour to the past 10 years to know where your stats are headed. It will analyze all your data and create forecasts for you with estimates for the next 30 days.

Route detailed monitoring alerts from StatHat to the right users in Squadcast.

### How to integrate StatHat with Squadcast

#### In Squadcast: Using StatHat as an Alert Source

1. Navigate to **Services** -> **Service Overview** -> select or search for your Service. Expand the accordion -> In the Alert Sources section, click **Add**.

![](https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-4fbd74e7ca0b30173c47a1d58ed6a0804a0465aa%2FAlert_Sources.png?alt=media\&token=aaca6610-9d18-4dd4-9cf5-320042f326f1)

2\. Select **StatHat.** Copy the displayed **Webhook URL** to [configure](#in-stathat-create-a-squadcast-webhook) it within **StatHat.** Finish by clicking **Add Alert Source** -> **Done.**

![](https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-1ba21adea20b4f48439cc6d5f7fa5dab821517e6%2FStatHat.png?alt=media\&token=6bee2485-da47-4189-8cff-eeae9ec47421)

{% hint style="warning" %}
**Important:**

When an alert source turns Active, it’ll show up under Configured Alert Sources, you can either generate a test alert from the integration or wait for a real-time alert to be generated by the Alert Source. An Alert Source is active if there is a recorded incident via that Alert Source for the Service.
{% endhint %}

#### In StatHat: Create a Squadcast Webhook

**(1)** In the app, navigate to **Settings**

![](https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-e594a65ff371b11112455ffbb862ee5223c4e5a4%2Fstathat_2.png?alt=media\&token=968bfb23-baf6-461b-a169-c75ddea4bacf)

**(2)** Click on **Manage Alert Destinations** to add the Webhook

![](https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-281ea3f90cc252b3b325aa6fee9101cb54dfe433%2Fstathat_4.png?alt=media\&token=1bc103fc-c35e-4c7a-a08d-f29ba04074b5)

**(3)** Under **Webhooks**, give it a meaningful *Name* and paste the copied Webhook *URL* from Squadcast and click on **Add**

![](https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-ccf62ec4377d0ad7a03bf328059e1c426c1f2c9f%2Fstathat_3.png?alt=media\&token=3214cf14-6ffc-4de5-8828-04d132810de7)

**(4)** Now, navigate back to **Settings**. You can enable *Squadcast Webhook* to be triggered for *Automatic Alerts* and *Manual Alerts* on a global level.

![](https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-de3b13c5ec693e6d37604303fac38178df0296ca%2Fstathat_5.png?alt=media\&token=8e288db9-b7f7-4f94-96ea-d97b9d42a8d0)

Or, you can specify within each of your **Alerts** to trigger *Squadcast Webhook* in case of an anomaly.

![](https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-6b1c45256f7a82fafa160b7cfe542dad96809411%2Fstathat_6.png?alt=media\&token=88878448-98ad-4f4c-a298-e9bb7f3e0ba9)

That is it, you are now good to go! Whenever an alert is triggered in StatHat, an incident will be created automatically in Squadcast.

### FAQ

**Q:** If an alert gets resolved in StatHat, does StatHat send auto-resolve signals to Squadcast?

**A:** No, StatHat does not send auto-resolve signals to Squadcast. Hence, Squadcast incidents from StatHat should be resolved manually.

*Have any questions?* [*Ask the community*](https://community.squadcast.com/view/home)*.*
