Sample Header Ad - 728x90

Zabbix ssh check doesn't show the output of the test script

0 votes
0 answers
127 views
I've created an ssh check item for my host il06.example.com in Zabbix. Exported to yaml it is
zabbix_export:
  version: '6.4'
  host_groups:
    - uuid: cfe19b0ae08444358fbe515d88fd6095
      name: 'Linux hosts'
  hosts:
    - host: il06.example.com
      name: il06.example.com
      templates:
        - name: 'ICMP Ping'
        - name: 'Linux by Zabbix agent active'
      groups:
        - name: 'Linux hosts'
      interfaces:
        - ip: 10.19.96.122
          dns: il06.example.com
          interface_ref: if1
      items:
        - name: 'ssh check'
          type: SSH
          key: 'ssh.run[''ssh check'']'
          delay: 15m
          history: 30d
          value_type: TEXT
          params: /bin/hostname
          authtype: PUBLIC_KEY
          username: zabbix
          publickey: id_ed25519.pub
          privatekey: id_ed25519
          interface_ref: if1
      inventory_mode: DISABLED
This item has been configured according to the documentation https://www.zabbix.com/documentation/6.4/en/manual/config/items/itemtypes/ssh_checks . Actually it seems to work, except that the output of /bin/hostname is lost. It doesn't show up in the item history, and Zabbix' built in test doesn't show the hostname either. If I login as user "zabbix" on the server and try "ssh il06 /bin/hostname", it returns "il06.example.com", of course. Zabbix server and agent are running on Debian 12, using the most recent Debian packages for Zabbix 6.4 found on https://www.zabbix.com/download . libssh on the server is Debian's version 0.10.6. Openssh on the peer is version 9.7. Did I miss something here? Every helpful hint is highly appreciated. PS: Of course I checked Zabbix' bug tracker for similar problems. The Zabbix server log doesn't indicate any problems. either. I also tried to cut off the newline using "echo -n /bin/hostname"
Asked by Harri (23 rep)
Jul 28, 2024, 04:55 PM
Last activity: Jul 28, 2024, 09:08 PM