06-15-2025 04:22 AM
Hey community, i have an issue with applying
Cisco Meraki device by HTTP
zabbix template to hosts, error is following:
Failed to parse response received from Meraki API. Check debug log for more information.
Response code "400" did not match any of the required status codes "200"
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 400 Illegal Path Character</title>
</head>
<body>
<h2>HTTP ERROR 400 Illegal Path Character</h2>
<table>
<tr><th>URI:</th><td>/badURI</td></tr>
<tr><th>STATUS:</th><td>400</td></tr>
<tr><th>MESSAGE:</th><td>Illegal Path Character</td></tr>
</table>
<hr/><a href="https://jetty.org/">Powered by Jetty:// 12.0.19</a><hr/>
All the neccessary macros {$MERAKI.API.URL} and {$MERAKI.TOKEN} for the host being already specified with corresponding values.What am I doing wrong?
Solved! Go to Solution.
06-15-2025 04:19 PM
This looks like an Ansible playbook for Zabbix.
We support the Meraki Ansible collection. I assume the Zabbix community supports the Zabbix Ansible collection.
That said, you can use the API analytics page and download the API call log (preferably shortly after an attempt to run this playbook).
If the 400 error is coming from Meraki (and not Zabbix) - you'll be able to see the API call being made and probably find the reason it gets a 400 response back.
If you don't see the API call in the log, the 400 error might be coming from somewhere else, before an API call is made to Meraki.
06-15-2025 05:46 AM
Make sure your URL looks like this: https://api.meraki.com/api/v1
You can test it with curl: curl -H "X-Cisco-Meraki-API-Key: YOUR_API_KEY" \ https://api.meraki.com/api/v1/organizations
06-15-2025 06:32 AM
i tried with https:// as well, however error is the same
06-15-2025 06:41 AM
Can you share your code?
Remember that the URL cannot have a trailing slash.
06-15-2025 07:04 AM
i'm adding hosts via ansible so the code is following:
- name: add hosts to zabbix frontend
community.zabbix.zabbix_host:
host_name: "{{ item.name }}"
visible_name: "{{ item.name }}"
host_groups:
- "{{ item.name[4:9] }}"
link_templates:
- Cisco Meraki device by HTTP
macros:
- macro: "{$MERAKI.TOKEN}"
value: "{{MERAKI_TOKEN}}"
- macro: "{$MERAKI.API.URL}"
value: "https://api.meraki.com/api/v1"
tags:
- tag: Product Type
value: "{{ item.productType }}"
- tag: Serial number
value: "{{ item.serial }}"
- tag: Model
value: "{{ item.model }}"
- tag: Firmware
value: "{{ item.firmware }}"
status: enabled
state: present
monitored_by: proxy
proxy: "{{PROXY_NAME}}"
loop: "{{ devices }}"06-15-2025 02:11 PM
What is the final URL that it constructs when calling the API?
06-15-2025 03:28 PM
i guess the final url is :https://api.meraki.com/api/v1/organizations, can't find a way which url zabbix is using for requests, finally managed to successfully add the devices, gather its status and public IP, however problem maintains the same: Meraki: There are errors in 'Get device data' metric , and for "Device data item errors" item Last Value is : "Failed to parse response received from Meraki API. Check debug log for more information."
06-15-2025 04:19 PM
This looks like an Ansible playbook for Zabbix.
We support the Meraki Ansible collection. I assume the Zabbix community supports the Zabbix Ansible collection.
That said, you can use the API analytics page and download the API call log (preferably shortly after an attempt to run this playbook).
If the 400 error is coming from Meraki (and not Zabbix) - you'll be able to see the API call being made and probably find the reason it gets a 400 response back.
If you don't see the API call in the log, the 400 error might be coming from somewhere else, before an API call is made to Meraki.
06-15-2025 07:00 AM
k
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide