Ad Widget

Collapse

Discovery and 65536 bytes JSON size limit.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • soulhunter
    Junior Member
    • Aug 2009
    • 22

    #1

    Discovery and 65536 bytes JSON size limit.

    Greetings,

    I created a simple script for discovering DB objects, and it have been working just fine, until very recently, when I installed it on a server that has many DB objects: the discovered DB objects never showed up on Zabbix UI, and I saw nothing on the server's logs (nor agent's logs either), so, I tried to run zabbix_get :

    Code:
    zabbix_get -s SERVER_IP -k postgresql.tables.discovery
    and I saw the output was truncated, so, I decided to see if it had a particular size:

    Code:
    zabbix_get -s SERVER_IP -k postgresql.tables.discovery|wc -c
    65536
    The total size should be 82065

    So, I was wondering: is there a limit on the JSON answer size?

    I found something similar, but for proxy, on bug ZBX-4780, but it says it was resolved.

    Any ideas?

    Sincerely,

    Ildefonso Camargo
  • soulhunter
    Junior Member
    • Aug 2009
    • 22

    #2
    Sorry, forgot to add some info:

    Server version: 2.0.3
    Agent version: 2.0.3
    DB: PostgreSQL
    Arch: x86_64

    Comment

    • soulhunter
      Junior Member
      • Aug 2009
      • 22

      #3
      This seems to be a bug. I created a bug report, ZBX-5863, I'll try to take a look myself, but I'm not familiar with Zabbix soruce, so, don't expect a quick and accurate answer from me today . Any help is welcome.

      Ildefonso.

      Comment

      • Palmertree
        Senior Member
        • Sep 2005
        • 746

        #4
        Try changing the MAX_BUFFER_LEN in zabbix/include/common.h to higher number like 1048576 and then recompile.

        #define MAX_ID_LEN 21
        #define MAX_STRING_LEN 2048
        -#define MAX_BUFFER_LEN 65536
        +#define MAX_BUFFER_LEN 1048576
        #define MAX_ZBX_HOSTNAME_LEN 64

        Comment

        • soulhunter
          Junior Member
          • Aug 2009
          • 22

          #5
          Originally posted by Palmertree
          Try changing the MAX_BUFFER_LEN in zabbix/include/common.h to higher number like 1048576 and then recompile.

          #define MAX_ID_LEN 21
          #define MAX_STRING_LEN 2048
          -#define MAX_BUFFER_LEN 65536
          +#define MAX_BUFFER_LEN 1048576
          #define MAX_ZBX_HOSTNAME_LEN 64
          Right, this worked, but now I see this is an Agent issue, I tried first at server side: no dice, so, tried recompiling the agent: it worked!, so, I rolled-back server to the unpatched version: it still works, thus: server issue.

          Thanks!

          Comment

          Working...