Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-16147

Discovery with External Script in Zabbix - doesn't work.

    Details

    • Type: Problem report
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.0.7
    • Fix Version/s: None
    • Component/s: Server (S)
    • Labels:
      None
    • Environment:
      CentOS 7

      Description

      Steps to reproduce:

      1. Shell script outputs correct JSON data.
      2. Script execution takes 5-6 seconds, it showed Timeout at first, then I changed in zabbix_server.conf Timeout to 28.

      This is the output JSON from script:

       

       
      {"data":[
      {"{#VOLNAME}":"NFS_demo_root","{#VSERVER}":"NFS_demo","{#SNMPINDEX}":"1034"},
      {"{#VOLNAME}":"VMware_AFF","{#VSERVER}":"NFS_demo","{#SNMPINDEX}":"1038"},
      {"{#VOLNAME}":"FC_demo_root","{#VSERVER}":"FC_demo","{#SNMPINDEX}":"1040"},
      {"{#VOLNAME}":"FC_Windown_boot_lun","{#VSERVER}":"FC_demo","{#SNMPINDEX}":"1042"},
      {"{#VOLNAME}":"SQL_DB","{#VSERVER}":"NFS_demo","{#SNMPINDEX}":"1102"},
      {"{#VOLNAME}":"SQL_LOG","{#VSERVER}":"NFS_demo","{#SNMPINDEX}":"1104"},
      {"{#VOLNAME}":"SQL_snapinfo","{#VSERVER}":"NFS_demo","{#SNMPINDEX}":"1106"},
      {"{#VOLNAME}":"SQL_snapinfo_dr","{#VSERVER}":"NFS_demo","{#SNMPINDEX}":"1112"},
      {"{#VOLNAME}":"SQL_snapinfo_dr2","{#VSERVER}":"NFS_demo","{#SNMPINDEX}":"1138"},
      {"{#VOLNAME}":"VMware_AFF2","{#VSERVER}":"NFS_demo","{#SNMPINDEX}":"1198"},
      {"{#VOLNAME}":"NetAppDemo","{#VSERVER}":"NFS_demo","{#SNMPINDEX}":"1248"},
      {"{#VOLNAME}":"NFS_root","{#VSERVER}":"NFS_2","{#SNMPINDEX}":"1258"},
      {"{#VOLNAME}":"Testlab_NFS2","{#VSERVER}":"NFS_2","{#SNMPINDEX}":"1260"},
      {"{#VOLNAME}":"Security_root","{#VSERVER}":"Security","{#SNMPINDEX}":"1276"},
      {"{#VOLNAME}":"security_demo","{#VSERVER}":"Security","{#SNMPINDEX}":"1278"},
      {"{#VOLNAME}":"Oracle_root","{#VSERVER}":"Oracle","{#SNMPINDEX}":"1330"},
      {"{#VOLNAME}":"oracle_db","{#VSERVER}":"Oracle","{#SNMPINDEX}":"1332"},
      {"{#VOLNAME}":"iSCSI_demo_root","{#VSERVER}":"iSCSI_demo","{#SNMPINDEX}":"1376"},
      {"{#VOLNAME}":"Exchange_root","{#VSERVER}":"Exchange","{#SNMPINDEX}":"1400"},
      {"{#VOLNAME}":"exchange_db","{#VSERVER}":"Exchange","{#SNMPINDEX}":"1402"},
      {"{#VOLNAME}":"exchange_log","{#VSERVER}":"Exchange","{#SNMPINDEX}":"1404"},
      {"{#VOLNAME}":"FC_TEST_root","{#VSERVER}":"FC_TEST","{#SNMPINDEX}":"1442"},
      {"{#VOLNAME}":"ora_data","{#VSERVER}":"NFS_demo","{#SNMPINDEX}":"1750"},
      {"{#VOLNAME}":"ora_control","{#VSERVER}":"NFS_demo","{#SNMPINDEX}":"1752"},
      {"{#VOLNAME}":"ora_logs","{#VSERVER}":"NFS_demo","{#SNMPINDEX}":"1754"},
      {"{#VOLNAME}":"ora_home","{#VSERVER}":"NFS_demo","{#SNMPINDEX}":"1758"},
      {"{#VOLNAME}":"CIFS_root","{#VSERVER}":"CIFS_A","{#SNMPINDEX}":"1878"},
      {"{#VOLNAME}":"Backup","{#VSERVER}":"CIFS_A","{#SNMPINDEX}":"1880"},
      {"{#VOLNAME}":"Backup_AS","{#VSERVER}":"CIFS_A","{#SNMPINDEX}":"1882"},
      {"{#VOLNAME}":"install","{#VSERVER}":"CIFS_A","{#SNMPINDEX}":"1884"},
      {"{#VOLNAME}":"NFS_root","{#VSERVER}":"NFS_1","{#SNMPINDEX}":"1888"},
      {"{#VOLNAME}":"Testlab_AS","{#VSERVER}":"NFS_1","{#SNMPINDEX}":"1890"},
      {"{#VOLNAME}":"Testlab_NFS","{#VSERVER}":"NFS_1","{#SNMPINDEX}":"1892"},
      {"{#VOLNAME}":"linux_boot_vol","{#VSERVER}":"FC_demo","{#SNMPINDEX}":"1952"},
      {"{#VOLNAME}":"iSCSI_boot_root","{#VSERVER}":"iSCSI_boot","{#SNMPINDEX}":"1986"},
      {"{#VOLNAME}":"hv_boot_vol","{#VSERVER}":"iSCSI_boot","{#SNMPINDEX}":"1988"},
      {"{#VOLNAME}":"esxi_boot_vol","{#VSERVER}":"iSCSI_boot","{#SNMPINDEX}":"1990"},
      {"{#VOLNAME}":"commvault","{#VSERVER}":"NFS_2","{#SNMPINDEX}":"2108"},
      {"{#VOLNAME}":"hv_scvmn_vol","{#VSERVER}":"iSCSI_boot","{#SNMPINDEX}":"2110"},
      {"{#VOLNAME}":"audit_test","{#VSERVER}":"CIFS_A","{#SNMPINDEX}":"2112"},
      {"{#VOLNAME}":"rdmtest10_vol","{#VSERVER}":"iSCSI_boot","{#SNMPINDEX}":"2120"},
      {"{#VOLNAME}":"zabbix","{#VSERVER}":"NFS_2","{#SNMPINDEX}":"2122"},
      {"{#VOLNAME}":"NFS_demo_2","{#VSERVER}":"NFS_demo","{#SNMPINDEX}":"2236"},
      {"{#VOLNAME}":"vvol_datastore_nfs","{#VSERVER}":"NFS_demo","{#SNMPINDEX}":"2252"}
      ]}
       
      

       

      Result:

       

      See screenshot...

      What is interesting, the same script works fine for Cisco switches.

      But cisco switches return JSON data from SNMP queries a bit faster. (2-3 seconds, never triggered timeout)

      Does zabbix try to parse JSON data from err stream too?

      How can I get the resulting string which Zabbix gets from the script? It says just that should be JSON format, but it actually is a valid JSON format.
      Expected:
      This should just work.

        Attachments

          Activity

            People

            • Assignee:
              zabbix.support Zabbix Support Team
              Reporter:
              vaku Vadims Kurmis
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: