Change 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 a complete cloning of the “Template App SSH Service” template so that it does not change it and in the new cloned template we already change the key in the data element:

net.tcp.service[ssh]

to (where 500 is the SSH port number):

net.tcp.service[ssh,,500]

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,,500]'

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

proc.num[sshd]

Monitoring DNS from Zabbix

To monitor the DNS service itself on the port, you can use the following key in the data items (where SERVER is the IP address or DNS server domain):

net.tcp.dns[SERVER]

In order not to create a template from scratch, you can clone eg the standard “Template App SSH Service” by changing the name in it and specifying a new key, the trigger will change automatically. And also in the “Type” we select “Zabbix agent” instead of a simple check.

The next command can be checked from the Linux command line:

zabbix_get -s127.0.0.1 -k'net.tcp.dns[SERVER]'

Naturally, if the answer is 1, the DNS service is started, 0 is not.

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

proc.num[nemed]

See also my article:
Monitoring Bind9 in Zabbix

Where is auto startup folder in Windows 10?

It took today on Windows 10 to add a shortcut to the program in startup, started looking in the menu, but there is no it.

Therefore, I will describe a couple of options where to find this folder “Startup”.

Option 1) The folder for each user is located separately, for example, in my case (user admin), the path to it is:

C:\Users\admin\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

admin can be replaced with the correct user name and paste this path into the address bar of the explorer. The AppData folder is hidden, so if you open folders one by one, you will have to type it manually in the address bar of the explorer.

Option 2) Open the line “Run” in the menu or by pressing Win+R and type:

shell:startup

In this case, the “Startup” folder of the current user will be displayed.
To open the shared folder “Startup” which is valid for all users, type:

shell:common startup

To remove something from the startup, you do not have to delete the shortcut from the Startup folder, you can open the Task Manager with the shortcut Ctrl+Shift+Esc and the “Startup” right-click the desired object and select “Disable“. In this tab, you can also disable objects that are added to the startup registry.

Done.

The solution to the error “ImportError: No module named ldap”

Installed iRedMail on Ubuntu Server in February 2016 and noticed an error when trying to send a message via Roundcube:

SMTP error (451): Unable to add recipient “Email” (4.3.5 Server configuration problem)

I checked if iredapd is running:

telnet localhost 7777

It turned out that it was not running because the response from telnet was displayed:

Unable to connect to remote host: Connection refused

Tried to run:

sudo /etc/init.d/iredapd start

To which he received the answer:

ImportError: No module named ldap

I installed the module with the command:

sudo apt-get install python-ldap

Execute the commands:

sudo -i
cd /opt/iredapd/
find . -name '*pyc' | xargs rm -f {}

Now restart the service:

sudo service iredapd restart

Done, there is no error.