How can show an item is down in grafana while my datasource is zabbix

I am using zabbix as datasource for grafana . Also I have added some template on that for example it can show my java service is up or down . according to uptime for example if it could not get new data show java is down how can implement it on grafana . For example while show java is down in zabbix also it shows down in grafana

Yes, this can be implemented directly using Zabbix triggers and Grafana’s Zabbix datasource.
The recommended approach is to let Zabbix be the source of truth and have Grafana display the trigger state.
Create a Zabbix trigger that detects when the Java service is down, for example:

last(/host/java.service.status)=0

If you also want the service to be considered DOWN when no new data is received, create an additional trigger:

nodata(/host/java.service.status,5m)=1

In Grafana, create a Stat panel using the Zabbix datasource.

Set Query Type = Triggers and select the host and trigger.

Add value mappings:

OK       → UP (green)
PROBLEM  → DOWN (red)

With this setup, whenever Zabbix changes the trigger state to PROBLEM (either because the Java service is down or because no data has been received for the configured period), Grafana automatically shows DOWN. When the trigger returns to OK, Grafana automatically shows UP.

I validated the same workflow by monitoring a test service with a Zabbix TCP service check, creating a trigger for service availability, and displaying the trigger state in a Grafana Stat panel. The behavior was:

when service was up

when service was down

Service UP    → Zabbix OK       → Grafana UP
Service DOWN  → Zabbix PROBLEM  → Grafana DOWN

No manual synchronization is required → Grafana simply reflects the trigger status reported by Zabbix.

Hi @babsdn,just want to know did this solution worked for you? Happy to help further if you’re still facing any issues.