Webhook Setup Guide

Panduan lengkap untuk mengintegrasikan HetrixTools dengan webhook Laravel ini

1 Webhook URL

Salin URL webhook berikut dan masukkan ke pengaturan HetrixTools Anda:

https://webhook-hetrix.h2h.my.id/webhook?token=wa-gw-infra

Penting: URL ini sudah menyertakan token autentikasi. Jangan bagikan URL ini kepada siapapun!

2 Konfigurasi di HetrixTools

  1. 1

    Login ke Dashboard HetrixTools

    Buka hetrixtools.com dan login ke akun Anda

  2. 2

    Buka Menu Monitors

    Pilih menu "Monitors" dari navigation bar

  3. 3

    Pilih Monitor

    Klik pada monitor yang ingin Anda tambahkan webhook notifikasi

  4. 4

    Edit Settings

    Klik tombol "Edit" atau "Settings" pada monitor tersebut

  5. 5

    Tambahkan Webhook

    Scroll ke section "Webhook" atau "Alert Settings"

    Paste URL webhook yang sudah Anda copy di langkah 1

  6. 6

    Pilih Notifikasi Events

    Centang event yang ingin memicu webhook:

    • Monitor goes offline (Down)
    • Monitor comes back online (Up)
  7. 7

    Save Settings

    Klik tombol "Save" untuk menyimpan konfigurasi

3 Test Webhook

Anda dapat menguji webhook dengan mengirim request menggunakan cURL atau tools lain:

POST Method (JSON)

curl -X POST "https://webhook-hetrix.h2h.my.id/webhook?token=wa-gw-infra" \
  -H "Content-Type: application/json" \
  -d '{
    "monitor_id": "123456",
    "monitor_name": "Test Monitor",
    "monitor_target": "https://example.com",
    "monitor_status": "offline"
  }'

GET Method (Query String)

curl -X GET "https://webhook-hetrix.h2h.my.id/webhook?token=wa-gw-infra&monitor_id=123456&monitor_name=Test%20Monitor&monitor_target=https://example.com&monitor_status=offline"

Tips: Setelah mengirim test request, cek halaman Webhook Logs untuk melihat hasilnya.

4 API Access (Optional)

Gunakan API untuk mengakses log secara programatik:

Get All Logs

curl -X GET "https://webhook-hetrix.h2h.my.id/api/webhook/logs" \
  -H "api: 52ffb4b4173917731a4fa59292c7c5cf"

Supports pagination: ?page=1, filtering: ?status=failed, ?monitor_status=offline

Retry Failed Webhook

curl -X POST "https://webhook-hetrix.h2h.my.id/api/webhook/logs/1/retry" \
  -H "api: 52ffb4b4173917731a4fa59292c7c5cf"

Replace 1 with actual log ID

Quick Info

Webhook Token
wa-gw-infra
API Key
52ffb4b4173917731a4fa59292c7c5cf
Supported Methods
POST GET
WhatsApp Notification
Enabled

Required Parameters

  • token

    Authentication token (query param or header)

  • monitor_id

    Unique identifier for monitor

  • monitor_name

    Name of the monitor

  • monitor_target

    URL being monitored

  • monitor_status

    Status: "online" or "offline"

Need Help?

Jika mengalami masalah dengan integrasi webhook, cek halaman logs untuk troubleshooting.

View Logs