New release of Nagira RESTful API includes number of important features. Nagira version 0.2.5 is pretty big release, including number of significant changes.
So I decided to jump version a little from 0.2.1 to 0.2.5
And here is all the new wonderful features included in the release:
Background parser
Which speeds up all HTTP requests by parsing of the Nagios status file in separate thread.
If you have a very big Nagios environment, parsing of status.dat file can take up to few seconds. Even though Nagira had a timed-parse feature before -- Nagira kept parsed data in a cache, and was not attempting to parse status more often than once in N seconds, once in a while unlicky user would have to wait for status update for several seconds.
This is eliminated now by parser running in the background and doing its job in separate thread. Meaning that answer to all user queries are fast. This, of course, can put some extra load on the server, since it will need to do the parsing regardless of whether ther are any requests coming, so you need to tune your configuration depending on Nagios environment.
Partial ActiveSupport
Meaning that you can use Nagira now directly from Ruby on Rails application.
ActiveSupport is indeed partial, more to come. Only pluralized nouns of the resources are supported now. What that means is that you can have your model defined like the following and get all your services information by Service.all
:
class Service < ActiveResource::Base
self.site = "http://localhost:4567/_status/"
self.element_name = "service"
end
Only #all
is supported at the moment (or #find(:all)
, which is the same).
Flexible configuration
More run time configuration options and environment varaibles available.
It easier now to control how Nagira is run using shell environment variables instead of going to source code. This makes it easier to use for non Ruby users, as well as simplifies some of the start-up scripts and configurations, since now they are plain files and not ERB templates as it was in the previos releases.
Additionally more configuration options are available in Nagira with thid release.
For the full description of configuration see Nagira documentation and comments in Nagira defaults file. But here's list of configuration options available: port, bind address, UNIX user to run Nagira, RVM setting, TTL for data, enable or disable background parser, log file and Nagios main configuration file locations.
Nagira is gem now
Finally the most important feature of this release is that Nagira is now a Ruby gem. It is available for the standard RubyGems location. It can be downloaded from the site or installed using standard gem way or included into Gemfile
of the Ruby or Ruby on Rails project:
gem install nagira
Nagira relies on ruby-nagios
library for parsing Nagios files. There was a big chunk of custom development, that I did for the ruby-nagios
. Finally all custom development submitted to upstream project, merged in and I can use ruby-nagios
gem instead of relying on my custom git branch. This made easier to refactor Nagira and convert it into gem.
Author
Dmytro Kovalov (dmytro.kovalov@gmail.com)
Source code
- Download nagira in either zip or tar formats ⇒
- Clone nagira with git
$ git clone git://github.com/dmytro/nagira
- or go to nagira's Github repository »