README.md in zabbix-ruby-client-0.0.8 vs README.md in zabbix-ruby-client-0.0.9

- old
+ new

@@ -27,31 +27,45 @@ # then edit config.yml according to your needs bundle exec zrc # to list available commands - bundle exec zrc show + bundle exec zrc show # to test the data collection -And when ready just install a cron task according to your environment +## Setting up cronjobs +When ready just install a cron task according to your environment + echo '* * * * * /bin/bash -lc "cd /path/to/zrc && bundle exec zrc upload"' | crontab # or echo '* * * * * /bin/zsh -c ". $HOME/.rvm/scripts/rvm && cd /path/to/zrc && bundle exec zrc upload"' | crontab # or echo '* * * * * /bin/zsh -c "export RBENV_ROOT=/usr/local/var/rbenv && eval \"$(rbenv init - zsh)\" && cd /path/to/zrc && bundle exec zrc upload"' | crontab +By default `zrc show` and `zrc upload` will read config.yml (for the general config) and minutely.yml (for the list of plugins to run). + +You can use -c to specify another config file, and -t to use another list of plugins. The `zrc init` command will create sample minutely.yml, hourly.yml and monthly.yml but you can create any arbitrary list of plugins, that can be used in your cronjobs. + +Here is an example setup using the files generated by the init: + + * * * * * /bin/zsh -c ". $HOME/.rvm/scripts/rvm && cd $HOME/zrc && bundle exec zrc upload" + 0 */6 * * * /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 There are a set of standart plugins included in the package, aimed at linux systems. -* linux system stats ([system_tpl](master/zabbix-templates/system_tpl.xml) includes the floowing) +* 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) * cpu (uses /proc/stat) [cpu_tpl](master/zabbix-templates/cpu_tpl.xml) * memory (requires iostat, apt-get install sysstat) [memory_tpl](master/zabbix-templates/memory_tpl.xml) * disk (uses /proc/diskstats) [disk_tpl](master/zabbix-templates/disk_tpl.xml) * network (uses /proc/net/dev) [network_tpl](master/zabbix-templates/network_tpl.xml) + * 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) You can add extra plugin directories in the configuration file. ## Todo @@ -68,10 +82,10 @@ * logged users * denyhosts * postfix * sendgrid * airbrake - * disk occupation + * disk occupation (done) * try to work out a way to create host/graphs/alerts from the client using Zabbix API * verify compatibility with ruby 1.9 ## Contributing