Fork me on GitHub

Лупайте сю скалу...

Іван Франко


 RSS | Atom

19 June 2015

TOP »

Selected projects See all »

Banalize: Bash static code analyzerDBIx::Report::ExcelShell settings, AKA dotfilesNagios Monitoring for Couchbase serverNagira: RESTful API for NagiosStartpack for Github pages developmentWeb iPhoto

Travel Blog Витрішки »

Україномовний блог Витрішки - блог про все, крім роботи. Цикл статей "Літо на півночі Японії" з цього блогу тепер опублікований у Витрішках

Computer Blog All posts »

iPhoto and files permission Is MacOSX 10.9 == MacOS 9.x? Running Chef roles from Capistrano und Capiche Github & Jekyll: Speeding up Jekyll siteGithub & Jekyll: More experience with Jekyll and setup changesBuild new hosts with Capistrano and Chef Request Tracker: More about custom CSS for RT4Ruby 2 test drive Nagira v0.2.5 release It's UNIX my dear Watson

Slides See all »

Nagira @TLUG, 2012Rspec and Guard

About

Ярило Yarylo, Jarilo me @ github me @ CPAN Dmytro (CV)

Nagira: RESTful API for Nagios
Table Of Contents

Users say

Nagira rocks!!
I am deploying your Nagira on top of our Nagios infrastructure in our 5 dc. around the globe. So far i feel thankful that you created this bad boy.
It's allow me to write checks in cluster point of view much easier, and I am able to combine host/cluster/service status from Nagios server around the globe into one dashboard!!!
   Patai

News

  • Aug 26 2013 -- v.0.3.x started New feature - custom configurable hostname regular expression. See Release history
  • Aug 08 2013 -- Nagira v.0.2.12 released Implementation for new comments endpoints. See details in Release history
  • Mar 27, 2013 -- Nagira 0.2.6 released See details in Release history
  • Mar 18, 2013 -- Ruby 2.0.0 support Nagira tested with Ruby 2.0.0 RVM installation and added to Travis CI configuration. All tests passing.
  • Mar 15, 2013 - Released version 0.2.5 See more

All news »

Description

Nagira is Ruby/Sinatra light-weight web services API for accessing and operating data of Nagios hosts and services, accessing Nagios configuration.

Nagira works with following data:

  • Objects cache file: hosts, services, contacts, hostgroups, servicegroups, contactgroups, escalations, etc.
  • Status file: hoststatus, servicestatus, etc.
  • Submit passive check results to Nagios.
  • Read Nagios server configuration.

Usage

Use HTTP client to get object configuration or status information:

    curl http://localhost:4567/objects/contact/list
    curl http://localhost:4567/status/list
    curl http://localhost:4567/status.json
    curl http://localhost:4567/status.xml

Submit passive checks to Nagios

    curl -X PUT -H "Content-type: application/json;" \
        -d @host_check.json http://nagios.example.com:4567/_status/web_server

    {
      "status_code":"0",
      "plugin_output" : "ping OK"
     }

Or use Nagira as data source for Rails application with ActiveResource

class Service < ActiveResource::Base
  self.site = "http://localhost:4567/_status/"
  self.element_name = "service"
end

...

@services = Service.all

Documenation

See YARD documentation

Monitoring patterns for Nagios with Nagira API

Nagira presentation

This presentation was given and recorded live on Tokyo Linux Users Group (TLUG) on January 26th, 2013.

Author

Dmytro Kovalov (dmytro.kovalov@gmail.com)

Source code





дмитро ковальов
dmytro @ github
dmytro.sytes.net