This patch has side-effects that I have not seen during my tests. It works only for text-base triggers. SO PLEASE DO NOT USE IT.
Sorry for that.
----
Original post:
I created an item "Status of service ssh" with key "svc.status[ssh]" (agent-based,Solaris 10 SMF), which returns a string like "online" or "disabled". The corresponding trigger "Status of service ssh changed on server {HOSTNAME}" with expression "{Solaris_t:svc.status[ssh].diff(0)}>0" was always "UNKNOWN", because the item->lastvalue got never updated.
This tiny patch changes the update_item in src/zabbix_server/functions.c, so the item has a chance to get updated.
I attach the patch file.
Kind regards,
Joerg
Sorry for that.
----
Original post:
I created an item "Status of service ssh" with key "svc.status[ssh]" (agent-based,Solaris 10 SMF), which returns a string like "online" or "disabled". The corresponding trigger "Status of service ssh changed on server {HOSTNAME}" with expression "{Solaris_t:svc.status[ssh].diff(0)}>0" was always "UNKNOWN", because the item->lastvalue got never updated.
This tiny patch changes the update_item in src/zabbix_server/functions.c, so the item has a chance to get updated.
Code:
$ diff src/zabbix_server/functions.c.* 714c714 < if ((value->type & AR_TEXT) && ((item->prevvalue_null == 1) || (item->lastvalue_null == 1) || --- > if((value->type & AR_TEXT) == 0 && ((item->prevvalue_null == 1) || (item->lastvalue_null == 1) ||
Kind regards,
Joerg