Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

icinga_result

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

icinga_result

  • 1.0.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Icinga Result Client

This gem provides a library and executable to send passive check results via API to Icinga2.

Installation

Require it in your Gemfile

gem 'icinga_result'

or install it directly via

gem install icinga_result

Configuration

To use the gem you need a configuration file with an Icinga API host and user.

---
username: your icinga username
password: your super secred icinga password
host: icinga.example.com
port: 5665
always_send_host_alive: false

"always_send_host_alive" sends the host alive signal every time a service result is delivered.

Usage

Command line client

You can deliver status results simple by calling icinga-result. While it is sufficient to supply "name", "status" and "message" when the service exists, you should probably always give as much information as you can. The first time a check result is sent, it will probably fail (since the service does not exist yet). But it will automatically be created and when the check is run a second time, the result will be sent.

$ icinga-result --help
Usage: --help [options]
        --service [NAME]             Service name
        --interval [INTERVAL]        Server check interval
        --description [DESCRIPTION]  Service description
        --status [STATUS]            Status code for the check
        --message [MESSAGE]          Status message for the check
        --performance-data [DATA]    Performance data for the check
        --host-alive                 Send host alive signal

Library

When you implement your check in Ruby, you can call the library directly. A simple script might look like this:

require 'icinga_result/client'

client = IcingaResult::Client.new
service = IcingaResult::Service.new('demo', interval: 3600, description: 'This is a demo check')

if my_special_check
  result = IcingaResult::CheckResult.new(0, 'Ok')
else
  result = IcingaResult::CheckResult.new(2, 'Special is borken!')
end

client.send(service, result)

FAQs

Package last updated on 24 Mar 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc