_ _ _ _ ______ _| |__ | |__ (_)_ __ _ __| |__ |_ / _` | '_ \| '_ \| \ \/ /____| '__| '_ \ / / (_| | |_) | |_) | |> <_____| | | |_) | /___\__,_|_.__/|_.__/|_/_/\_\ |_| |_.__/
I threw this together this afternoon. It’s absulotely untested. I only just corrected a few syntax errors.
Zabbix::Sender::Easy.run(:"com.yammer.cron.brithday_email_job") do |zbx| Users.each_with_index do |user, idx| HappyBirthday.send if user.birthday? ## let zabbix know we're alive every N users, whatever zbx.send_heartbeat if idx % N == 0 end end
zbx = Zabbix::Sender.new zbx.send_start(:"com.yammer.cron.birthday_email_job") Users.each_with_index do |user, idx| HappyBirthday.send if user.birthday? ## let zabbix know we're alive every N users, whatever zbx.send_heartbeat if idx % N == 0 end zbx.send_stop(:"com.yammer.cron.birthday_email_job")
zbx = Zabbix::Sender.new(config_file: nil) # uses the default config file on the system
-
Fork the project.
-
Make your feature addition or bug fix.
-
Add tests for it. This is important so I don’t break it in a future version unintentionally.
-
Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
-
Send me a pull request. Bonus points for topic branches.
-
Updated to require 2.3.8+ (currently supported branch minus one)
-
Requires juwelier (tested with 2.4.9) … once that’s installed, the ‘check_dependencies` rake task will prompt for others
-
edit ‘test/zabbix_agentd.conf` and set `Server=` to your actual server if you want the tests to pass
-
does not notify for Successful submissions that are Failed by the server
“‘{“response”:“success”,“info”:“processed: 0; failed: 1; total: 1; seconds spent: 0.000019”}“`
-
config reads lots of things, but doesn’t expose or utilize them (bind IP, etc.)
-
tests are local environment specific
-
CI stuff is local-installation dependent.
Copyright © 2010 Matthew Knopp. See LICENSE for details.