Upgrading Zabbix agent2 from version 5.0.* to 6.4.5 one broke works of the 'SSH Root login disabled' item from 'Template OS Linux'

XMLWordPrintable

    • Type: Problem report
    • Resolution: Commercial support required
    • Priority: Trivial
    • None
    • Affects Version/s: 6.4.5
    • Component/s: Agent (G)

      Steps to reproduce:

      1. We use a combination of Zabbix server version 6.0.10 and Zabbix agent2 version 5.0.36 everywhere on the Linux hosts.
        After adding hosts with agent2 version 6.4.5, we found a change in the work of the 'SSH Root login disabled' item from the default 'Template OS Linux' template.
      2. Despite the fact that everywhere in the configuration file /ets/ssh/sshd_config the PermitRootLogin directive has a 'no' value, immediately after updating agent2 to version 6.4.5, the trigger of the mentioned item fires.
      3. The key of that item looks the following:
      vfs.file.regmatch[/etc/ssh/sshd_config,^PermitRootLogin.*no$]

      Expected:
      As far in the configuration file /ets/ssh/sshd_config the PermitRootLogin directive has a 'no' value, test this item on the host with Zabbix agent2 version 5.0.36 has got a value '1'

      Result:
      If we add this template to the host with Zabbix agent2 version 6.4.5 then with other parameters unchanged item has got the value '0' which causes the trigger to fire.

      Quick fix steps:

      Investigation of the problem showed that the Zabbix agent2 incorrectly transmits the lines of the file checked and the vfs.file.regmatch item key doesn't find the string described in the pattern ^PermitRootLogin.*no$ 
      But if the trailing special character "$" was removed the string will find and the item returns the correct value "1" 

            Assignee:
            Maksym Buz
            Reporter:
            Volodymyr Serhiienko
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: