Giter Club home page Giter Club logo

ngsh's Introduction

OVERVIEW

The Nagios Shell (ngsh) provides a CLI interface to work with the Nagios daemon. It provides querying capabilities about the running configuration, as well a start/stop/restart/reload actions (currently slanted towards Solaris SMF). Its querying capabilities Mathias Kettner’s excellent [MK Livestatus](mathias-kettner.de/checkmk_livestatus.html) Nagios module.

REQUIREMENTS

SYNOPSIS

ngsh [options] <action> [<arguments>]

where actions are one of:

* start: start Nagios daemon
* stop: stop Nagios daemon
* restart: restart Nagios daemon (full restart)
* reload|hup: reload Nagios configuration (w/out restart)
* status: outputs Nagios status acording to SMF
* pid: outputs pid of Nagios daemon
* reap: reaps Nagios Plugins defunct processes
* find: find hosts and/or services
* query: query attributes about a service (all hosts), host (all services) or service/host pair
* list: list hosts, services or servicegroups
* enable: enable notifications
* disable: disable notifications

and options include:

* -d: debug mode
* -n: dry-run mode
* -v: verbose mode
* -f pipe|row: query results output format

CONFIGURATION

There is currently no configuration file for ngsh. Edit ngsh and ngsq to specify the location of the LQL socket.

EXAMPLES

Status

root@nagios:~# ngsh status STATE STIME FMRI online 22:50:08 svc:/application/monitoring/nagios:default

Finding Hosts and/or Services

root@nagios:~# ngsh find snap host:snap0.example.com host:snapmirror0.example.com service:service/snapbaby/client:daily service:service/snapbaby/client:hourly service:snapmirror

Query

root@nagios:~# ngsh query filerstats subzero0.example.com;0;OK;1 subzero1.example.com;0;OK;1 subzero2.example.com;0;OK;1 subzero3.example.com;0;OK;1

root@nagios:~# ngsh query service critical hadoop0;hadoop/worker;2

ngsh's People

Stargazers

Sudharsan Soundararajan avatar Mike avatar Ned McClain avatar Ryan Carter avatar Anthony Scalisi avatar Robert Rezonicnik avatar  avatar Thomas Morse avatar Jim Browne avatar Alexander Knorr avatar  avatar Patrik Ragnarsson avatar Tom Ashley avatar

Watchers

Tim Galyean avatar James Cloos avatar Juri Grabowski avatar James Chang avatar Ares avatar  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.