Open for Voting

"Insert Variables" in Custom HTML Resources in Views

The ability to "insert variables" using a button to should all available into custom html resources, would make these resources a little more dynamic and even focused on the Node being viewed.

For Example:

<iframe src="http://$‌{N=SwisEntity;M=Application.Node.IP_Address}/UPS/ups_alar.htm" width="430" height="300"></iframe>

${N=SwisEntity;M=Application.Node.IP_Address}  would parse dynamically into the IP address of the Node in the view. In this instance it would show a page on the UPS that lists events logged locally.


This could be used to also create some custom HTML resource based on Universal Poller values, that don't currently fit into existing built-in views.  Some more options for Custom HTML could be added to complement this feature. over all it would eliminate creating individual views for each device where this could be implemented.


This feature could lead to some highly dynamic and customizable views, that could further the community involvement in future NPM developments.



  • Much thanks to @wluther Expert !!! Working great now! Just moved it over to the Node Details page as you suggested.

    This is a great help for our NOC emoticons_happy.png They are processing several hundred messages a day and it is impossible to correlate events via programming due to the amount of machines they are monitoring, the resources available on

    the monitoring team, and the number of changes going on in the network. So basically the NOC makes the decisions on which events require a ticket and which ones are caused by a known change, power outage etc and can simply be acknowledged.

    The ability to remove the manual process of making tickets will save them a huge amount of time. 

    Here are the parameters I needed to make a ticket in Service Desk Mail Eater:

    %GROUP=_Group    *This is a custom property

    %CATEGORY=Autogen.Noc   *Fixed Field

    %URGENCY=2-Care/Essential Job Function Impacted       *Fixed Field

    %IMPACT=2-Not service-wide outage; Group of users impacted        *Fixed Field

    %SUMMARY=_Summary      *This is a custom property which is populated by an alert action

    %DESCRIPTION=_Description    *This is a custom property which is populated by an alert action

    Here is the code as it ended up:

    <HTML>

    <HEAD>

    <TITLE>UPS Instructions</TITLE>

    </HEAD>

    <BODY BGCOLOR="FFFFFF">

    <CENTER><IMG SRC="https://solarwinds/orion/images/Solarwinds.logo.gif" ALIGN="BOTTOM"> </CENTER>

    <HR>

    <a href="https://solarwinds/docs/index.pdf">Alert Instructions</a>

    Link to instructions for this alert:

    <H1>NOC Instructions</H1>

    <a href="mailto:MailEater@MyCompany.org?subject=Create new Incident from Solarwinds&body=%GROUP=${_Group}%0D%0A%25CATEGORY=Autogen.Noc%0D%0A%25URGENCY=2-Care/Essential Job Function Impacted%0D%0A%25IMPACT=2-Not service-wide outage; Group of users impacted%0D%0A%25SUMMARY=${_Summary}%0D%0A%25DESCRIPTION=${_Description}">Make Ticket</a>

    <HR>

    </BODY>

    </HTML>

    Here's what the email ends up like using the custom properties:

    pastedImage_1.png

  • bobmarley​ I think it has something to do with the variables you are calling, and where you are calling them from... If you copy paste you HTML to the Node Details page, it will work. Perhaps pull the variables from the alert point of view?

    pastedImage_0.png

    In regards to your "CustomProperties._TicketInfo" variable, try dropping everything except the "_TicketInfo".

    Let me know if that works, or appears to work any better. Hopefully we can get that working for you.

    -Thank you,

    -Will

  • Thanks for the reply wluther Expert

    I'm trying to add a Custom HTML resource on the Active Alert Detail page so that our NOC can review the instructions for an alert and then create a ticket by sending an email

    to our 'MailEater' program in Service Desk.

    pastedImage_0.png

    The 'MailEater' program parses out specific info contained within the Body of the email and uses that info to create a ticket.

    I have created Node Custom Properties for mail eater to use. What I need to know is how to get them to resolve into my HTML code.

    When the NOC clicks Make Ticket, I need to fill in the required fields.

    Here is what the email looks like with my code:

    pastedImage_1.png

    ${N=SwisEntity;M=CustomProperties._TicketInfo} is the one I'm really trying to focus on.

    If I could get the variables to resolve I could get this to work emoticons_happy.png

    The code I am using is this:

    <HTML>

    <HEAD>

    <TITLE>UPS Instructions</TITLE>

    </HEAD>

    <BODY BGCOLOR="FFFFFF">

    <CENTER><IMG SRC="https://solarwinds/orion/images/Solarwinds.logo.gif" ALIGN="BOTTOM"> </CENTER>

    <HR>

    <a href="https://solarwinds/docs/index.pdf">Alert Instructions</a>

    Link to instructions for this alert:

    <H1>NOC Instructions</H1>

    <a href="mailto:MailEater@MyCompany.org?subject=AutoTicket Creation&body=${IP_Address}%0D${N=SwisEntity;M=CustomProperties._TicketInfo}%0D${Caption}">Make Ticket</a>

    <HR>

    </BODY>

    </HTML>

    So basically I'm just trying to allow the NOC to create a ticket by pressing a button and passing the needed info along for it.

    There's probably a different approach?

    If anyone has done this before and have any suggestions on how to do it they would be greatly appreciated!

  • bobmarley​ This should have been working for a while. The screenshot below is just made up of a bunch of ${variableName} stuff...

    pastedImage_0.png

    EX:

    <tr>

    <tr style="background-color: #E3DEDE;" align="center">

      <td>Node:</td>

      <td>${Caption}</td>

    </tr>

    <tr>

    <tr style="background-color: #E3DEDE;" align="center">

      <td>IP Address:</td>

      <td>${IP_Address}</td>

    </tr>



  • I'm able to get links working for custom variables within a View using 'Custom HTML' however it doesn't parse them in Web reports for some reason.

  • I agree, that would be a very nice addition.  Even making it similar to how the edit option for other resource would be nice, or allowing you to choose the tables that are relevant.  Many times, I find it confusing as the type of view you are in (summary, node details, application details) will impact how you reference the various tables and values within them. 

  • Yeah that worked for my example. what other variables do we have access to in CustomHTML resources? maybe this feature just needs to make it easier to insert variables as needed.

  • Just tested this successfully using the Custom HTML.  <iframe src="http://${IP_Address}" width=800 height=500 frameborder=0></iframe>  IP_Address is the polling IP of the node though, so I'm not sure if that would work. in the context you want.

  • Yeah I read comments that sounded like it should be working. There must have been some code changes that took this customization away from use, just like it broke a number of my alerts that relied on the old variables like location and URL. Not fun updating alerts.

    Would really like to see this feature come back, not sure why it went away.