Fault Data / Fields ("Columns")


I’m working on a custom alert template. It’s working (as a start), but in the documentation there is a note about,

Faults, Only available on alert ( $alert->state != 0 ), must be iterated in a foreach ( @foreach ($alert->faults as $key => $value) @endforeach ). Holds all available information about the Fault, accessible in the format $value['Column'] , for example: $value['ifDescr'] . Special field $value['string'] has most Identification-information (IDs, Names, Descrs) as single string, this is the equivalent of the default used and must be encased in {{ }}

But … what are the available “Column” options / variables? Just not sure where to find this.


Hi @arrmo
You can use ./scripts/test-alert.php and ./scripts/test-template.php to see the available variables, and validate that the template/alert-rule do what you expect them to do.

Excellent, thanks! That reminds me of another question … :smile:. Is there a way to simulate an alarm (through the test scripts), in order to exercise the transports? I can of course change the Health settings, then run polling, but that’s a bit slow / painful.

Thanks again.

the test-alert.php command above allows it indeed, even if it can’t be as accurate as a real alert, it will allow you to test the alerting process.

Thanks! Let me dig into that command / script a bit more. I was playing with it, but it only seemed to check the alerts - not allowing me to force one to be raised (through the script). But likely me missing a command option (to make an alert happen, simulate a measurement value).

Thanks again.

OK, I’ll have to get back to this a bit later … :wink:. Updated to the latest code (git pull), now all my alerts have disappeared (even my printer ink, that has been there for a month or two). LOL!

OK, daily.sh (pulling updated code) fixed this … excellent! Can get back to this now … :smile: