Ad Widget

Collapse

Zabbix 7 web service / Reporting

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ezols
    Member
    • Dec 2021
    • 33

    #1

    Zabbix 7 web service / Reporting

    Hello, i dont know whats wrong, seeking help.
    I have installed with docker Zabbix 7.0.0beta3
    Click image for larger version  Name:	image.png Views:	0 Size:	51.3 KB ID:	481570zabbix web services is on 6.4 version because i have no clue where is the issue, before it was or ubuntu-trunk, same issue.

    So the issue, upon clicking Test button for scheduler report i get:
    Click image for larger version  Name:	image.png Views:	0 Size:	73.2 KB ID:	481571
    Click image for larger version  Name:	image.png Views:	0 Size:	25.3 KB ID:	481573
    web service config:
    HTML Code:
    # This is a configuration file for Zabbix web_service
    # To get more information about Zabbix, visit https://www.zabbix.com
    
    ############ GENERAL PARAMETERS #################
    
    ### Option: LogType
    #       Specifies where log messages are written to:
    #               system  - syslog
    #               file    - file specified with LogFile parameter
    #               console - standard output
    #
    # Mandatory: no
    # Default:
    # LogType=file
    LogType=console
    
    ### Option: LogFile
    #       Log file name for LogType 'file' parameter.
    #
    # Mandatory: yes, if LogType is set to file, otherwise no
    # Default:
    # LogFile=/tmp/zabbix_web_service.log
    
    ### Option: LogFileSize
    #       Maximum size of log file in MB.
    #       0 - disable automatic log rotation.
    #
    # Mandatory: no
    # Range: 0-1024
    # Default:
    # LogFileSize=1
    
    ### Option: DebugLevel
    #       Specifies debug level:
    #       0 - basic information about starting and stopping of Zabbix processes
    #       1 - critical information
    #       2 - error information
    #       3 - warnings
    #       4 - for debugging (produces lots of information)
    #       5 - extended debugging (produces even more information)
    #
    # Mandatory: no
    # Range: 0-5
    # Default:
    DebugLevel=5
    
    ### Option: AllowedIP
    #       List of comma delimited IP addresses, optionally in CIDR notation, or DNS names of Zabbix servers and Zabbix proxies.
    #       Incoming connections will be accepted only from the hosts listed here.
    #       If IPv6 support is enabled then '127.0.0.1', '::127.0.0.1', '::ffff:127.0.0.1' are treated equally
    #       and '::/0' will allow any IPv4 or IPv6 address.
    #       '0.0.0.0/0' can be used to allow any IPv4 address.
    #       Example: AllowedIP=127.0.0.1,192.168.1.0/24,::1,2001:db8::/32,zabbix.example.com
    #
    # Mandatory: yes
    # Default:
    # AllowedIP=
    
    #AllowedIP=zabbix-server,172.16.0.0/16
    AllowedIP=0.0.0.0/0
    
    ### Option: ListenPort
    #       Service will listen on this port for connections from the server.
    #
    # Mandatory: no
    # Range: 1024-32767
    # Default:
    # ListenPort=10053
    
    ### Option: Timeout
    #       Spend no more than Timeout seconds on processing
    #
    # Mandatory: no
    # Range: 1-30
    # Default:
    Timeout=30
    
    ### Option: TLSAccept
    #       What incoming connections to accept.
    #       Specifies what type of connection to use:
    #               unencrypted - accept connections without encryption
    #               cert        - accept connections secured with TLS and a certificate
    #
    # Mandatory: no
    # Default:
    # TLSAccept=unencrypted
    
    ### Option: TLSCAFile
    #       Full pathname of a file containing the top-level CA(s) certificates for
    #       peer certificate verification.
    #
    # Mandatory: no
    # Default:
    # TLSCAFile=
    
    ### Option: TLSCertFile
    #       Full pathname of a file containing the service certificate or certificate chain.
    #
    # Mandatory: no
    # Default:
    # TLSCertFile=
    
    ### Option: TLSKeyFile
    #       Full pathname of a file containing the service private key.
    #
    # Mandatory: no
    # Default:
    # TLSKeyFile=
    
    ### Option: IgnoreURLCertErrors
    #       Ignore TLS certificate errors when accessing Frontend URL
    #               0 - do not ignore
    #               1 - ignore
    #
    # Mandatory: no
    # Default:
    # IgnoreURLCertErrors=0
    I have set AllowedIP=0.0.0.0/0 because want to eliminate network issue, as well web service is added in all docker networks menitoned in compose file.

    web service logs, says timeout, but i dont know why.
    HTML Code:
    2024/03/28 14:18:35.718551 received report request from 172.16.238.2:51902
    2024/03/28 14:18:35.718977 making chrome headless request with parameters url: https://xxxx/zabbix.php?action=dashboard.print&dashboardid=326&from=2024-03-27%2000%3A00%3A00&to=2024-03-28%2000%3A00%3A00, width: 1920, height: 1080 for report request from 172.16.238.2:51902
    2024/03/28 14:21:50.324195 timeout occurred while dashboard was getting ready, url: 'https://xxxx/zabbix.php?action=dashboard.print&dashboardid=326&from=2024-03-27%2000%3A00%3A00&to=2024-03-28%2000%3A00%3A00'
    2024/03/28 14:21:50.326479 writing response for report request from 172.16.238.2:51902
    Report is accessible via link in log above and looks like this:
    Its just for tests
    Click image for larger version  Name:	image.png Views:	0 Size:	81.9 KB ID:	481572​in zabbix server config file i added these:
    HTML Code:
    StatsAllowedIP=0.0.0.0/0 #to eliminate network related problems
    StartReportWriters=1
    WebServiceURL=http://zabbix-web-service:10053/report
    Media types via email are enabled and tested, test email received.
    Other configuration parameters also configured:
    Click image for larger version  Name:	image.png Views:	0 Size:	152.2 KB ID:	481575
    In zabbix server logs i see nothing on this fail, debug level is set to 3.

    Does web service docker image contain chrome?

    Please advises, maybe have missed config...
    Last edited by ezols; 28-03-2024, 16:48.
  • Segz
    Junior Member
    • Apr 2024
    • 1

    #2
    Hi ezols. Experiencing the exact same issue. We're you able to resolve?

    Comment


    • ezols
      ezols commented
      Editing a comment
      I scraped docker webservice and installed it directlly on host, that resolved issue for me.
  • __Felix
    Junior Member
    • Apr 2024
    • 2

    #3
    I am sure that this applies to everyone.
    How it works:
    1. Zabbix Server send task to Zabbix Web-service:
    "paint it":
    {"url":"http://vm-zabbixs/zabbix/zabbix.php?action=dashboard.print&dashboardid=300& from=2024-04-02%2000%3A00%3A00&to=2024-04-03%2000%3A00%3A00","headers":{"Cookie":"zbx_sessio n=eyJz..."},"parameters":{"width":"1920","height": "1062"}}
    2.Zabbix Web-service:
    2024/04/03 18:42:25.840071 making chrome headless request with parameters url: http://vm-zabbix/zabbix/zabbix.php?a...ashboardid=300. ..
    And on this page there is a JS-timer that sends verification pings:
    "url": "http://vm-zabbix/zabbix/jsrpc.php?output=json-rpc",
    "postData": {
    "mimeType": "application/json-rpc",
    "text": "{"jsonrpc":"2.0","method":"zabbix.status" ,"params":{"nocache":true},"id":277}"
    that is, the dashboard page is live
    chrome does not signal that the page has been loaded

    Zabbix Web-service is timed out and starts sending PDF
    3. Zabbix Server is timed out and reset connection to Zabbix Web-service.

    It is necessary to do something with these pings

    Comment

    • __Felix
      Junior Member
      • Apr 2024
      • 2

      #4
      Hang up. I'm dumb. I updated the server, but no front. And there was just a change about:
      GO code:
      PHP Code:
      const dashboardIsReady ".dashboard.is-ready"
          
      const timeout time.Minute

          expression 
      := fmt.Sprintf("document.querySelector('%s') !== null"dashboardIsReady)
          var 
      isReady bool

          err 
      := chromedp.Run(ctxchromedp.Poll(expression, &isReadychromedp.WithPollingTimeout(timeout))) zz0.0s5gr98rdqohzz 
      I raised the version of the front, everything is alive.

      ezols : run tcpdump to analyze traffic

      Comment

      • jdoggy31
        Member
        • Feb 2019
        • 39

        #5
        I have same issue, 7.0 LTS all running at the same version, running on the same machine , ubuntu 24.04 running in AWS. I have a local test instance that woks just fine. I for the life of don't know the difference. logs look the same as above. I'm out of ideas

        Comment

        Working...