Mustache in label Performance line tile

I want to adjust the label within the Performance Line Graph. Our server contains two network adapters:

ens192 = Management Network Adapter

ens224 = Non-Management Network Adapter

Is use this for the label template but I can’t get the job done:

{{#if key.instance = ‘ens192’ }}[Management Network Adapter] {{else}}[Non Management Adapter]{{/if}}

I have tried several combinations but it won’t work and also my dashboard gets ‘stuck’ (won’t respond anymore…).

What am I doing wrong?



1 Like

Hi John,

I’m not a JavaScript expert, but I believe the following should work.

To directly answer your question:

{{#if (key.instance == 'ens192')}} Management Network Adapter {{else}} Non Management Adapter {{/if}}

This is not exactly what you are after, but it does demonstrate some of the other options available:

{{#if (key.instance == 'ens192')}} Management Network Adapter {{elseif (key.instance == 'ens224')}} Non Management Adapter {{else}} {{key.instance}} {{/if}}