TwiN / gatus

⛑ Automated developer-oriented status page

Home Page:https://gatus.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Line Notify request

tarocjsu opened this issue · comments

Describe the feature request

Hope the alert feature can be support Line Notify:
https://notify-bot.line.me/
https://notify-api.line.me/api/notify

Send notify:
curl -H "Authorization: Bearer Access_Token" -d "message=Hello World" https://notify-api.line.me/api/notify

Why do you personally want this feature to be implemented?

In Asia, such like Taiwan, Japan, most people use Line very offen, personal or company.

How long have you been using this project?

I am just found this project on YouTube, and very like this project.

Additional information

I already use and set for discord, telegram and email no problem, but still hope can be support Line Notify.

Thanks.

Keep push....

When I use the follow setting, I got call to provider alert returned status code 400: {"status":400,"message":"message: must not be empty"},look like headers include the token work for url, but no amy message following to post....

alerting:
custom:
placeholders:
ALERT_TRIGGERED_OR_RESOLVED:
TRIGGERED: "-d message=partial_outage"
RESOLVED: "-d message=operational"
url: "https://notify-api.line.me/api/notify"
method: "POST"
headers: {
Authorization: Bearer My_Line_Notify_Token
}
body: |
{
"text": "[ALERT_TRIGGERED_OR_RESOLVED]: [ENDPOINT_GROUP] - [ENDPOINT_NAME] - [ALERT_DESCRIPTION]"
}
default-alert:
description: "Health Check Status"
send-on-resolved: true
failure-threshold: 1
success-threshold: 1

commented

Could you format your yaml properly?

Try wrapping your configuration using ```

But at a glance, your problem likely has to do with the body you're passing. It seems like their API accepts form data, but you're trying to use json.

To test it, try setting the body to message=hello

Got status code 400: {"status":400,"message":"message: must not be empty"}

I already try the following settings:

alerting:
custom:
url: "https://notify-api.line.me/api/notify"
method: "POST"
headers: {
Authorization: Bearer My_Line_Notigy_Token
}
# body: |
# {
# "text": "[ALERT_TRIGGERED_OR_RESOLVED]: [ENDPOINT_GROUP] - [ENDPOINT_NAME] - [ALERT_DESCRIPTION]"
# }
body: |
message=hello
default-alert:
description: "Health Check Status"
send-on-resolved: true
failure-threshold: 1
success-threshold: 1

or

alerting:
custom:
url: "https://notify-api.line.me/api/notify"
method: "POST"
headers: {
Authorization: Bearer My_Line_Notigy_Token
}
# body: |
# {
# "text": "[ALERT_TRIGGERED_OR_RESOLVED]: [ENDPOINT_GROUP] - [ENDPOINT_NAME] - [ALERT_DESCRIPTION]"
# }
body: |
message="hello"
default-alert:
description: "Health Check Status"
send-on-resolved: true
failure-threshold: 1
success-threshold: 1

or

alerting:
custom:
url: "https://notify-api.line.me/api/notify"
method: "POST"
headers: {
Authorization: Bearer My_Line_Notigy_Token
}
# body: |
# {
# "text": "[ALERT_TRIGGERED_OR_RESOLVED]: [ENDPOINT_GROUP] - [ENDPOINT_NAME] - [ALERT_DESCRIPTION]"
# }
body: |
"message=hello"
default-alert:
description: "Health Check Status"
send-on-resolved: true
failure-threshold: 1
success-threshold: 1

or

alerting:
custom:
url: "https://notify-api.line.me/api/notify"
method: "POST"
headers: {
Authorization: Bearer My_Line_Notigy_Token
}
body: |
{
"text": "[ALERT_TRIGGERED_OR_RESOLVED]: [ENDPOINT_GROUP] - [ENDPOINT_NAME] - [ALERT_DESCRIPTION]"
"message=hello"
message=hello
message="hello"
}
default-alert:
description: "Health Check Status"
send-on-resolved: true
failure-threshold: 1
success-threshold: 1

Back to keep use Uptime Kuma, because Uptime Kuma direct support Line Notify, and easy to setting.

Give up Gatus for Line Notify setting.

commented

Again, if you want help, please format your configuration. It's unreadable.

You probably have to set the header Content-Type: application/x-www-form-urlencoded

And you're free to use any project you want.