ZABBIX Forums  
  #1  
Old 23-10-2009, 11:31
nelsonab nelsonab is offline
Senior Member
ZABBIX Certified Specialist
 
Join Date: Sep 2006
Location: Virginia
Posts: 811
Blog Entries: 20
Default Zabbix now has a CLI tool!

Sorry for the cross-post, but since this is a few tool for use with 1.7 I felt it best to post this here too.

After some deliberation and discussion with Richlv I've decided to name the CLI tool Zabcon.

Since the tool was announced a fair amount of progress has been made. It is now possible to add, edit, update and delete a user a user. Show items, hosts, and host groups. Work is being done to allow for adding and deleting of hosts and items. It will also be possible to edit existing items in the near future.

And if all that is not enough, it is possible to pipe your commands into the tool from within a shell script!

Attached is a screen shot giving you all an idea of where we are so far.

Please head over the the site I have setup to for development and take a look. I also encourage you to download Zabcon and provide some feedback. Zabcon has been tested to work under both Linux and Windows.

A Trac site has been setup to support the development efforts, on the main page there are also instructions for downloading from the subversion repository.
http://trac.red-tux.net
Attached Images
 
__________________
-------
Author of Zabcon, the Zabbix Cli Tool, and the Zabbix API Ruby Library
http://trac.red-tux.net

Also check out the section of community submitted scripts! http://trac.red-tux.net/browser/community
Reply With Quote
  #2  
Old 23-10-2009, 11:53
MrKen MrKen is offline
Senior Member
 
Join Date: Oct 2008
Location: Phnom Penh, Cambodia
Posts: 512
Default

Quote:
Originally Posted by nelsonab View Post
And if all that is not enough, it is possible to pipe your commands into the tool from within a shell script!
This is all very interesting and exciting!

Pipe commands into the tool from within a script. What about this scenario?
A trigger fires, the Action calls a script, the script calls on Zabcon to enable or disable an item. [I'm thinking here about Switch ports, when the ifOperStatus changes, to auto enable/disable the port].

Looking forward to giving it a whirl! And many thanks to you for your fine efforts nelsonab.

BR/MrKen
Reply With Quote
  #3  
Old 23-10-2009, 12:21
nelsonab nelsonab is offline
Senior Member
ZABBIX Certified Specialist
 
Join Date: Sep 2006
Location: Virginia
Posts: 811
Blog Entries: 20
Default

Soon that will be quite possible :-)

One thing to note, if you're going to use it within a script you'll need to login to the server first. The easiest way to accomplish this is to setup a conf file, and then issue the command "load config" first.

example:
Code:
echo -e load config\\n get user | ./zabcon
x86_64-linux
Welcome to the Zabbix CLI Tool.
Use the command 'help' to get help on commands
http://localhost connected
User result set
+--------+----------+
| userid | alias    |
+--------+----------+
| 40     | "a=b"    |
| 1      | Admin    |
| 2      | guest    |
| 3      | nelsonab |
| 4      | apitest  |
+--------+----------+
5 rows total
__________________
-------
Author of Zabcon, the Zabbix Cli Tool, and the Zabbix API Ruby Library
http://trac.red-tux.net

Also check out the section of community submitted scripts! http://trac.red-tux.net/browser/community
Reply With Quote
  #4  
Old 23-10-2009, 13:42
Alexei Alexei is offline
Zabbix developer, product manager
 
Join Date: Sep 2004
Location: Riga, Latvia
Posts: 5,156
Blog Entries: 11
Default

Great tool! The release notes for Zabbix 1.7.1 has a reference to this thread.
__________________
Alexei Vladishev
Author of Zabbix, Product manager
Riga, Latvia
My Blog
Reply With Quote
  #5  
Old 23-10-2009, 14:25
zabbix_zen zabbix_zen is offline
Senior Member
 
Join Date: Jul 2009
Location: Portugal
Posts: 287
Send a message via MSN to zabbix_zen
Default

I think all the community thanks you for your efforts nelsonab.
Missed that tool for a long time!

Congrats
Reply With Quote
  #6  
Old 31-10-2009, 08:10
nelsonab nelsonab is offline
Senior Member
ZABBIX Certified Specialist
 
Join Date: Sep 2006
Location: Virginia
Posts: 811
Blog Entries: 20
Default

A quick little update for folks, we just had our 100th commit and now we're up to three active developers.

Some recent changes in no particular order, host.add, import from xml file, command line start options basic trigger manipulation, and improved output handling.

Expect to see a lot more neath things from Zabcon over the next few weeks!
__________________
-------
Author of Zabcon, the Zabbix Cli Tool, and the Zabbix API Ruby Library
http://trac.red-tux.net

Also check out the section of community submitted scripts! http://trac.red-tux.net/browser/community
Reply With Quote
  #7  
Old 31-10-2009, 22:05
richlv richlv is offline
Super Moderator
ZABBIX Certified Specialist
 
Join Date: Oct 2005
Posts: 1,782
Default

two developers. and one pedantic fiddler.
Reply With Quote
Reply

Tags
cli, cli tool, zabcon

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 16:56.