Exporting Zabbix Configuration Data Without Losing Your Sanity
If you've ever tried to export configuration data from Zabbix, you probably fall into one of two categories:
- You gave up.
- You didn't give up — but wish you had.
Let's face it: Zabbix is fantastic at monitoring, but when it comes to getting structured data out of it for review, reporting, or migration... it's not exactly a walk in the park.
You want a list of hosts, with their groups, templates, tags, and maybe a few custom macros? Prepare for:
- Messy API calls
- JSON spaghetti
- Or manually copying things out of the web UI like it's 2008
That's where ZbxWizz comes in. This post is your shortcut to exporting clean, structured Zabbix data — without writing code or losing your mind.
The Classic Export Pain
Imagine this: you're planning a system migration, or just trying to audit host group consistency. You fire up Zabbix and think:
"I'll just grab all hosts with their group, template, and tags info — maybe dump to CSV."
Only to realize... there's no easy export button. Sure, the API can do it, but it's more like a riddle than a REST interface.
So you try:
- Writing a Python script with
requests - Copying stuff from the UI table into Excel
- Finding that old community script someone posted in 2017
- Crying in
jq
That's not ops. That's archeology.
What If You Could Just... See It All?
This is what I wanted:
- A clear table showing every host
- With hostgroups, tags, templates, and even macros
- Something I could filter, sort, copy, or export
- No extra coding
- And if possible — something pretty enough to show my manager
So I built it into ZbxWizz.
ZbxWizz to the Rescue
ZbxWizz has a built-in export workflow that connects directly to your Zabbix API.
Here's how it works:
1. Connect to Zabbix
Point ZbxWizz to your Zabbix instance. Login with API credentials and it pulls the latest data — no scripts, no hassle.
2. Import What You Need
You choose what kind of data you want to pull:
- Hosts
- Host groups
- Tags
- Templates
- Interfaces
- Macros (and more to come)
Each is pulled in real-time and displayed in a spreadsheet-style interface. You can:
- Filter by group or tag
- Search by hostname
- See relationships between data types
3. Export to CSV
Once you're happy with what you see:
- Go to Data menu and hit "Export to CSV"
- Done
Use the output for:
- Audits
- Reports
- Migration to another system
- Bulk edits in Excel
- Feeding back into ZbxWizz for re-import
And best of all: no data loss, no weird encodings, no "why is this field null now?" moments.
Bonus: It's Reversible
The beauty of exporting with ZbxWizz is that what you export, you can re-import.
- Make edits offline or in Excel
- Import the updated CSV into ZbxWizz
- Preview the diff
- Push changes back to Zabbix
This makes it easy to:
- Run cleanup campaigns
- Perform staged migrations
- Collaborate with non-technical team members (e.g. send them the CSV, let them do the tagging)
Under the Hood
ZbxWizz uses the official Zabbix API, and maps internal fields into a flattened, human-friendly structure. So you're not dealing with:
"hostInterfaces": [{
"interfaceid": "13",
"main": "1",
"type": "1",
...
}]
Instead, you see:
| Host | Group | Template | Tag Key | Tag Value |
|---|---|---|---|---|
| web01 | Linux Servers | Template OS Linux | env | prod |
You know... actual data.
Real-Life Use Case: Export a list of hosts with associated tags and groups
In our Zabbix setup we use host groups and tags to create various policies, like limiting users access, creating tickets in SNOW against the correct groups and so on. To be more specific we use the following tags and group types a:
- Location based groups
- Device type groups
- Owner tag
- SLA
In this scenario I want to export a list of hosts with the following fields:
- host
- name
- IP
- device type
- device owner
- location
- SLA
Doing this is pretty easy. See how it's done by following the steps bellow or just by watching this video:
Step 1 - Import the hosts from Zabbix
I open the Import from Zabbix dialog (Data -> Import from Zabbix menu), I select the resource type host and fill in the following API request and hit Execute:
{
"output":["host","name"],
"selectInterfaces":["ip"],
"selectHostGroups":["name"],
"selectTags":["tag","value"],
"tags":[
{
"tag":"MONITORING",
"value":"ACTIVE"
}
],
"limit":10000
}
As you can see, I have filtered only the hosts which have the tag MONITORING as ACTIVE. Also, I have set the max number of hosts to be retrieved to 10000. Without this parameter set, the default value is 5 to avoid such situations when the request has mistakes in it and it would return too many results.
Step 2 - Extract the data using JS transformations
As the data was loaded in the interface, notice that the fields hostgroups, interfaces and tags are funny looking. The data is in JSON format and this allows me to extract exactly what I need into separate fields. Extracting the data will be done using JavaScript transformations in new columns.
In order to extract the data that I need into specific columns, I will go to the column menu and hit Transform. By default, the current column is selected for the transformation, but you can change this in the Column select.
I will extract first in Column 6 the IP of the host. For this, in the transformation dialog, I will use the following expression and hit Apply:
obj($4)[0].ip
Let's dive into this expression:
$4refers to column index 4obj($4)converts the JSON string into a JavaScript array, which elements I can access using[]and extract theipproperty
In a similar manner I will extract the rest of the data which I need in columns 6 to 10:
- location:
obj($3).filter(g=>g.name.match(/Sites/))[0].name.split("/")[1] - device type:
obj($3).filter(g=>g.name.match(/Device/))[0].name.split("/")[1] - SLA:
obj($5).filter(g=>g.tag.match(/SLA/))[0].value - owner:
obj($5).filter(g=>g.tag.match(/TEAM/))[0].value
Step 3 - Export data.
Now that all the data has been extracted, I could go ahead and export it, but I want the xport to be clean so I will rename each column to have a meaningfull name and delete the hostgroups, interfaces and tags columns.
With this being completed I will go now to Data -> Export to CSV give it a nice meaningfull name and hit Export.
And that's it!
Get Started
Exporting Zabbix data doesn't have to feel like reverse engineering an alien artifact. With ZbxWizz, you get a clean view, clear export, and total control over what happens next.
Try it out today: github.com/your-link-here
Want to Help?
If you like what ZbxWizz does, there are a few ways to help:
Star the GitHub repo
Report bugs
Suggest new export options
Contribute code
Share it with your Zabbix friends
Let's make Zabbix configuration data easier to handle — together.
Thanks for reading!
— Sergiu, Creator of ZbxWizz