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

HTTPs service is showing unknown service in Discovery

XMLWordPrintable

      Hello,

      I am trying to check HTTPs uptime in every 24 hrs using Discovery rule. It is working fine for me using the port number (i.e. 443) but showing Uknown Service in email notification. It shows an error when service is down.
      I have also configured the same Discovery rule for HTTP and it is working fine i.e. it is recognizing the HTTP service in email notification.

      The message body configured in Action for HTTPs is:

      Item values:
      
      1. Customer ID - ABC
      2. Hostname - ABC
      3. Host IP - {DISCOVERY.DEVICE.IPADDRESS}
      4. Application/Service - {DISCOVERY.SERVICE.NAME}
      
      ---------Begin - Uptime details-------------------
      
      Device service name: {DISCOVERY.SERVICE.NAME}
      
      Device service port: {DISCOVERY.SERVICE.PORT}
      
      Device service status: {DISCOVERY.SERVICE.STATUS}
      
      Device service uptime: {DISCOVERY.SERVICE.UPTIME}
      
      ---------End - Uptime details-------------------
      
      Dear Recipient,
      
      According to our monitoring system the ABC {DISCOVERY.SERVICE.NAME} service has been {DISCOVERY.SERVICE.STATUS} total of {DISCOVERY.SERVICE.UPTIME} since last discovery.
      
      
      Best Regards,
      
      xyz Monitoring Team
      [email protected]
      

      ----------------------------------------------------------------------------------------------

      Attached file is the discovery rule i have created.

      ----------------------------------------------------------------------------------------------

      Just have taken a look at the source code (src/libs/zbxserver/expression.c) and HTTPS service is indeed not considered:

      Code:

      const char      *zbx_dservice_type_string(zbx_dservice_type_t service)
      {
              switch (service)
              {
                      case SVC_SSH:
                              return "SSH";
                      case SVC_LDAP:
                              return "LDAP";
                      case SVC_SMTP:
                              return "SMTP";
                      case SVC_FTP:
                              return "FTP";
                      case SVC_HTTP:
                              return "HTTP";
                      case SVC_POP:
                              return "POP";
                      case SVC_NNTP:
                              return "NNTP";
                      case SVC_IMAP:
                              return "IMAP";
                      case SVC_TCP:
                              return "TCP";
                      case SVC_AGENT:
                              return "Zabbix agent";
                      case SVC_SNMPv1:
                              return "SNMPv1 agent";
                      case SVC_SNMPv2c:
                              return "SNMPv2c agent";
                      case SVC_SNMPv3:
                              return "SNMPv3 agent";
                      case SVC_ICMPPING:
                              return "ICMP ping";
                      default:
                              return "unknown";
              }
      }
      

      Since it's already defined (include/common.h):

      Code:

      /* service supported by discoverer */
      typedef enum
      {
              SVC_SSH = 0,
              SVC_LDAP,
              SVC_SMTP,
              SVC_FTP,
              SVC_HTTP,
              SVC_POP,
              SVC_NNTP,
              SVC_IMAP,
              SVC_TCP,
              SVC_AGENT,
              SVC_SNMPv1,
              SVC_SNMPv2c,
              SVC_ICMPPING,
              SVC_SNMPv3,
              SVC_HTTPS,
              SVC_TELNET
      }
      

      Kindly verify and let me know the resolution for these.

      Thanks,
      Jitendra

            Unassigned Unassigned
            jeetusjeet Jitendra Pagare
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: