Skip to content

Commit 7de4687

Browse files
[ADD] Example CSV files, updated documentation, updated manifest files
1 parent 0551fe9 commit 7de4687

10 files changed

+26
-10
lines changed

README.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ You can find the latest versions for the respective Zabbix releases on the [Gith
1414

1515
## Requirements
1616

17-
- Zabbix 6.0, 6.2 or 6.4
17+
- Zabbix 6.0, 6.2, 6.4 or 7.0
1818
- File write access to the Zabbix frontend server
1919
- Super admin permissions for the Zabbix users that want to use the frontend module
2020

@@ -24,7 +24,7 @@ For Debian and Ubuntu server, the Zabbix Frontend modules are usually placed in
2424

2525
Copy the folder `modules/csv-host-importer` to `/usr/share/zabbix/modules/csv-host-importer` on the Zabbix frontend web server.
2626

27-
**Note:** If you're using Zabbix 6.4, you'll need to remove `manifest.json` and rename `manifest.v2.json` to `manifest.json`.
27+
**Note:** If you're using Zabbix 6.2 or 6.0, you'll need to remove `manifest.json` and rename `manifest.v1.json` to `manifest.json`.
2828

2929
Then go to `Administration`, `General`, `Modules`, click `Scan directory` and enable the new module in the list.
3030

@@ -39,6 +39,8 @@ example1;Example Host Agent;First host group, second host group;Linux by Zabbix
3939
example2;Example Host SNMP;Third host group;Generic by SNMP;;;127.0.0.1;localhost;2;Example SNMPv2 host
4040
```
4141

42+
You can find more specific examples in the [examples directory](./examples/).
43+
4244
The following CSV columns are supported:
4345

4446
| Name | Purpose | Default | Optional |
@@ -136,7 +138,7 @@ Additional hints:
136138

137139
* The columns are case-insensitive, so ``NAME``, ``name`` and ``NaMe`` are all valid.
138140
* The columns must be in the first line of the CSV file.
139-
* The separator character must be ";".
141+
* The separator character must be the same as in the import dialog and can either be a semicolon, comma or a tabulator.
140142

141143
The CSV file can then be imported in the same menu entry. You get a chance to preview the host list before the actual import.
142144

examples/example_inventory.csv

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
NAME;HOST_GROUPS;INV_ALIAS;INV_ASSET_TAG;INV_CHASSIS;INV_CONTACT;INV_CONTRACT_NUMBER;INV_DATE_HW_DECOMM;INV_DATE_HW_EXPIRY;INV_DATE_HW_INSTALL;INV_DATE_HW_PURCHASE;INV_DEPLOYMENT_STATUS;INV_HARDWARE;INV_HARDWARE_FULL;INV_HOST_NETMASK;INV_HOST_NETWORKS;INV_HOST_ROUTER;INV_HW_ARCH;INV_INSTALLER_NAME;INV_LOCATION;INV_LOCATION_LAT;INV_LOCATION_LON;INV_MACADDRESS_A;INV_MACADDRESS_B;INV_MODEL;INV_NAME;INV_NOTES;INV_OOB_IP;INV_OOB_NETMASK;INV_OOB_ROUTER;INV_OS;INV_OS_FULL;INV_OS_SHORT;INV_POC_1_CELL;INV_POC_1_EMAIL;INV_POC_1_NAME;INV_POC_1_NOTES;INV_POC_1_PHONE_A;INV_POC_1_PHONE_B;INV_POC_1_SCREEN;INV_POC_2_CELL;INV_POC_2_EMAIL;INV_POC_2_NAME;INV_POC_2_NOTES;INV_POC_2_PHONE_A;INV_POC_2_PHONE_B;INV_POC_2_SCREEN;INV_SERIALNO_A;INV_SERIALNO_B;INV_SITE_ADDRESS_A;INV_SITE_ADDRESS_B;INV_SITE_ADDRESS_C;INV_SITE_CITY;INV_SITE_COUNTRY;INV_SITE_NOTES;INV_SITE_RACK;INV_SITE_STATE;INV_SITE_ZIP;INV_SOFTWARE;INV_SOFTWARE_APP_A;INV_SOFTWARE_APP_B;INV_SOFTWARE_APP_C;INV_SOFTWARE_APP_D;INV_SOFTWARE_APP_E;INV_SOFTWARE_FULL;INV_TAG;INV_TYPE;INV_TYPE_FULL;INV_URL_A;INV_URL_B;INV_URL_C;INV_VENDOR
2+
example_inventory;First host group;Inventory Alias;Inventory Asset tag;Inventory Chassis;Inventory Contact person;Inventory Contract number;Inventory HW decommissioning date;Inventory HW maintenance expiry date;Inventory HW installation date;Inventory HW purchase date;Inventory Deployment status;Inventory Hardware;Inventory Detailed hardware;Inventory Host subnet mask;Inventory Host networks;Inventory Host router;Inventory HW architecture;Inventory Installer name;Inventory Location;Location lat;Location long;Inventory MAC address A;Inventory MAC address B;Inventory Model;Inventory Name;Inventory Notes;Inventory OOB IP address;Inventory OOB host subnet mask;Inventory OOB router;Inventory OS name;Inventory Detailed OS name;Inventory Short OS name;Inventory Primary POC mobile number;Inventory Primary email;Inventory Primary POC name;Inventory Primary POC notes;Inventory Primary POC phone A;Inventory Primary POC phone B;Inventory Primary POC screen name;Inventory Secondary POC mobile number;Inventory Secondary POC email;Inventory Secondary POC name;Inventory Secondary POC notes;Inventory Secondary POC phone A;Inventory Secondary POC phone B;Inventory Secondary POC screen name;Inventory Serial number A;Inventory Serial number B;Inventory Site address A;Inventory Site address B;Inventory Site address C;Inventory Site city;Inventory Site country;Inventory Site notes;Inventory Site rack location;Inventory Site state;Inventory Site ZIP/postal code;Inventory Software;Inventory Software application A;Inventory Software application B;Inventory Software application C;Inventory Software application D;Inventory Software application E;Inventory Software details;Inventory Tag;Inventory Type;Inventory Type details;Inventory URL A;Inventory URL B;Inventory URL C;Inventory Vendor

examples/example_macros.csv

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
NAME;HOST_GROUPS;HOST_MACROS
2+
example_macros;First host group;{$EMPTY_MACRO}|{$FIRST_MACRO}=with value|{$SECOND_MACRO}=Equals=allowed

examples/example_proxy.csv

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
NAME;HOST_GROUPS;PROXY
2+
example_proxy;First host group;Test Proxy

examples/example_separator_comma.csv

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
NAME,VISIBLE_NAME,HOST_GROUPS,HOST_TAGS,TEMPLATES,AGENT_IP,AGENT_DNS,SNMP_IP,SNMP_DNS,SNMP_VERSION,DESCRIPTION
2+
example_separator_comma,Example Host Comma,First host group|Second host group,,Linux by Zabbix agent,127.0.0.1,localhost,,,,Example Zabbix Agent host

examples/example_separator_tab.csv

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
NAME VISIBLE_NAME HOST_GROUPS HOST_TAGS TEMPLATES AGENT_IP AGENT_DNS SNMP_IP SNMP_DNS SNMP_VERSION DESCRIPTION
2+
example_separator_tab Example Host Tab First host group|Second host group Linux by Zabbix agent 127.0.0.1 localhost Example Zabbix Agent host

examples/example_snmp.csv

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
NAME; VISIBLE_NAME; HOST_GROUPS; SNMP_IP; SNMP_DNS; SNMP_VERSION; SNMP_COMMUNITY
2+
example_snmp; Test SNMP; First host group; 127.0.0.1; localhost; 2; TestCommunityString

examples/example_tag.csv

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
NAME;HOST_GROUPS;HOST_TAGS
2+
example_tags;First host group;First tag|Second tag=with value|Third tag=Equals=allowed|Empty tag=

modules/csv-host-importer/manifest.json

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
2-
"manifest_version": 1,
2+
"manifest_version": 2,
33
"id": "intellitrend_csv_host_importer",
4+
"type": "module",
45
"name": "CSV Host Importer",
56
"version": "6.2.1",
67
"namespace": "ICHI",
@@ -16,7 +17,5 @@
1617
"class": "CSVHostImportExample",
1718
"layout": "layout.ichi.example"
1819
}
19-
},
20-
"config": {
2120
}
22-
}
21+
}

modules/csv-host-importer/manifest.v2.json renamed to modules/csv-host-importer/manifest.v1.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
2-
"manifest_version": 2,
2+
"manifest_version": 1,
33
"id": "intellitrend_csv_host_importer",
4-
"type": "module",
54
"name": "CSV Host Importer",
65
"version": "6.2.1",
76
"namespace": "ICHI",
@@ -17,5 +16,7 @@
1716
"class": "CSVHostImportExample",
1817
"layout": "layout.ichi.example"
1918
}
19+
},
20+
"config": {
2021
}
21-
}
22+
}

0 commit comments

Comments
 (0)