wiki:WikiStart

Red Tux dot Net

A Zabbix community site. Home of the Zabbix API Ruby Library (zbxapi) and Zabcon, Zabbix CLI and the Zabbix Lua patch.

This is a repository of scripts for Zabbix written by Zabbix community members  Nelsonab and others.

If you have a Zabbix related project you would like to have hosted here (for free in almost all cases), let me (nelsonab @ red-tux.net) know!

Mailing List

There is now a mailing list for Zabcon / Zbxapi related needs. To subscribe send an email to zabcon+subscribe (@) googlegroups.com

Otherwise you can view the archive here:  https://groups.google.com/group/zabcon

Installing Zabcon

Installing Zabcon is done via Ruby Gems.

gem install zabcon

This will also install any needed dependencies and will allow you to upgrade as new versions become available.

If you wish to check out the latest revision of the Zabcon code you will still need the zbxapi Gem before the svn version of Zabcon will run.

gem install zbxapi
svn co http://svn.red-tux.net/trunk/ruby/zabcon/

Anonymous ticket/bug reports has been removed

Support is still available

It looks like the scum of the Internet have hit and the ticket system is now getting a decent flood of spam. I hope to change this back at a later time but for now if you have a bug please email me. nelsonab @ redtux.net

Zabcon and the Zabbix Ruby API need your help!

Zabcon and the Zabbix Ruby API are open source projects, as such they live and die by community interaction. If you do or don't like what you see please feel free to make a post in the forum or send me an email (nelsonab @ red-tux.net). Your feedback helps shape where things go. As an example one user had a need for XML imports with Zabcon, so they set off to add such support when the API was brand new in version 1.7 of the Zabbix. Since then the API has changed and that code has become somewhat neglected. This and many other areas could use some help. Got a different feature you want to see implemented, just ask!

Most of all, thank you for stopping by and giving Zabcon a try.

Software List

Zabcon, the Zabbix CLI tool

Zabbix API Wrapper in Ruby

Zabbix Bandwidth reports

Zabcon Example

 +> get host
Host result set
+--------+---------------+
| hostid | host          |
+--------+---------------+
| 10017  | Zabbix Server |
| 10048  | netscreen     |
+--------+---------------+
2 rows total
 +> set var hostid=10017 type=active
hostid : 10017
type : active
 +> add item description="Some item we're monitoring" key="my.key"
Item result set
+--------+----------------------------+--------+
| itemid | description                | key_   |
+--------+----------------------------+--------+
| 22191  | Some item we're monitoring | my.key |
+--------+----------------------------+--------+
1 rows total
 +>

Source Code

To check out the repo, using svn, use the following command

Destination is the directory name you wish to download the repository into, it will be created if it has not been already.

svn co http://svn.red-tux.net/trunk <destination>

If all you are interested in is Zabcon, use the following

svn co http://svn.red-tux.net/trunk/ruby/api <destination>

NEWS

TUE 28DEC2010
The Ruby Zabbix API (zbxapi) has achieved 0.1 version status and is now available as a Ruby Gem, zbxapi. Zabcon is also available as a Ruby Gem and will install all of the required dependencies.

SUN 19DEC2010
Zabcon has seen a few small improvements lately. Zabcon will now look for a configuration file on startup and if found read it by default. Also command line options will override the options in the configuration file. In addition Zabcon will now display csv style output when called as part of a pipe.

example:

~> echo "get user" | ./zabcon.rb
userid,alias
3,apitest
~>

If you receive an error about a login being required be sure you have configured your configuration file correctly.

WED 06OCT2010
Updated download tarball. Zabcon now requires Ruby 1.8.6 or higher.

WED 15SEP2010
Improved Raw API calls, user variables and now a download link to a Zabcon tarball!

WED 15SEP2010
Raw API calls are now available The command is "raw json" and this will allow you to send raw JSON code to the server. Be warned however no syntax checking is performed at this time. You can also utilize the new internal variable "auth" within your JSON calls. To utilize internal variables prefix the name with a $ symbol. Thus you can now perform the following:

raw json {"auth":"$auth","method":"user.get","id":2,"params":{"extendoutput":true,"limit":100},"jsonrpc":"2.0"}

If you do not wish for the $ symbol to be used in a variable prefix it with a \ character.

SAT 17JUL2010
We've UPGRADED!
The version of Trac used for this project has been upgraded from Trac 0.11 to Trac 0.12. There were some issues with eggs but this article helped:  http://ruk.ca/content/importerror-no-module-named-trac

News Archive

About/Contact

If you have a script you would like to see added to this repo please feel free to contact me in the  zabbix forums.
Alternatively you can email nelsonab @ red-tux.net.

A special thank you to  Netrique for providing hosting services for this website.  Netrique is based in the San Francisco bay area specializing in helping companies manage and run their IT needs. Their specialties include Windows and Linux server and desktop support, SPAM filtration and systems monitoring using tools such as Zabbix. You can visit their website at:  www.netrique.com.

Attachments