It is very simple to monitor processes. Just add a new template, or use any, create an item and a respective trigger for that item. The trigger should use trigger alarm on last value !=0. We will use exit 0 as all OK, exit 1 as issue!
Then put something like this in a .conf file in zabbix_conf.d/ directory
UserParameter=processes.postfix, if pgrep smtpd >/dev/null 2>&1; then echo 0 ;else echo 1; fi
UserParameter=processes.bind9, if pgrep named >/dev/null 2>&1; then echo 0 ;else echo 1; fi
UserParameter=processes.blacklist, if ps aux | grep [b]lacklist >/dev/null 2>&1; then echo 0 ;else echo 1; fi
No comments:
Post a Comment