CustomOIDs E-mail Templates

Tags: #<Tag:0x00007f3b7f7cba20>

Hi, so I am currently having a dilemma with receiving the output for the description of a customoid.
This alarm is set for our rack doors and I dont know the correct syntax to make for this alert that has customoids… trying to set an email notification that outputs the description of the door (front or rear door)
for example here are some statements i have always tried if and else and nothing worked:

Test1: Door: {{ $entity->customoid_descr }}

Test2: Door: {{ $entity[‘customoid_descr’] }}

Test3: Door: $entity[‘customoid_descr’]

Test4: #{{ $value}}: Door {{ $value[‘customoid_descr’] }}

Test5: #{{ $entity }}: Door {{ $value[‘customoids.customoid_descr’] }}

Test6: Door: {{ $entity->customoids.customoid_descr }}

Test7: Door: {{ $value[‘customoids.customoid_descr’] }}

Test8: Door: $entity[‘customoids.customoid_descr’]

and the rule has an entity of "customoids.customoid_descr "

I dont understand librenms syntax for customoids, help! lol

The one that should work:

Door: {{ $value['customoid_descr'] }}

But it must be inside the @foreach ($alert->faults as $key => $value)

What I usually do to know what info is available is a {{ var_dump($value) }}

1 Like

So I originally had the for each statement but it literally dumps EVERYTHING so I am trying to just put out statement with just the customoid description …I am certain its a type of syntax error or something

Without foreach, there is no $value.

put

@foreach ($alert->faults as $key => $value)
Door: {{ $value['customoid_descr'] }}
@endforeach

That will only print that the door description

1 Like

that worked!!! thank you!