[GH-ISSUE #3227] Wrong resource name in alerts #30171

Open
opened 2026-06-13 10:42:21 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @evoke0 on GitHub (Jun 7, 2026).
Original GitHub issue: https://github.com/fosrl/pangolin/issues/3227

Describe the Bug

Webhook alerts (used with a telegram bot) report an incorrect name when a resource name has been changed after its creation. I used to have StirlingPDF but then switched to BentoPDF, instead of removing the old resource, I updated it to point to Bento's IP and changed the name from one to the other, but the alert still reports it as Stirling. This should be tested with other alert actions, such as emails.

Image Image

BentoPDF was previously PDF Stirling

As an addition, the resource name should be just the name, without adding "Resource", as it kind of prevents using your own JSON text in another language.

My JSON custom body:

{
  "chat_id": 14XXX,
  "text": "⚠️ Ha cambiado el estado de un recurso\n\n📦 Recurso: {{healthCheckName}}\n❌ Estado: Caído\n🕐 Hora: {{timestamp}}"
}

Environment

  • OS Type & Version: Debian 13
  • Pangolin Version: 1.18.4
  • Edition (Community or Enterprise): Enterprise

To Reproduce

Create a resource and give it a name.
Change the name to something else.
Create a webhook alert with a Telegram bot.
Trigger the alert and check the name, it should be the first name instead of the new one.

Expected Behavior

The alert should show the new updated name instead of the old one.

Originally created by @evoke0 on GitHub (Jun 7, 2026). Original GitHub issue: https://github.com/fosrl/pangolin/issues/3227 ### Describe the Bug Webhook alerts (used with a telegram bot) report an incorrect name when a resource name has been changed after its creation. I used to have StirlingPDF but then switched to BentoPDF, instead of removing the old resource, I updated it to point to Bento's IP and changed the name from one to the other, but the alert still reports it as Stirling. This should be tested with other alert actions, such as emails. <img width="335" height="215" alt="Image" src="https://github.com/user-attachments/assets/df5edcc8-3998-4c8e-8944-02a220d2135c" /> <img width="218" height="108" alt="Image" src="https://github.com/user-attachments/assets/5766763f-622e-4995-8e7d-7bfa9d754001" /> <sub>BentoPDF was previously PDF Stirling</sub> As an addition, the resource name should be just the name, without adding "Resource", as it kind of prevents using your own JSON text in another language. My JSON custom body: ``` { "chat_id": 14XXX, "text": "⚠️ Ha cambiado el estado de un recurso\n\n📦 Recurso: {{healthCheckName}}\n❌ Estado: Caído\n🕐 Hora: {{timestamp}}" } ``` ### Environment - OS Type & Version: Debian 13 - Pangolin Version: 1.18.4 - Edition (Community or Enterprise): Enterprise ### To Reproduce Create a resource and give it a name. Change the name to something else. Create a webhook alert with a Telegram bot. Trigger the alert and check the name, it should be the first name instead of the new one. ### Expected Behavior The alert should show the new updated name instead of the old one.
Author
Owner

@evoke0 commented on GitHub (Jun 7, 2026):

Just to clarify, the alert was created after the change of name of the resource, and not before, so it shouldn't be a matter of updating the alert.

<!-- gh-comment-id:4644184323 --> @evoke0 commented on GitHub (Jun 7, 2026): Just to clarify, the alert was created after the change of name of the resource, and not before, so it shouldn't be a matter of updating the alert.
Author
Owner

@AstralDestiny commented on GitHub (Jun 8, 2026):

What's the alert webhook look like? is it using the siteID or whatnot data or hardcoded?

<!-- gh-comment-id:4645463403 --> @AstralDestiny commented on GitHub (Jun 8, 2026): What's the alert webhook look like? is it using the siteID or whatnot data or hardcoded?
Author
Owner

@evoke0 commented on GitHub (Jun 8, 2026):

It's pretty generic, just to make it work with Telegram's API.

No authentication and the only header is Content-Type: application/json, which is the bare minimum to be able to send a message using the API.

The custom JSON body is as stated in the first post.
In case you need to know how the API looks like:
https://api.telegram.org/bot<botToken>/sendMessage

Image

chat_id is used to tell the bot who to message, no siteID nor any other is used, just healthCheckName and timestamp.

<!-- gh-comment-id:4652424178 --> @evoke0 commented on GitHub (Jun 8, 2026): It's pretty generic, just to make it work with Telegram's API. No authentication and the only header is `Content-Type: application/json`, which is the bare minimum to be able to send a message using the API. The custom JSON body is as stated in the first post. In case you need to know how the API looks like: `https://api.telegram.org/bot<botToken>/sendMessage` <img width="698" height="865" alt="Image" src="https://github.com/user-attachments/assets/b848d88f-a3ba-47fe-9c4e-2e9449a39e50" /> chat_id is used to tell the bot who to message, no siteID nor any other is used, just healthCheckName and timestamp.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/pangolin#30171