Ad Widget

Collapse

system.run ... need to run a longer command

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • KarmaPolice
    Member
    • Oct 2005
    • 95

    #1

    system.run ... need to run a longer command

    I need to run a relatively long command... specifically:

    Code:
    /usr/sbin/ioscan -kC processor|grep -n processor|wc -l|awk '{print $ 1}'
    using the system.run[] parameter... i changed the database field so it would accept an item of this length, however i still am getting "Not Supported" when it tries to run...

    is there another length setting set somewhere?

    Thanks
  • SLMitch
    Member
    • May 2006
    • 39

    #2
    I have the same problem.

    The faulty one is MAX_ITEM_KEY_LEN configured to 64. I fixed it to 128, i dont know if there will have colateral damage.
    if you use mode DEBUG for the agentd, you can see command is trunked.


    Code:
    diff -ruwB zabbix-1.1-orig/include/db.h zabbix-1.1/include/db.h
    --- zabbix-1.1-orig/include/db.h        2006-06-23 10:51:07.000000000 +0200
    +++ zabbix-1.1/include/db.h     2006-06-23 10:54:09.000000000 +0200
    @@ -80,7 +80,7 @@
    
     #define        MAX_HOST_HOST_LEN       64
    
    -#define        MAX_ITEM_KEY_LEN        64
    +#define        MAX_ITEM_KEY_LEN        128
     #define        MAX_ITEM_IP_LEN         15
     #define        MAX_ITEM_SNMP_COMMUNITY_LEN     64
     #define        MAX_ITEM_SNMP_OID_LEN   255
    @@ -107,7 +107,7 @@
     #define HOST_ERROR_LEN                 128
     #define HOST_ERROR_LEN_MAX             HOST_ERROR_LEN+1
    
    -#define ITEM_KEY_LEN                   64
    +#define ITEM_KEY_LEN                   128
     #define ITEM_KEY_LEN_MAX               ITEM_KEY_LEN+1
    
     #define GRAPH_NAME_LEN                 128

    Comment

    • KarmaPolice
      Member
      • Oct 2005
      • 95

      #3
      i assume i need to re-compile then?

      and do i just need to re-compile the server? or the agent? or both?
      Last edited by KarmaPolice; 29-06-2006, 01:39.

      Comment

      • KarmaPolice
        Member
        • Oct 2005
        • 95

        #4
        and one more question... is there a similar field controlling the length of a return value (in this case a textual one)...

        I changed the DB field to LONGTEXT but it still seems to be chopping off before the end of the output... i'm guessing there is a similar variable hidden somewhere though that i could change...

        Thanks!!!!

        Comment

        • KarmaPolice
          Member
          • Oct 2005
          • 95

          #5
          Originally posted by SLMitch
          I have the same problem.

          The faulty one is MAX_ITEM_KEY_LEN configured to 64. I fixed it to 128, i dont know if there will have colateral damage.
          if you use mode DEBUG for the agentd, you can see command is trunked.


          Code:
          diff -ruwB zabbix-1.1-orig/include/db.h zabbix-1.1/include/db.h
          --- zabbix-1.1-orig/include/db.h        2006-06-23 10:51:07.000000000 +0200
          +++ zabbix-1.1/include/db.h     2006-06-23 10:54:09.000000000 +0200
          @@ -80,7 +80,7 @@
          
           #define        MAX_HOST_HOST_LEN       64
          
          -#define        MAX_ITEM_KEY_LEN        64
          +#define        MAX_ITEM_KEY_LEN        128
           #define        MAX_ITEM_IP_LEN         15
           #define        MAX_ITEM_SNMP_COMMUNITY_LEN     64
           #define        MAX_ITEM_SNMP_OID_LEN   255
          @@ -107,7 +107,7 @@
           #define HOST_ERROR_LEN                 128
           #define HOST_ERROR_LEN_MAX             HOST_ERROR_LEN+1
          
          -#define ITEM_KEY_LEN                   64
          +#define ITEM_KEY_LEN                   128
           #define ITEM_KEY_LEN_MAX               ITEM_KEY_LEN+1
          
           #define GRAPH_NAME_LEN                 128

          did that actually fix it for you? it doesn't seem to have fixed it on my end

          Comment

          • KarmaPolice
            Member
            • Oct 2005
            • 95

            #6
            bump for some help?

            Comment

            • SLMitch
              Member
              • May 2006
              • 39

              #7
              With my patch, i have not problem. You have to recompil agent

              Comment

              Working...