README.md in zabbix-ruby-client-0.0.14 vs README.md in zabbix-ruby-client-0.0.15
- old
+ new
@@ -8,10 +8,27 @@
The development is still in progress but it produces results and works in my case. Use at your own risk and read the code first. It is developed under ruby 2 but should work on 1.9.3 as well.
Check the [Changelog](CHANGELOG.md) for recent changes, code is still under huge development and is likely to move a lot until version 0.1.
+## Why ?
+
+Yes why use zabbix ruby client with zabbix-sender rather than zabbix-agent ?
+
+There are various reasons for that. But the purpose of this tool ultimately is to fulfill the functions of the zabbix-sender, reducing the requirement of installation to only the zabbix ruby client.
+
+There are compromises that make this use of the sender with zabbix ruby client pertinent:
+
+* you prefer to rely on a cronjob rather than on a daemon for data collection
+* you don't mind having a minimum time between data collection of 1 minute (cron don't handle seconds)
+* you want to specify your discovery at client level rather than at server level. When I first used auto discovery for interfaces or file systems, it was discovering such a huge number of things with such a wide inconsistency of naming that it was pretty hard to think about a regexp to limit what was pertinent or not. Sometimes a discovery rule would need to have a regexp per host, which zabbix don't permit, or it gets very complicated. In a very diverse context, declarative discovery is much simpler.
+* you already have ruby installed on all your servers (which is the case if you use chef or puppet)
+
+The objectives for version 0.1 of zabbix ruby client are to be able to handle dropping connection by buffering the data collection and send all what was not sent the next time it's possible. So there should be no real difference on that feature with the agent.
+
+At some point all zabbix ruby client plugins will be usable by the agent as well, actually, so it should not make any difference. But the initial setup I have in my infrastructure led me to chose the sender rather than the agent. But that will be later on when the code will get better abstraction. For now I just want it to work and collect my data. Which it does. The full compatibility for use by the agent would probably be a target for version 0.2.
+
## Installation
Install it yourself as:
gem install zabbix-ruby-client
@@ -51,11 +68,11 @@
* * * * * /bin/zsh -c ". $HOME/.rvm/scripts/rvm && cd $HOME/zrc && bundle exec zrc upload"
0 * * * * /bin/zsh -c ". $HOME/.rvm/scripts/rvm && cd $HOME/zrc && bundle exec zrc upload -t hourly.yml"
0 0 1 * * /bin/zsh -c ". $HOME/.rvm/scripts/rvm && cd $HOME/zrc && bundle exec zrc upload -t monthly.yml"
-## plugins
+## Plugins
There are a set of standart plugins included in the package, aimed at linux systems.
* ubuntu system stats ([system_tpl](master/zabbix-templates/system_tpl.xml) includes the following)
* load (uses /proc/loadavg) [load_tpl](master/zabbix-templates/load_tpl.xml)
@@ -68,11 +85,11 @@
* apt (uses ubuntu /usr/lib/update-notifier/apt-check) this one will populate the 'tag' field in host info, and is supposed to run every few hours or at least not every minute [apt_tpl](master/zabbix-templates/apt_tpl.xml)
* sysinfo (uses uname -a) is populating the host info in the inventory, and should be ran at setup and/or monthly [sysinfo_tpl](master/zabbix-templates/sysinfo_tpl.xml)
* apache (depends on mod_status with status_extended on) [apache_tpl](master/zabbix-templates/apache_tpl.xml)
* mysql (uses mysqladmin extended-status) [mysql_tpl](master/zabbix-templates/mysql_tpl.xml)
* nginx (requires httpStubStatus nginx module) [nginx_tpl](master/zabbix-templates/nginx_tpl.xml)
-* redis (uses redis-cli info) [redis_tpl](master/zabbix-templates/redis_tpl.xml) (unfinished)
+* redis (uses redis-cli info) [redis_tpl](master/zabbix-templates/redis_tpl.xml)
* args [ "/path/to/redis-cli", "options to connect" ]
You can add extra plugins in a plugins/ dir in the working dir, just by copying one of the existing plugins in the repo and change to your need. All plugins present in plugins/ will be loaded if present in the config file you use. That can be convenient to test by using the -t flag, for example `bundle exec zrc -t testplugin.yml` where testplugin.yml only contains the name and args for yoiur plugin.
## Custom plugins how-to
@@ -118,9 +135,13 @@
```
$ bundle exec zrc show -t myplugin.yml
myhost myplugin[item] 1381669455 something 42
```
+
+## What is server or network goes down ?
+
+The zabbix ruby client has a pending system, that keeps the data if it was not sent, for sending it in the next iteration. Data is kept at each iteration until it's delivered (experimental feature).
## Note about security
As you may already know, Zabbix is not very concerned about securing exchanges between agent and server, or sender and server. A cautious sysadmin will then properly manage his setup using ssh tunneling.