Monitoring of processes and ports can be monitored using Zabbix's own key, which is only maintained on the server side, which is simpler than the way Nagios uses plugins to monitor. The following is a brief description of the configuration:
1) Monitoring port
The Zabbix monitoring port uses the following key:
Key:net.tcp.listen[port]
Checks if this port was in the LISTEN state. 0-it is isn't, 1-it is Inlisten state.
Explain:
Listen for port status, return result is 1, run; return result is 0, no run. For example, monitor the SSH port, net.tcp.listen[22].
In the example below, the SSH port is custom 22222. The monitoring items for this port need to be defined first, the monitoring items can be added to the template, or they can be defined separately on the host (the following example I am a monitoring item defined on the host)
Then add the "trigger" for the monitor item
Finally, you can view the SSH port status added above in the monitor graph of the host: 1 indicates that the port is functioning properly and 0 indicates that the port is down.
2) Program Monitoring
If a process does not have a listening port, the following key can be used.
Key:proc.num[<name>,<user>,<state>,<cmdline>]
Number of processes. <name> and <user> same as Inproc.mem item. <state> All (default), run, sleep, Zomb. <cmdline>filter by command line (supports regex).
Name: is the process name
User: Users running the process
State: Process status includes Run,sleep,zomb
CmdLine: The item is a fuzzy match, that is, the last column that you see with PS aux matches the field that is included in it.
Warm tip: Thename match may not be very accurate, generally according to CmdLine to match the process. e.g. monitoring Cond,proc.num[,root,all,crond]
Distributed Monitoring System zabbix-3.0.3-Complete installation record-add process and port monitoring