VMware Aria

 View Only
  • 1.  Aria Operation integerate with Telegram

    Posted Aug 09, 2023 12:13 PM
      |   view attached

    Hi guys

    Does anybody have experience integrating Aria operations with Telegram?

    I created a Bot on Telegram and connected it to Aria through an outbound setting.

    After that, I created an Alert definition for data store usage above 80% . When an alarm is generated, I receive it on Telegram. Here is my Jason code for the Payload Templates :

    {
    "text": "${ALERT_DEFINITION}: Datastore: ${RESOURCE_NAME}, Datastore usage %: ${VMWARE|Datastore|capacity|usedSpacePct}"
    }

    I also want to see the Datacenter parent and hostname parent for this data store. Which parameters do I have to use to show me?

    I also attached a sample of an Alert that comes to Telegram.



  • 2.  RE: Aria Operation integerate with Telegram

    Posted Jul 19, 2024 09:38 AM

    Hi, can you post the complete configuration of Payload template and Outboound Settings and notification settings?

    TY




  • 3.  RE: Aria Operation integerate with Telegram

    Broadcom Employee
    Posted Jul 23, 2024 09:25 AM

    Hi, 

    When setting up a Webhook Payload Template, you can include details from parent and ancestor objects. Here's how you can configure the text field to incorporate these details:
     
    Select Parent/Ancestor Objects:
    In the Object Content tab of the Webhook Payload Template, choose the parent or ancestor objects you want to include. 
    Steps: 
    Add Obect Type: Datastore
    Select your prefferd Ancestors
     
    In the Payload Details section, under Parameters, you'll see the parameters corresponding to the objects you selected. These parameters include details such as parent data centers and hostnames.
     
    Use Parameters in Text:
    You can include these parameters in the text field of your payload. For example, if you want to include the parent data center and hostname in your message, you would reference these parameters directly.
     
    Example JSON Payload:
    Here's how you might structure the text field in your JSON payload to include these parameters:
     
    {
        "chat_id": "<yourChatId>",
        "text": "Parent HostName: ${VMWARE|HostSystem}, paren tDatacenterName: ${VMWARE|Datacenter}"
    }



  • 4.  RE: Aria Operation integerate with Telegram

    Posted Jul 23, 2024 10:02 AM

    Is there a way to have them in HTML format? put the label in bold and the variable in italics for example and give carriage returns, I'm trying but I can't. From the forums around, to pass the text in HTML, a "parse_mode:" "HTML" should be provided but I can't get it to take it, I put it in the payload and also in the uri but it doesn't work




  • 5.  RE: Aria Operation integerate with Telegram

    Broadcom Employee
    Posted Jul 24, 2024 02:56 AM

    Hi,

    When creating webhook payload templates and wanting to use HTML formatting, there are specific considerations to ensure that the formatting is applied correctly. Here's how you can achieve this:
    1. Set parse_mode to HTML
    2. Using HTM Formating
    Bold text: Use the <b> tag
    Italic text: Use the <i> tag
    Links: Use the <a> tag
    3. Line Breaks
    Instead of using <br>, use newline characters(\n)
    4. Avoid non-standrad HTML Tags
    Some HTML tags, like <footer> may not be supported an can cause errors

    Here is my example of payload with HTML formatting:
    {
      "chat_id": "yourChatId",
      "text": "<b>Parent HostName:</b> <i>${VMWARE|HostSystem}</i>\n<b>Parent DatacenterName:</b> <i>${VMWARE|Datacenter}</i>\n<b>Workload:</b> <i>${VMWARE|Datastore|diskspace|total|workload}%</i>\nFor more details, visit the <a href='${LINK_TO_ALERT}'>alert page</a>.\nGenerated by vRealize Operations",
      "parse_mode": "HTML"
    }




  • 6.  RE: Aria Operation integerate with Telegram

    Posted Jul 24, 2024 06:36 AM

    HI,
    thanks for the info, do you know what other tags are supported? Or do you have a link where I can read which ones I can use? To make the message more readable I would like to be able to increase the fonts, change their color and underline them.

    Best regards,

    Simone




  • 7.  RE: Aria Operation integerate with Telegram

    Posted Jul 24, 2024 07:47 AM

    Have found that:

    https://core.telegram.org/bots/api#html-style

    seems font color isnt supported... :-(




  • 8.  RE: Aria Operation integerate with Telegram

    Broadcom Employee
    Posted Jul 24, 2024 07:52 AM

    Hi,

    I'm glad the information was helpful! Regarding your question about supported HTML tags, Telegram's parse_mode: "HTML" has limited support for specific tags.

    Unfortunately, Telegram does not support changing font sizes or colors directly within messages using HTML tags. The platform focuses on keeping the message formatting simple and consistent across different clients.

    The list of supported HTML tags can be found in the Telegram Bot API documentation under the "HTML style" section.
    https://core.telegram.org/bots/api

    Best regards,
    Syuzanna