Giter Site home page Giter Site logo

icli's Introduction

icli - Icinga Command Line Interface

Requires:
 * A local icinga daemon + access to some of its files
 * perl v5.10 or newer with the following modules:
 * DateTime
 * DateTime::Format::Strptime
 * DateTime::TimeZone
 * List::MoreUtils
 * Term::Size

Installation:

 > perl Build.PL
 > ./Build
 > sudo ./Build install

You can then run 'man icli' for more information.

Extra modules required for testing:
 * Test::More
 * Test::Compile
 * Test::Pod
 * Test::Command

Note: To work with an Icinga installation, icli needs to know the path to
three files:
* objects.cache (icinga.cfg object_cache_file)
* status.dat (icinga.cfg status_file)
* icinga.cmd (icinga.cfg command_file)

If you are building interactively and the default values for these paths
do not exist, you will be asked for them -- hit return to keep the default.
In a non-interactive build, the defaults will be used (unless changed using
an option, see below).

If you need to set them regardless of the build host, do not wish to be
promited at all, or are using a non-interactive build process (perhaps even
for a whole distribution), you can set them using the following options:

> perl Build.PL --icli-object-file=.../objects.cache \
                --icli-status-file=.../status.dat \
                --icli-command-file=.../icinga.cmd

http://finalrewind.org/projects/icli

icli's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

icli's Issues

-u | --force-recheck does not force an immediate re-check

Example:

icli -lq pvdevauth02
Host Service Last Check Next Check
pvdevauth02 Check app status mig 2014-05-12 11:20:16 2014-05-12 11:21:16
pvdevauth02 Check app status red 2014-05-12 11:20:27 2014-05-12 11:21:27
pvdevauth02 Check app status aut 2014-05-12 11:21:05 2014-05-12 11:22:05
pvdevauth02 2014-05-12 11:21:04 2014-05-12 11:22:14
pvdevauth02 SSH 2014-05-12 11:18:38 2014-05-12 11:23:38
pvdevauth02 Check app status det never 2014-05-12 11:30:16
pvdevauth02 Check app status pos never 2014-05-12 11:30:27
pvdevauth02 Check disk via ssh never 2014-05-12 11:30:38

icli -u -r pvdevauth02
Scheduled check of * on 'pvdevauth02'

icli -lq pvdevauth02
Host Service Last Check Next Check
pvdevauth02 Check app status aut 2014-05-12 11:21:05 2014-05-12 11:22:05
pvdevauth02 2014-05-12 11:21:04 2014-05-12 11:22:14
pvdevauth02 Check app status mig 2014-05-12 11:21:16 2014-05-12 11:22:16
pvdevauth02 Check app status red 2014-05-12 11:21:27 2014-05-12 11:22:27
pvdevauth02 SSH 2014-05-12 11:18:38 2014-05-12 11:23:38
pvdevauth02 Check app status det never 2014-05-12 11:30:16
pvdevauth02 Check app status pos never 2014-05-12 11:30:27
pvdevauth02 Check disk via ssh never 2014-05-12 11:30:38

FILTER EXPRESSIONS can use...

Hi, starting to learn how to use icli.
Tried this two commands:

$ icli -h servername # I can get what I want
$ icli -z!o,!A,!S,!D
-bash: !o,!A,!S,!D: event not found
this is copied from the man file, but failed...I think the bash should be the reason.

then I tried copy the command to a script, then run it, got an error:
Use of uninitialized value in numeric ne (!=) at /usr/local/bin/icli line 242.

Know little about perl, can you help...

feature request: icli compatibility for icinga2

At the moment icli has hardcoded paths to Icinga datafiles. These can be overwritten by for example:
icli -f /var/cache/icinga2/status.dat -c /var/cache/icinga2/objects.cache
It would be nice if either these defaults would be configurable, be dynamically extracted from the Icinga configuration.
An alterative would be to fork every release of icli to not only hold (in it's package) not only an icli executable which defaults to /var/cache/cinga/* but also an icli2 which defaults to /var/cache/icinga2/*

Some styling wishes - line breaks and more

I'd like to see a parameter which allows to cut lines to the terminal width.

Another possibility would be to do accurate line breaks which are formatted well.
The line breaks should not occur in the middle of a word - the line break has to be before a word (where usually a whitespace is located) so that it is still human readable ;)

More advanced filtering

By service state, acknowledge/not acknowledged, maybe service groups, flags (active/passive), etc.

More filters

  • Service / parent Host is currently in Downtime (plus a flag for that) [done]
  • Notifications are disabled (plus flag)

Uninitialized value in split

Regards,

I get these lines on every icli invocation on my system:

Use of uninitialized value in split at /usr/bin/icli line 372, <$_[...]> line 1099.
Use of uninitialized value in split at /usr/bin/icli line 372, <$_[...]> line 1121.
Use of uninitialized value in split at /usr/bin/icli line 372, <$_[...]> line 1126.

My icli is installed in a squeeze + backports amd64 system (accessing an icinga 1.7.1-5~bpo60-1 install). The package is a backport, uupdated to 0.46 from the debian base package (http://packages.debian.org/sid/icli ), without any additional patches.

Besides, acknowledging a service doesn't seem to work (I don't know whether it is related or not). Running icli -h localhost -a "we know" 'RAID' does not make it appear as "acknowledged" in the web interface (but it exits with 0); service name is RAID, of course.

hosts don't show up when host has no service checks

icli -l hosts
only shows hosts which do have at least 1 service check.
when none are specified, the host is checked but doesn't get listed by icli

Thanks for fixing :-)
for the rest it's a great program

Thanks in advance,
Pieter van Voorst Vader

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.