Tag Archive for 'API'

Exploring the New JSON CGIs in Nagios Core 4.0.7! (Part 1)

The JSON CGIs, from the JSON branch of core, have been officially released with Nagios Core 4.0.7!

The original design goals were:

  1. To provide all information available in current CGIs in JSON format.
  2. Place the presentation responsibility on the client to minimize network traffic and server load.
  3. Perform operations on the server side that are significantly more easily done there.
  4. Spark community developers to create new Nagios Core UI’s from the easy to work with JSON from the CGIs.

The CGIs provide an API to query object, status, and historical information through GET requests.  They use the same authentication as other CGIs.  Once queried, they return valid JSON that can be parsed into JavaScript objects for client side models and processing.  The API is very robust, providing multiple ways to limit queries – name/descriptions, host/service groups,  update/changes times, among many others.

The three new CGIs are:

  1. objectjson.cgi  (object configuration)
  2. statusjson.cgi  (status information)
  3. archivejson.cgi  (historical logs)

Additionally, a new web app is included – jsonquery.html & jsonquery.js.  This is a small UI for crafting GET requests, it can be used to trial specific parameters for GET requests, or to just explore the api.  It is also the easiest way to get acquainted with the new CGIs.

Continue reading ‘Exploring the New JSON CGIs in Nagios Core 4.0.7! (Part 1)’

Documentation: Nagios XI Component Development

Here at Nagios Enterprises we do our best to add new features and components that meet the needs of the community and our customer base.  We get new feature requests every week, but sometimes the request is something we’re not able to fulfill in time, or the customer’s need requires a more “home grown” solution to fit the needs of their environment.  For that reason, we’ve created some documentation for getting started with Nagios XI Component Development.  The document covers some basic concepts in XI component development that would be needed regardless of what the component does, and is intended for development and administrators who are already familiar with programming concepts.  This document covers the following topics:

  • Example Component Code
  • General Developer Guidelines
  • Setting Up XI For A Development Environment
  • Component Registration and Initialization
  • Using The Backend API To Get XML Data
  • Adding XI’s CSS and Javascript

This document is available on the Nagios Library.

Nagios XI Component Development