Alerts for vmware guests

I’ve googled this and I found only one result (Vmware guest alerts) but probably due to my lack of knowledge I can’t make it work.

I’ve successfully created and tested an alert to send an email if some guest VM is down:

SELECT * FROM devices,vminfo WHERE (devices.device_id = ? AND devices.device_id = vminfo.device_id) AND vminfo.vmwVmDisplayName = ‘myserver’ AND vminfo.vmwVmState = 0

But I’m unable to get the name of the vm in the email, I’ve used:

Device: {{ $value[‘vmDisplayName’] }}

as suggested in the post mentioned earlier, also Device: {{ $value[‘vmwVmDisplayName’] }}, is there any other way to get this working? What could I be doing better?

I apologize beforehand for the inconvinience, but I know nothing of HTML, I’m just copy/pasting pieces and testing until it works. I did not make the sql sentence, I used the gui, maybe someone can give me an example? I did not find a single mention to vmDisplayName anywhere in the documentation (as rough as it is, I DID read it, many many times over the past week, but for noobs like me it lacks examples or clarifications)

Thank you for your time.

I know the answer was given here: Vmware guest alerts
However, neither me or my coworkers could understand how, could someone please just give an example? Maybe the OP? Anyone?
We just need a working example to make it work.

Can you use hostname? Then itll work for vm or physical host in same template. If not needs more digging.

Extract from example in url:

The device {{ $alert->hostname }} has been up for {{ $alert->uptime }}

What I’m trying to acomplish, maybe my first post wasn’t clear enough, is to get the VM that faulted in the body of the email, for what I can see chequing the database and the mentioned post the vm name is “VmDisplayName”, and should be used in the template as @value[‘vmDisplayName’].
My problem is that clearly something else is required because just replacing “hostname” or “sysName” for “@value[‘vmDisplayName’]” just doesn’t work.
In that answer I mentioned they mention that @value[‘vmDisplayName’] should be part of the Fault array, but I have no Idea what it is, clearly because this is some language I don’t know, cause I know spanish and english and a bit of bash, so I’m way out of my depth, hence my request for asistance.
I’m sure that for someone more familiar with Librenms and that also knows whatever programing language the templates are in this must be trivial, but is next to chinese for me, so I’ll be eternally grateful to anyone that can help, maybe provide a working example of the name of a vm in a notification (sadly missing from the docs).
Thank you for your time!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.