Ad Widget

Collapse

scheduled reports on https - Zabbix 6.2.1

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • verde
    Member
    • Jul 2021
    • 39

    #1

    scheduled reports on https - Zabbix 6.2.1

    My scheduled report was working beautifully until I configured SSL (on apache) for Zabbix that redirect all request HTTP to HTTPS. (Directions at the bottom).

    So, I reconfigured the server URL for the GUI (Administration->General->others) pointing to HTTPS:// instead of HTTP://, Then I changed the server configuration:
    /etc/zabbix/zabbix_server.conf
    + WebServiceURL=https://zabbix.ip:10053/report​

    /etc/zabbix/zabbix_web_service.conf
    +IgnoreURLCertErrors=1​




    But after restarting zabbix_services, and testing the scheduled report I got: "Cannot connect to web service: sSL connect error"
    Click image for larger version  Name:	image.png Views:	0 Size:	24.8 KB ID:	452089






    Browsing for similar issues, I found several tickets with the problem but none of them was commented on or even resolved.

    I was giving up on SSL and started rollback, but I only returned the Zabbix server config to HTTP (and restarting zabbix server), nothing else was rolled back, yet that made the trick.

    /etc/zabbix/zabbix_server.conf
    + WebServiceURL=http://zabbix.ip:10053/report​





    So despite the apache server has SSL redirecting from HTTP to HTTPS, the scheduled report is working beautifully again.



    SSL for Zabbix on Apache
    ====================


    sudo yum install mod_ssl
    adding the next three lines to /etc/httpd/conf.d/zabbix.conf :
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]



    sudo systemctl restart httpd



    Regards,

    Verde




    Attached Files
    Last edited by verde; 01-10-2022, 00:22.
  • Israe
    Junior Member
    • Feb 2023
    • 3

    #2
    Hello, I'm new to zabbix and I think I have the same problem, the company i work for pushed their certificate on zabbix server and now the frontend is served through https, I followed every config and solution out their and nothing is working since the web service is on http.. I just found your solution but I couldn't clearly understand the steps and config you did so if you could please explain them again. like did you reverse your server back to http at the end or kept it https and did the modifications on the zabbix.conf? and where exactly on the file did you put those lines?!

    Comment

    • MaxMax
      Junior Member
      • Mar 2022
      • 3

      #3
      Hi Verde, thanks for what you posted has inspired me how to fix my issue.
      From my site, I have updated the HTTPS and also got some problem here.( Got Empty PDF report)
      resolved by ignored the SSL : IgnoreURLCertErrors=1​
      regarding to the Webservice URL I think it has a specific port 10053 on http. and the redirections setting is affected on port 80 to port 443.
      you can try access http://zabbix.ip:10053/report​ on your browser, it will not go to the https.

      thanks again.

      Comment

      • dany2191
        Junior Member
        • Aug 2023
        • 4

        #4
        Hello, everyone,

        I have carried out all the steps that have been indicated but now in the pdf file that arrives I get the following message


        HTML Code:
        You are not logged in
        You must login to view this page.
        Possibly the session has expired or the password was changed.
        If you think this message is wrong, please consult your administrators about getting
        the necessary permissions.


        Does anyone know how to solve it?​

        Comment

        • marco_a
          Junior Member
          • Mar 2023
          • 7

          #5
          Hi,
          in my case the report generation seems to go well but I am sent an empty pdf file
          From my zabbi-web-service.log
          ---------
          received report request from my.ip:43112

          2024/02/28 16:40:56.669318 making chrome headless request with parameters url: https://my.ip/zabbix/zabbix.php?action=dashboa
          rd.print&dashboardid=192&from=2024-02-27%2000%3A00%3A00&to=2024-02-28%2000%3A00%3A00, width: 1920, height: 1832 for report request from my.ip:43112

          2024/02/28 16:40:58.928490 writing response for report request from my.ip:43112
          ------------
          I also have configured:
          WebServiceURL=http://zabbix.ip:10053/report​
          IgnoreURLCertErrors=1​
          Administration->General->others) pointing to HTTPS

          Any suggestions
          Thanks


          Comment

          Working...