[ZBX-22201] Zabbix cloudflare by http not working Created: 2023 Jan 12  Updated: 2024 Apr 17  Resolved: 2024 Apr 17

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Templates (T)
Affects Version/s: 6.2.6
Fix Version/s: 7.0 (plan)

Type: Problem report Priority: Trivial
Reporter: Yu Wenwei Assignee: Aleksejs Abrosimovs
Resolution: Won't fix Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screenshot 2024-04-09 151448 001.png     PNG File Screenshot 2024-04-09 151508.png    
Team: Team INT
Story Points: 3

 Description   

Steps to reproduce:

  1. Add host
  2. Host name is xxx.com.sg
  3. Templates = cloudflare by http
  4. Set up Macros.
  5. Input API token in value, tested working and valid in CLI.
  6. Input Cloudflare zone ID 
  7. URL, bandwidth, max warn and timeout as default.

Result:
no data collected.

Cloudflare: Get data having error of "Cannot execute script: Requesting failed: Request failed with status code 400: {"success":false,"errors":[

{"code":10000,"message":"Authentication error"}

]}"  

Graph all no data

Expected:
See screenshot....
See attached patch file...



 Comments   
Comment by Aleksejs Abrosimovs [ 2024 Apr 15 ]

"Authentication error" means that there is something wrong with the API token.
Default "Cloudflare by HTTP" template work without any issue.

"Authentication error" can be caused by wrong API token or mistakes in API token.
Such mistakes are returned with status code 401. But failed request with status code 400 specifically is caused by extra space before the token.
Example:

Generated at Mon May 19 06:21:10 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.