From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

SystemLink Forum

cancel
Showing results for 
Search instead for 
Did you mean: 

Better Alarm Links?

Solved!
Go to solution

Anyone know of a better <alarm_link> alternative? Sending technicians to a JSON dump (API endpoint) of the alarm data is not helpful. Sending myself to a JSON API isn't very useful either.

 

Is it possible to instead generate a link to the tag's history? Ultimately I'd like to generate arbitrary links built out of tag properties once I write my own plugins for SystemLink but tag history would be a much better initial start than an API endpoint.

 

I've tried https://host_name/#tagviewer/tag/<channel> and <path> but they don't work and I've seen in other posts where 18.5 was planning to be able to use the tag path but I haven't seen any updates about that either (I'm on 19). The alarms/notification documentation could do with some updating since only 3 example substitutions are listed.

0 Kudos
Message 1 of 7
(3,007 Views)

Right now, the special parameters that we have are documented here. Other than the special parameters, you can also use properties as parameters and their values will be added. This is a way that you can add or build the URL for the tag that triggered the alarm, however, as it currently stands, it will require some configuration of the tags to enable the behavior you are wanting. 

 

For instance, you can add a property on a tag called TagURL which could store the URL for that particular tag, and then use the '<TagURL>' parameter in the alarm and notification strategy to have that URL inserted into your string. 

 

We are hoping to add a couple of additional special parameters with the next version of SystemLink and we'll make sure to update the SystemLink Manual to include those special parameters there but I could see how a special parameter to store the name of the tag that triggered the alarm or the server URL that could be used to build the URL of the tag (using parameters) could be useful. Thank you for the feedback!

-----------------------------------------------
Brandon Grey
Certified LabVIEW Architect

0 Kudos
Message 2 of 7
(2,984 Views)

I did come to that conclusion and tested making a custom property. For my use case nearly all tags will be getting programmatically created so not a big deal to put the tag path as a property too.

0 Kudos
Message 3 of 7
(2,980 Views)

That doesn't document all existing parameters. Creating a new email template has additional items like alarm_name, alarm_occurred_at, and alarm_severity.

 

Are these and other possible items listed anywhere?

0 Kudos
Message 4 of 7
(2,977 Views)
Solution
Accepted by topic author DerrickB

I was actually getting ready to post about that. The parameter 'server_url' actually does already exist in SystemLink 19.0 and can be used to instead build the URL for the tag history, but in this case, you would need a property that stored the tag name (path). To build the tag URL you would just put '<server_url>'/#tagviewer/tag/<tagName>'. This is probably better than storing a static URL in a property.

 

Unfortunately, those other tags that you included aren't documented yet but let me see if I can put together a list of the ones that aren't currently documented. I don't think there are many more than what you called out but I'll look into it. Those tags should be documented in the manual for the next version of SystemLink.

-----------------------------------------------
Brandon Grey
Certified LabVIEW Architect

0 Kudos
Message 5 of 7
(2,974 Views)

server_url is super useful, thanks. Tested it out and it includes the trailing slash, so for anyone else that might be following along I've got it setup as:

 

<server_url>#tagviewer/tag/<tagPath> with tagPath being a property I've setup myself that's a copy of the Path field.

0 Kudos
Message 6 of 7
(2,957 Views)

The other special parameters that can be used are below:

  • <alarm_link>
    • Link to the alarm triggered.
  • <alarm_name>
    • Display name of the alarm triggered.
  • <alarm_occurred_at>
    • Time at which the alarm was triggered.
  • <alarm_severity>
    • The severity level of the alarm.
-----------------------------------------------
Brandon Grey
Certified LabVIEW Architect

0 Kudos
Message 7 of 7
(2,947 Views)