I made a simple Zabbix Agent item directly on a host to check if a process is running:
I also added the {$TOMCAT_REGEX} macro to the host, of course: ^/usr/bin/java -Djava.util.logging.config.file=/app/tomcat/tomcat-
Then I made a value mapping. If it equals 2 => Up, and if it is less than two => Down.
When I test the item, the result shows 2 (and correctly mapped to Up).
So I saved it and checked Latest Data for the host, which is updated correctly every minute, and it just shows 0 (Down).
I also tried "hardcoding" the value into the key, and removing the value mapping, but got the same result.
What am I doing wrong?
Code:
proc.num[,root,,{$TOMCAT_REGEX}]
Then I made a value mapping. If it equals 2 => Up, and if it is less than two => Down.
When I test the item, the result shows 2 (and correctly mapped to Up).
So I saved it and checked Latest Data for the host, which is updated correctly every minute, and it just shows 0 (Down).
I also tried "hardcoding" the value into the key, and removing the value mapping, but got the same result.
What am I doing wrong?