Zabbix дээр тусгайлан заасан порт тохируулах

Дусал нэвтэрхий толь-с
21:04, 21 Аравдугаар сар 2022-ий байдлаарх Almas (Яриа | оруулсан хувь нэмэр) хэрэглэгчийн хийсэн залруулга
(ялгаа) ←Хуучны засвар | Одоогийн засвар (ялгаа) | Дараагийн засвар→ (ялгаа)

Change the port in SSH, HTTP, etc. checks. in Zabbix


Suppose that SSH is working on a non-standard port, in Zabbix, the “Template App SSH Service” template checks it on a standard port and will therefore send out the message “SSH service is down on …”.

To specify which port to check for SSH, we will make complete cloning of the “Template App SSH Service” template so that it does not change it and in the new cloned template we already changed the key in the data element:

   net.tcp.service[ssh]

to (where 5000 is the SSH port number):

   net.tcp.service[ssh,,5000]

Портыг нь мөн macros хэлбэрээр оруулж болно.

And we’ll specify this new template instead of the standard one, then SSH will be scanned at the specified port. Templates are configured in the “Settings” -> “Templates” -> “Templates” group.

Similarly, the port for other services changes.

From the command line, you can check it with the following commands:

   zabbix_get -s127.0.0.1 -k'net.tcp.service[ssh]'
   zabbix_get -s127.0.0.1 -k'net.tcp.service[ssh,,5000]'

If Zabbix-agent is installed on the node, then in the field the key is better to specify:

   proc.num[sshd]

Эх сурвалж: https://ixnfo.com/en/change-port-in-ssh-http-etc-checks-in-zabbix.html