Ad Widget

Collapse

Problems with Custom Discovery Template

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • clahti
    Senior Member
    • Jan 2007
    • 126

    #16
    agent log entries:

    Code:
      2072:20150324:164919.660 Run remote command [cscript //nologo c:\progra~1\zabbix~1\test.vbs] Result [135] [[{"data":[{"{#LSNAME]...
      2072:20150324:164919.660 Sending back [[{"data":[{"{#LSNAME}":"VAL1","{#LSPORT}":"12345"},{"{#LSNAME}":"VAL2","{#LSPORT}":"12346"},{"{#LSNAME}":"VAL3","{#LSPORT}":"12347"}]}]]
    JSON sent passes external validation.

    Comment

    • clahti
      Senior Member
      • Jan 2007
      • 126

      #17
      upgraded agent to 2.4.4, problem persists

      Comment

      • aib
        Senior Member
        • Jan 2014
        • 1615

        #18
        Originally posted by clahti
        agent log entries:

        Code:
          2072:20150324:164919.660 Run remote command [cscript //nologo c:\progra~1\zabbix~1\test.vbs] Result [135] [[{"data":[{"{#LSNAME]...
          2072:20150324:164919.660 Sending back [[{"data":[{"{#LSNAME}":"VAL1","{#LSPORT}":"12345"},{"{#LSNAME}":"VAL2","{#LSPORT}":"12346"},{"{#LSNAME}":"VAL3","{#LSPORT}":"12347"}]}]]
        JSON sent passes external validation.
        Please, compare the standard output of agent and your script output:
        Code:
        # zabbix_get -s localhost -k vfs.fs.discovery
        {"data":[{"{#FSNAME}":"/","{#FSTYPE}":"rootfs"},{"{#FSNAME}":"/proc/sys/fs/binfmt_misc","{#FSTYPE}":"binfmt_misc"}]}
        #
        Code:
          2072:20150324:164919.660 Run remote command [cscript //nologo c:\progra~1\zabbix~1\test.vbs] Result [135] [[{"data":[{"{#LSNAME]...
          2072:20150324:164919.660 Sending back [[{"data":[{"{#LSNAME}":"VAL1","{#LSPORT}":"12345"},{"{#LSNAME}":"VAL2","{#LSPORT}":"12346"},{"{#LSNAME}":"VAL3","{#LSPORT}":"12347"}]}]]
        Output of my agent starts from {"data":[
        Output of your scripts starts from [{"data":[

        My output ends "}]}
        Your output ends "}]}]

        I think Zabbix doesn't like square bracket at start of data and in the end of data.
        Sincerely yours,
        Aleksey

        Comment

        • clahti
          Senior Member
          • Jan 2007
          • 126

          #19
          SOLVED: Problems with Custom Discovery Template

          Aib you are a god . The problem indeed was the preceding and trailing bracket. I am in Silicon Valley but we have a Richmond, VA datacenter which I visit a few times a year. If you are reasonably close I would be happy to buy you a beer or two, thanks for your help on this!

          Comment

          • aib
            Senior Member
            • Jan 2014
            • 1615

            #20
            Sorry, man.
            I'm living in cold country - no, not in Russia, but in Canada.
            It's far far away from cold beer and hot woman.

            Jk
            Sincerely yours,
            Aleksey

            Comment

            Working...