Alerting not working

Hi, I have configured a test alert and I get “no data” when testing it and I do not get email when it should trigger. Could someone help me with the configuration ?

The queries are in postgresql grafana version is 6.0, sending emails from grafana is OK.

The query is :
metric_date AS “time”,
metric_name AS metric,
FROM grafanametrics.sardata
WHERE ( metric_name=‘active/s’ or metric_name=‘passive/s’ ) and hostname=’$Server’
ORDER BY 1, 2 desc

with $Server=select distinct hostname from grafanametrics.sardata

Maybe my advice would be outdated but alerts wont work with $variables, in my situation it always triggers execution error

Your “For” duration is 24h, that means it will have to trigger continously for 24hrs before transition to an alert. Check the state history and you will likely see “Pending”

Can you show the rest of the alert settings?

i am facing same issue but on zabbix data source , i have enabled the alerting feature on zabbix configuration and i have a triggered item on the panel but still no alerting work, i get this error “could not find alert excuter on data source” any advise am dying for this.
im using V6 for grafana and v 3.4.11 zabbix