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.

Turning test mode on and off in Windows 7

Sometimes I had to put unsigned drivers to flash different junk, so I included a test mode in which the installation of unsigned drivers is allowed. If the test mode is disabled, the drivers will stop working again.

You can enable the test mode in Windows 7 from the command line (cmd) or from the “Run” line which is opened by the Win+R key combination.
In any of the lines, you need to run the following command to enable the test mode:

bcdedit.exe -set TESTSIGNING ON

To turn off:

bcdedit.exe -set TESTSIGNING OFF

After each command, you must restart the computer.
When the test mode is enabled, the “Test mode” and the version of the Windows assembly are displayed on the desktop in the lower right corner.

The solution to the warning “Lack of Free Swap Space on Zabbix Server”

Put somehow on a new Linux server Zabbix and immediately began to display the following warning:

Lack of Free Swap Space on Zabbix Server

The warning says that there is no place in the Swap section, having seen that there is no Swap partition at all, it’s strange that when installing Ubuntu 14.04 LTS with the option to use the entire disk it was not created automatically, there was only 6 GB of RAM on the server.

On this solution of the problem in my case was the creation of the Swap partition, after which the warning disappeared.
Look another my article on this – How to create SWAP in Linux

Well, if there is a lot of RAM and it’s free basically, then Swap can make no sense, so you can simply turn off the trigger for this server creating a notification. To do this, open the Zabbix panel, go to the “Settings” tab – “Network nodes”, in front of this server, click “Triggers” and deactivate the trigger creating this warning.

Done.

The page break in the HTML document

I had to somehow make an HTML check template for a thermal printer, which after each page can make a tape break.

Since the check should have been broken into two parts, I did not touch the first part, and put the second part in the div tag with the style:

<div style="page-break-before:always;">
PAGE 2
</div>

Style “page-break-before” determines the gap in front of the page, so before the second page the tape was torn, well, and at the end of the printing process, the printer itself is breaking according to the settings of the printer. You can also specify that the gap should be executed after the page: “page-break-after” or “page-break-inside” inside the page.

I will describe the meaning:
always (always adds a page break)
auto (automatically adds a page break if it is required)
avoid (forbids page break)
left (skips one or two pages so that the next page is even when printing)
right (skips one or two pages so that the next page when printing is odd)
inherit (inherits the value)

The page break style can be specified for example in the table:

<table style="page-break-after:always">
</table>

Either in CSS:

table { page-break-after:always; }