"Zabbix дээр тусгайлан заасан порт тохируулах"-ны өөр хувилбарууд

Дусал нэвтэрхий толь-с
(Хуудас үүсгэв: "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 chec...")
 
 
11-р мөр: 11-р мөр:
  
 
     net.tcp.service[ssh,,5000]
 
     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.
 
And we’ll specify this new template instead of the standard one, then SSH will be scanned at the specified port.

21:04, 21 Аравдугаар сар 2022-ий байдлаарх одоогийн засвар

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