Ad Widget

Collapse

Scheduled Reports

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • trimoon
    Junior Member
    • Jul 2023
    • 11

    #1

    Scheduled Reports

    Hi there,

    Trying to get scheduled reporting working and hoping someone can point me in the right direction!

    I've followed https://assets.zabbix.com/files/work...ith_Zabbix.pdf apart from because I'm running nginx my front end is just http://x.x.x.x not http://x.x.x.x/zabbix

    I uncommented / edited the following lines:
    zabbix_server.conf
    StartReportWriters=3
    WebServiceURL=http://localhost:10053/report

    zabbix_web_service.conf
    ListenPort=10053
    IgnoreURLCertErrors=1
    logfile=/var/log/zabbix/zabbix_web_service.log​

    My report has 'info' error beside it: 'Cannot connect to web service: couldn't connect to server'
    When i open the report and test i get 'No media configured for the report recipients'​

    The recipients do have media configured and are receiving emails from trigger actions and tests

    zabbix-web-service.service shows active (running) and tail /var/log/zabbix/zabbix_web_service.log doesnt show anything other than the service starting.

    Any ideas what to try?
  • Answer selected by trimoon at 17-09-2023, 08:29.
    vijayk
    Senior Member
    • May 2023
    • 305

    Refer the URL.



    SELinux is also causing the issue. Please verify it.

    grubby --update-kernel ALL --args selinux=0
    reboot​

    Comment

    • markosa
      Senior Member
      Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
      • Aug 2022
      • 104

      #2
      And you added IP's to AllowedIP= section at zabbix-webservice config? Also, is chrome within PATH?

      Comment

      • trimoon
        Junior Member
        • Jul 2023
        • 11

        #3
        Hi Markosa,


        In /etc/zabbix/zabbix_web_service.conf I tried changing the default

        AllowedIP=127.0.0.1,::1
        To:
        AllowedIP=0.0.0.0/0

        Didnt seem to make a difference so i changed it back to be local server only (127.0.0.1,::1)


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

        As for chrome the instructions in the guide didnt work with CentOS 9 so i installed it like so:
        dnf install wget -y
        wget https://dl.google.com/linux/direct/g...ent_x86_64.rpm
        dnf -y install google-chrome-stable_current_x86_64.rpm -y​

        When I run:
        whereis google-chrome-stable
        returns this:
        google-chrome-stable: /usr/bin/google-chrome-stable /usr/share/man/man1/google-chrome-stable.1.gz

        When I run:
        echo $PATH
        It returns this:
        /root/.local/bin:/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin

        Are you saying i need to add the /usr/bin/google-chrome-stable path into $PATH or will it pick this up as its within /usr/bin ?

        Comment

        • markosa
          Senior Member
          Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
          • Aug 2022
          • 104

          #4
          If it's in path then there's no need to add it. Have you tried to add server IP to allowedip list? Not localhost but whatever address is used when accessing to GUI? You could also raise debuglevel of the webservice to see detailed error messages.

          Comment

          • wetchary
            Junior Member
            • Jul 2023
            • 1

            #5
            Hi Guys,
            I have this problem:

            Click image for larger version

Name:	image.png
Views:	1012
Size:	7.8 KB
ID:	467385

            Please can you help me, thanks.

            Comment

            • trimoon
              Junior Member
              • Jul 2023
              • 11

              #6
              Originally posted by markosa
              If it's in path then there's no need to add it. Have you tried to add server IP to allowedip list? Not localhost but whatever address is used when accessing to GUI? You could also raise debuglevel of the webservice to see detailed error messages.
              I changed:
              AllowedIP=127.0.0.1,192.168.0.22/24,::1,zabbix.wo.local

              Also have debug level set to 4 in zabbix_web_service and ran:

              tail /var/log/zabbix/zabbix_web_service.log

              only shows service starting and stopping...

              Still getting this error:

              Click image for larger version

Name:	image.png
Views:	964
Size:	7.6 KB
ID:	470502

              Any ideas of other things to check?

              Thanks!

              Comment

              • vijayk
                Senior Member
                • May 2023
                • 305

                #7
                Have you allowed the IP in /usr/local/etc/zabbix_web_service.conf ?

                AllowedIP=192.168.0.22/24,::1

                Comment

                • trimoon
                  Junior Member
                  • Jul 2023
                  • 11

                  #8
                  Originally posted by vijayk
                  Have you allowed the IP in /usr/local/etc/zabbix_web_service.conf ?

                  AllowedIP=192.168.0.22/24,::1
                  Set it exactly like that, only my zabbix_web_service.conf lives at /etc/zabbix/zabbix_web_service.conf

                  Comment

                  • vijayk
                    Senior Member
                    • May 2023
                    • 305

                    #9
                    Originally posted by trimoon

                    Set it exactly like that, only my zabbix_web_service.conf lives at /etc/zabbix/zabbix_web_service.conf
                    Did you try with copy this file at /usr/local/etc/ path and check?

                    Comment

                    • trimoon
                      Junior Member
                      • Jul 2023
                      • 11

                      #10
                      Originally posted by vijayk

                      Did you try with copy this file at /usr/local/etc/ path and check?
                      Just made a copy of zabbix_web_service.conf in /usr/local/etc and rebooted server. Same error in GUI.

                      I think its set to look at /etc/zabbix/ location for conf though because when i run a status on the server i get the following path:

                      Click image for larger version

Name:	image.png
Views:	968
Size:	6.8 KB
ID:	470510

                      Comment

                      • vijayk
                        Senior Member
                        • May 2023
                        • 305

                        #11
                        Which version of Zabbix are you running? Is it Docker container?

                        Comment

                        • trimoon
                          Junior Member
                          • Jul 2023
                          • 11

                          #12
                          Originally posted by vijayk
                          Which version of Zabbix are you running? Is it Docker container?
                          Was running 6.4.3, I actually just now updated to 6.4.6, same issue

                          Running on Rocky Linux 9.2

                          Web front end is on nginx

                          Comment

                          • vijayk
                            Senior Member
                            • May 2023
                            • 305

                            #13
                            Originally posted by trimoon

                            Was running 6.4.3, I actually just now updated to 6.4.6, same issue

                            Running on Rocky Linux 9.2

                            Web front end is on nginx
                            Okay, and Web service is installed with Zabbix server or in different system?

                            Front end URL must be http://zabbixserver ip.

                            Comment

                            • trimoon
                              Junior Member
                              • Jul 2023
                              • 11

                              #14
                              Originally posted by vijayk

                              Okay, and Web service is installed with Zabbix server or in different system?

                              Front end URL must be http://zabbixserver ip.
                              Web Service is installed with Zabbix server



                              My Frontend URL's were set to localhost thats interesting...

                              In zabbix_server.conf
                              Changed value for WebServiceURL
                              from 'http://localhost:10053/report' to 'http://192.168.0.22:10053/report'

                              In the web GUI at http://192.168.0.22/zabbix.php?action=miscconfig.edit
                              Changed: "Frontend URL" field
                              from 'http://localhost' to 'http://192.168.0.22'​

                              Rebooted. Scheduled reports still have same info error about not being able to connect to server.

                              Comment

                              • vijayk
                                Senior Member
                                • May 2023
                                • 305

                                #15
                                Originally posted by trimoon

                                Web Service is installed with Zabbix server



                                My Frontend URL's were set to localhost thats interesting...

                                In zabbix_server.conf
                                Changed value for WebServiceURL
                                from 'http://localhost:10053/report' to 'http://192.168.0.22:10053/report'

                                In the web GUI at http://192.168.0.22/zabbix.php?action=miscconfig.edit
                                Changed: "Frontend URL" field
                                from 'http://localhost' to 'http://192.168.0.22'​

                                Rebooted. Scheduled reports still have same info error about not being able to connect to server.
                                Have you checked the logs? Web service logs and Zabbix Server logs.

                                Comment

                                Working...