Ad Widget

Collapse

"error":"Failed response parse. Check debug log for more information." in AWS by HTTP

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • miguel.ayala
    Junior Member
    • Apr 2021
    • 3

    #1

    "error":"Failed response parse. Check debug log for more information." in AWS by HTTP

    Hi!

    We are using AWS by HTTP template (version: '6.2' date: '2022-08-29T03:55:47Z'​). It has 3 Discovery Rules, RDS and S3 are working fine but in EC2 we get the following error:

    Cannot find the "data" array in the received JSON object.

    {"error":"Failed response parse. Check debug log for more information."}.

    If we check the variable "response" after being converted in JavaScript by return JSON.parse(response) it has all the data, but something happens after being coverted.... or we are't doing something correctly .

    Here are some screenshots:

    Click image for larger version

Name:	image.png
Views:	3051
Size:	25.5 KB
ID:	452054

    Click image for larger version

Name:	image.png
Views:	2828
Size:	29.7 KB
ID:	452055


    Any ideas??

    Thnks in advance!​​
  • Dacius
    Junior Member
    • Mar 2022
    • 7

    #2
    Hy, I've the same problem. If someone have an idea it will be cool.

    Best regards

    Comment

    • Markku
      Senior Member
      Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
      • Sep 2018
      • 1781

      #3
      What does the Zabbix server log say? How about when the logging level is increased to 4?

      Markku

      Comment

      • Dacius
        Junior Member
        • Mar 2022
        • 7

        #4
        Originally posted by Markku
        What does the Zabbix server log say? How about when the logging level is increased to 4?

        Markku
        Hy Markku, thanks for your answer, I'll check that today I'll be back.

        Best regards

        Seb

        Comment

        • stevehoran
          Junior Member
          • Nov 2022
          • 4

          #5
          I am still seeing this error as well only for EC2.

          It appears EC2 script is the only one doing some interesting JSON to XML things. It appears the XLM structure is good. Not sure what is the issue here.

          Comment

          • stevehoran
            Junior Member
            • Nov 2022
            • 4

            #6
            It appears the there is some param checking logging that has thrown things off for me. I kept seeing access_key param not set when it most certainly is. I reduced the script to:

            Code:
                setParams: function (params) {
                    AwsEC2.params = params;
                },​
            For now. This seems to correct issues but I am not sure why.

            Comment

            • Manohary
              Junior Member
              • Feb 2023
              • 3

              #7
              Hello Zabbix community, I am having the same issue with my Zabbix 6.0. Kindly let me know if anybody found the solution.

              Comment

              • Markku
                Senior Member
                Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
                • Sep 2018
                • 1781

                #8
                Where/how did you set the access_key parameter?

                Markku

                Comment

                • stevehoran
                  Junior Member
                  • Nov 2022
                  • 4

                  #9
                  I have tested this a couple different ways, setting it at the host level and at the global template level. It seems like all of the discovery items (EC2, RDS, S3, EBS, Alarms, etc) are struggling with reliably inspecting the parameters and specifically the access_key parameter. I stood up a second Zabbix instance today and tried testing from a fresh instance and the same issue persists.

                  Comment

                  • Markku
                    Senior Member
                    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
                    • Sep 2018
                    • 1781

                    #10
                    Ok, so if I understand if correctly you are using the {$AWS.ACCESS.KEY.ID} macro, and you are sure it is defined for the host, but still the parameter verification fails.

                    You may want to open a ticket at https://support.zabbix.com if you think there is an error in the script. Make sure to first check for latest version of the template in git.zabbix.com.

                    Looking at the script the access_key parameter is checked first and if it throws the error, then the other parameters are not checked.

                    Markku

                    Comment

                    • stevehoran
                      Junior Member
                      • Nov 2022
                      • 4

                      #11
                      Markku,

                      Agreed, it you do log the parameters only 2 objects appear to be passed to the function and it is not consistent. Again if I remove the check (which I am not recommending just a workaround), things complete successfully. I will open a bug as this is using the template from a freshly installed Zabbix deployment.​

                      Comment

                      • Manohary
                        Junior Member
                        • Feb 2023
                        • 3

                        #12
                        Zabbix has not yet released templates for version 6.0.7 but I am curious to know the reason for this issue. Thanks for your views on this.!!
                        Last edited by Manohary; 07-02-2023, 13:46.

                        Comment

                        • fabreg
                          Junior Member
                          • Feb 2023
                          • 3

                          #13
                          Same issue here.
                          I'm using zabbix 6.0.13
                          Increasing the DebugLog to 4 helps to check for errors but unfortunately everything looks fine. The data are coming from AWS and seems they have all the needed properties but for unknow reason the ec2 discovery script does not work.
                          The S3 and the RDS are working fine.

                          Comment

                          • oscar
                            Senior Member
                            • Dec 2010
                            • 141

                            #14
                            checked on 6.0.13 in docker...
                            all is good
                            Can you show the logs and test output for this LLD rule?​

                            Comment

                            • fabreg
                              Junior Member
                              • Feb 2023
                              • 3

                              #15
                              hi oscar ,
                              here's the log:


                              Code:
                              [ AWS EC2 ] Sending request: https://ec2.<zone>.amazonaws.com/?Action=DescribeInstances&Version=2016-11-15
                              Code:
                              [ AWS EC2 ] Received response with status code 200: <?xml version="1.0" encoding="UTF-8"?>
                              <DescribeInstancesResponse xmlns="http://ec2.amazonaws.com/doc/2016-11-15/">
                              <requestId>a45434a-8442-38v5-6ddc-153ad10d02a3</requestId>
                              <reservationSet>
                              <item>
                              ...
                              Then a list of instances is created (I cannot paste there cause it contains sensible data)
                              I have many instances (around 80)

                              And, the last line is:

                              Code:
                              4038408:20230208:104406.397 [ AWS EC2 ] ERROR: Failed response parse. Check debug log for more information.
                              4038408:20230208:104406.397 zbx_es_execute() output:'{"error":"Failed response parse. Check debug log for more information."}'

                              ​This is the same error I get when I try to use the LLD test rules.

                              Thank you!

                              Comment

                              Working...