ZABBIX Forums  
Old 03-02-2011, 16:35
agentguerry agentguerry is offline
Join Date: Jul 2009
Posts: 45
Question Exporting list of Hostnames in Zabbix

Hi all,

I am trying to find the easiest way to export a list of all the hostnames in my zabbix database, either by the gui, or possibly in the mysql database.

Could anyone point me in the right direction for this?

I just want to pull the hostnames/servernames, and put them into an excel or even a txt document.

Thank you in advance,

Reply With Quote
Old 03-02-2011, 18:39
trikke trikke is offline
Senior Member
Join Date: Aug 2007
Location: CH-Basel
Posts: 140

easy one:

/opt/mysql/bin/mysql -u <user> -p <password> <db-name> "select name,dns,ip from hosts ;"

Lists the Zabbix Name, the DNS-name of this host and the IP of this host.

Reply With Quote
Old 03-02-2011, 20:06
nelsonab nelsonab is offline
Senior Member
Zabbix certified professionalZabbix certified specialist
Join Date: Sep 2006
Location: Virginia
Posts: 1,220

in zabcon:
get host

If you have more than 100 hosts you will need to up the limit for example
get host limit=200

If you want to do it from the command line

echo "get host limit=200" | zabcon.rb --no-echo --no-header
RHCE, author of zbxapi
Ansible, the missing piece (Zabconf 2017):
Zabbix and SNMP on Linux (Zabconf 2015):

Reply With Quote
Old 03-02-2011, 20:20
agentguerry agentguerry is offline
Join Date: Jul 2009
Posts: 45

Thanks Trikke!

Worked wonderfully!
Reply With Quote

export, hostname, mysql, zabbix 1.8.3

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 14:01.