Git Product home page Git Product logo

nagira's Introduction

Name

Nagira – Nagios RESTful API

Version {include:file:version.txt}

Description

Light-weight web services API for fetching status of Nagios application objects:

  • Objects file: hosts, services, contacts, (host|service|contact)groups, escalations, etc.

  • Status file: hoststatus, servicestatus, etc.

USAGE

  1. Run Sinatra application ./app.rb

  2. Use HTTP client to get information:

    curl localhost:4567/objects/contact/list

    curl localhost:4567/status/list

See more in {file:FEATURES.rdoc}

Documenation

YARD documentation included with project, run ./jardoc in project’s root. Generatied YARD docs are available at dmytro.github.com/nagira/doc

How and why?

Provide simple and consistent way for information exchange with Nagios

First goal is to provide read-only access to the objects/object states by parsing 2 status files in Nagios: status.dat and objects.cache, later add check result submission interface (as in NSCA) and Nagios configuration.

objects.cache file keeps information about Nagios configuration (lists of servers, services, groups etc), while status.dat file is file that stores information about current state of the objects (hosts and services) and Nagios process itself.

If necessary at a later stages this could be implemented using Nagios’ NEB inteface, but the disadvantage of the NEB API is that it could block Nagios process and introduce latencies in Nagios.

File parsing obviously takes resources for each single parse, however if application – Rails, Sinatra or similar – is able to keep state of the parser, is not a problem. IF application can keep track of file parse times and file modification time it is possible to parse file only if it was changed and infrequently enough.

Roadmap blueprint

When implemented API could provide foundation for development of well-defined, modular, distributed Nagios monitoring: distributed Nagios nodes communicating with each other, retrieving status and submitting check results, distributed, load-balanced, fault tolerant configuration.

Web GUI (IMHO weakest part of the Nagios) could be completely de-coupled from Nagios core and is not required to run on the Nagios core host.

First stage

Read-only (GET) routes to access lists of monitored objects and states of the objects.

There are examples of various Nagios interfaces: NDOUTILS, IdoUtils, MK_Livestatus. This is an attempt to do similar things using web services API.

Second stage

Replace NCSA passive checks submission mechanism with HTTP(S).

Later stages

Still not sure how to implement this (requires Nagios restarts/reloads) POST/PUT/DELETE interfaces for configuring Nagios.

This is still far away…

Author

Dmytro Kovalov, [email protected]

2011, Dec, 26th - started

nagira's People

Contributors

dmytro avatar damnitjim avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.