[ZBXNEXT-10] Need a command-line import/export facility Created: 2008 Jan 14 Updated: 2020 Mar 29 |
|
Status: | Open |
Project: | ZABBIX FEATURE REQUESTS |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | New Feature Request | Priority: | Major |
Reporter: | Marty Shannon | Assignee: | Unassigned |
Resolution: | Unresolved | Votes: | 66 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Feature missing from 1.4.4. |
Issue Links: |
|
Description |
I'd like to have a facility for import/export on the Zabbix server itself. As it stands now, using the web-based import/export is limited by the bandwidth between my laptop and the Zabbix server; sometimes that is as low as modem speeds (painful!). |
Comments |
Comment by Cal Sawyer [ 2009 Sep 10 ] |
Very good idea, esp if it included status reporting. Very large imports/exports can take a long time to complete or exceed the PHP memory cache. Also would help keep exported data local to the system instead of loading to user's local system. |
Comment by Dmitry Maksimov [ 2010 Jan 14 ] |
Very good idea. I need dynamic items, triggers and graphs for monitoring different network equipment. For example: I need print Port Description in the title of graphs. Port Description is changing during the time. |
Comment by Cal Sawyer [ 2010 Jan 14 ] |
I was under the (probably mistaken) impression that this was going to be implemented in 1.8? Import/export is limited by network bandwidth and PHP upload_max_filesize. There is no feedback during the process, so you can wait a very long time before the process bombs out with errors. It is virtually impossible for me to export even a small portion of my installation. It seems to me that Apache-PHP is the limiting factor here - command-line i/o that doesn't depend on other subsystems would be way more efficient. |
Comment by Raymond Kuiper [ 2011 Apr 13 ] |
I believe nelsonab is working on a zabcon extention for this? |
Comment by richlv [ 2011 Apr 24 ] |
probably the most feasible approach is to have an api call to send xml to it, then other tools like zabcon could just pass xml to the api. of course, php limits would still apply, thus maybe there should be an api call to get max upload filesize so that external tools could check immediately that process will not error out ? |
Comment by nelsonab [ 2011 May 08 ] |
Adding full XML import to Zabcon is in the works using the existing API, when XML import is added to the API Zabcon will be fixed to allow for that. |
Comment by Lauri Pitkänen [ 2011 May 10 ] |
Sorry but I think that the mentioned Zabcon feature should be another (useful) feature request. But this ZBXNEXT-10 request should be strictly about command line C-programs like "zabbix_import" and "zabbix_export" that import or export the XML-files with the same schema as the web interface ones directly to the database without using the API. For example we have thousands of hosts that we need to import automatically on a daily basis. Currently we use custom made HTTP client to handle the import through web-interface. It takes 1.5 hours to import all hosts. We almost started a project to import our data directly to the Zabbix database but I guess we should finally sponsor this missing core feature. |
Comment by richlv [ 2011 May 18 ] |
wouldn't it be better to make api perform better, thus making it the only externally automated interface ? |
Comment by Raymond Kuiper [ 2011 May 18 ] |
I agree that concentrating on API is a logical approach. However, a lot of users don't have time for (or interest in) researching the inner workings of the API interface just to load a bunch of templates. So it would still be very handy if a small tool command line tool could be provided to easily bulk import/export multiple XML templates. I don't think it would be a problem if this tool would use the API functionality under the hood. |
Comment by Vance Turner [ 2012 Jan 05 ] |
I was a key deployment engineer at BMC and wrote the Excel/Perl/command Line integration toolset that imports and exports the system wide configurations of the monitoring. If I could get zapcon and get it working, it doesn't take a lot for me to migrate the perl to the zapcon command. What I would need help with is the queries to the mysql or other databases to export the data back into excel. Any takers? |
Comment by richlv [ 2012 Aug 10 ] |
api now has import/export feature which accepts xml directly. |
Comment by Raymond Kuiper [ 2012 Aug 30 ] |
Nelsonab, any plans of including the new xml api functionality in Zabcon? |
Comment by richlv [ 2012 Aug 30 ] |
you can actually do that with zabcon, raw json and some parsing |
Comment by Raymond Kuiper [ 2012 Aug 30 ] |
Yes, but that would require json knowledge...in that case we could just as well use curl |
Comment by Raymond Kuiper [ 2012 Aug 30 ] |
My point here is that we need a 'simple' way of doing this to people who don't code can issue a simple command in a terminal window and get a download of the templates they wanted. Zabcon can fill that gap (easy to setup and the build in commands are fairly simple). |
Comment by Diego Narducci Arioza [ 2017 Sep 26 ] |
news ? |
Comment by Andrea Biscuola [ 2020 Mar 29 ] |
Just to spam a project I was working on to solve this kind of problems: https://github.com/abiscuola/zc-portable If anybody wants/needs help, just write me. |