Ad Widget

Collapse

Remote command truncated to 244 characters - v. 1.6.2

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • luissma
    Junior Member
    • Jul 2008
    • 16

    #1

    Remote command truncated to 244 characters - v. 1.6.2

    When running a remote command from an action it is truncated on the agent side to 244 characters.

    Seen that OPERATIONS.LONGDATA is VARCHAR2(2048), where the command is stored, but it produces an error when running commands longer than 244 characters.


    Example:

    1.- Working command:

    Remote command:

    {HOSTNAME}: /usr/local/sbin/zabbix_sender -z <zabbix_server> -p 10051 -s {HOSTNAME} -k <trapper> -o "Short text `<command_that_produces_an_output>`"


    zabbix_agentd.log:

    3081:20091008:133401 Requested [system.run[/usr/local/sbin/zabbix_sender -z <zabbix_server> -p 10051 -s {HOSTNAME} -k <trapper> -o "Short text `<command_that_produces_an_output>`",nowait]]

    3081:20091008:133401 Run command '/usr/local/sbin/zabbix_sender -z <zabbix_server> -p 10051 -s {HOSTNAME} -k <trapper> -o "Short text `<command_that_produces_an_output>`"'

    3081:20091008:133401 Sending back [1]




    2.- Non-working command:

    Remote command:

    {HOSTNAME}: /usr/local/sbin/zabbix_sender -z <zabbix_server> -p 10051 -s {HOSTNAME} -k <trapper> -o "Very long text inserted to exceed 244 characters `<command_that_produces_an_output>`"


    zabbix_agentd.log:

    3083:20091008:133514 Requested [system.run[/usr/local/sbin/zabbix_sender -z <zabbix_server> -p 10051 -s {HOSTNAME} -k <trapper> -o "Very long text inserted to exceed 244 characters `<command_that_produces_an_o]
    3083:20091008:133514 Sending back [ZBX_NOTSUPPORTED]



    Found that DB field ITEMS.KEY_ is limited to 255 characters. Extended to 1024 to leave enough room for commands and changed ITEM_KEY_LEN in zabbix-1.6.2/include/db.h from 255 to 1024

    #define ITEM_KEY_LEN 1024

    Characters from 244 to 255 may be used for control or similar?
  • richlv
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2005
    • 3112

    #2
    please report this on the tracker, thanks
    Zabbix 3.0 Network Monitoring book

    Comment

    • luissma
      Junior Member
      • Jul 2008
      • 16

      #3
      How (where) can I do that?

      Comment

      • richlv
        Senior Member
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Oct 2005
        • 3112

        #4
        register at https://support.zabbix.com and report it there
        Zabbix 3.0 Network Monitoring book

        Comment

        Working...