{"id":19583828,"url":"https://github.com/bodsch/ruby-icinga2","last_synced_at":"2025-04-27T10:33:14.277Z","repository":{"id":56877219,"uuid":"65072840","full_name":"bodsch/ruby-icinga2","owner":"bodsch","description":"An enhanced Ruby gem to communicate with Icinga2 API","archived":false,"fork":false,"pushed_at":"2019-01-14T14:47:33.000Z","size":560,"stargazers_count":12,"open_issues_count":8,"forks_count":8,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-04-23T20:53:39.162Z","etag":null,"topics":["gem","icinga2","icinga2-api","ruby","ruby-icinga2"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bodsch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-08-06T08:29:17.000Z","updated_at":"2023-05-22T06:26:06.000Z","dependencies_parsed_at":"2022-08-20T23:10:32.092Z","dependency_job_id":null,"html_url":"https://github.com/bodsch/ruby-icinga2","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bodsch%2Fruby-icinga2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bodsch%2Fruby-icinga2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bodsch%2Fruby-icinga2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bodsch%2Fruby-icinga2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bodsch","download_url":"https://codeload.github.com/bodsch/ruby-icinga2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224069628,"owners_count":17250451,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gem","icinga2","icinga2-api","ruby","ruby-icinga2"],"created_at":"2024-11-11T07:45:01.191Z","updated_at":"2024-11-11T07:45:02.348Z","avatar_url":"https://github.com/bodsch.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ruby-icinga2\n\nAn enhanced ruby gem to communicate with Icinga2 API\n\n[![Gem Version](https://badge.fury.io/rb/icinga2.svg)](https://badge.fury.io/rb/icinga2)\n\n[![Build Status](https://travis-ci.org/bodsch/ruby-icinga2.svg)][travis]\n[![Gem Downloads](http://ruby-gem-downloads-badge.herokuapp.com/icinga2)][gem-downloads]\n[![total Downloads](http://ruby-gem-downloads-badge.herokuapp.com/icinga2?type=total\u0026metric=true\u0026label=downloads-total)][gem-downloads]\n[![Dependency Status](https://gemnasium.com/badges/github.com/bodsch/ruby-icinga2.svg)][gemnasium]\n\n\n[travis]: https://travis-ci.org/bodsch/ruby-icinga2\n[gem-downloads]: http://ruby-gem-downloads-badge.herokuapp.com/icinga2\n[gemnasium]: https://gemnasium.com/github.com/bodsch/ruby-icinga2\n\n## Requirements\n\n* ruby version  =\u003e 2.0\n* rest-client ~\u003e 2.0\n* json  ~\u003e 2.1\n* openssl ~\u003e 2.0 (only with ruby \u003e= 2.3)\n* ruby_dig (only with ruby \u003c 2.3)\n\n## Install\n\n    gem install icinga2\n\n## Usage\n\ncreate an instance\n\n    require 'icinga2'\n\n    config = {\n      icinga: {\n        host: icinga_host,\n        api: {\n          port: icinga_api_port,\n          username: icinga_api_user,\n          password: icinga_api_pass\n        }\n      }\n    }\n\n    @icinga = Icinga2::Client.new( config )\n\n### Use the examples\n\nYou can use the [Icinga Vagrant-Box](https://github.com/Icinga/icinga-vagrant) from the Icinga Team or\nmy own [Docker Container](https://hub.docker.com/r/bodsch/docker-icinga2/) as Datasource.\n\n**Remember** Change the exported Environment Variables to your choosed Datasource!\n\nyou can find many examples under the directory `examples`:\n\n    $ export ICINGA_HOST=localhost ; export ICINGA_API_USER=root ; export ICINGA_API_PASSWORD=icinga\n    $ ruby examples/informations.rb\n    $ ruby examples/statistics.rb\n    $ ruby examples/users.rb\n\nand so on.\n\n### Test via CLI\n\n    $ irb\n    irb(main):001:0\u003e require 'icinga2'\n     =\u003e true\n    irb(main):002:0\u003e config = { icinga: { host: 'localhost', api: { username: 'root', password: 'icinga' } } }\n     =\u003e {:icinga=\u003e{:host=\u003e\"localhost\", :api=\u003e{:username=\u003e\"root\", :password=\u003e\"icinga\"}}}\n    irb(main):003:0\u003e i = Icinga2::Client.new( config )\n    irb(main):004:0\u003e i.available?\n    =\u003e true\n    irb(main):005:0\u003e\n\n## Create a own gem file\n\n    $ gem build icinga2.gemspec\n    Successfully built RubyGem\n    Name: icinga2\n    Version: 0.9.2.7\n    File: icinga2-0.9.2.7.gem\n\n## Install local gem\n\n    $ gem install icinga2\n    Successfully installed icinga2-0.9.2.7\n    1 gem installed\n\n\n## Status\n\nsupports the following API Calls:\n\n  - [Users](doc/users.md)\n    * [add user](doc/users.md#add-user)\n    * [delete user](doc/users.md#delete-dser)\n    * [list users](doc/users.md#list-users)\n    * [check if user exists](doc/users.md#user-exists)\n\n  - [Usergroups](doc/usergroups.md)\n    * [add usergroup](doc/usergroups.md#add-usergroup)\n    * [delete usergroup](doc/usergroups.md#delete-usergroup)\n    * [list usergroups](doc/usergroups.md#list-usergroups)\n    * [check if usergroup exists](doc/usergroups.md#usergroup-exists)\n\n  - [Hosts](doc/hosts.md)\n    * [add host](doc/hosts.md#add-host)\n    * [delete host](doc/hosts.md#delete-host)\n    * [modify host](doc/hosts.md#modify-host)\n    * [list hosts](doc/hosts.md#list-hosts)\n    * [check if host exists](doc/hosts.md#host-exists)\n    * [list host objects](doc/hosts.md#list-host-objects)\n    * [count of hosts with problems](doc/hosts.md#count-hosts-with-problems)\n    * [list of hosts with problems](doc/hosts.md#list-hosts-with-problems)\n    * [count of all hosts](doc/hosts.md#count-all-hosts)\n    * [count hosts with problems](doc/hosts.md#count-host-problems)\n    * calculate host severity (protected)\n\n  - [Hostgroups](doc/hostgroups.md)\n    * [add hostgroup](doc/hostgroups.md#add-usergroup)\n    * [delete hostgroup](doc/hostgroups.md#delete-usergroup)\n    * [list hostgroups](doc/hostgroups.md#list-usergroups)\n    * [check if hostgroup exists](doc/hostgroups.md#usergroup-exists)\n\n  - [Services](doc/services.md)\n    * [add service](doc/services.md#add-service)\n    * [delete service](doc/services.md#delete-service)\n    * [list unhandled services](doc/services.md#unhandled-services)\n    * [list services](doc/services.md#list-services)\n    * [check if service exists](doc/services.md#service-exists)\n    * [list service objects](doc/services.md#list-service-objects)\n    * [count services with problems](doc/services.md#count-services-with-problems)\n    * [list of services with problems](doc/services.md#list-services-with-problems)\n    * [count of all services](doc/services.md#count-all-services)\n    * [count all services with handled problems](doc/services.md#count-all-services-handled)\n    * calculate service severity (protected)\n\n  - [Servicegroups](doc/servicegroups.md)\n    * [add servicegroup](doc/servicegroups.md#add-servicegroup)\n    * [delete servicegroup](doc/servicegroups.md#delete-servicegroup)\n    * [list servicegroups](doc/servicegroups.md#list-servicegroup)\n    * [check if servicegroup exists](doc/servicegroups.md#servicegroup-exists)\n\n  - [Downtimes](doc/downtimes.md)\n    * [add downtime](doc/downtimes.md#add-downtime)\n    * [remove downtime](doc/downtimes.md#remove-downtime)\n    * [list downtimes](doc/downtimes.md#list-downtimes)\n\n  - [Notifications](doc/notifications.md)\n    * [enable host notifications](doc/notifications.md#enable-host-notification)\n    * [disable host notifications](doc/notifications.md#disable-host-notification)\n    * [enable service notifications](doc/notifications.md#enable-service-notification)\n    * [disable service notifications](doc/notifications.md#disable-service-notification)\n    * [enable hostgroup notifications](doc/notifications.md#enable-hostgroup-notification)\n    * [disable hostgroup notifications](doc/notifications.md#disable-hostgroup-notification)\n    * [list all notifications](doc/notifications.md#list-notifications)\n    * host notification (protected)\n    * hostgroup notification (protected)\n    * service notification (protected)\n\n  - [Statistics](doc/statistics.md)\n    * [statistic data for latence and execution time](doc/statistics.md#stats-avg)\n    * [statistic data for interval data](doc/statistics.md#stats-interval)\n    * [statistic data for services](doc/statistics.md#stats-services)\n    * [statistic data for hosts](doc/statistics.md#stats-hosts)\n    * [queue statistics from the api](doc/statistics.md#stats-work-queue)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbodsch%2Fruby-icinga2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbodsch%2Fruby-icinga2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbodsch%2Fruby-icinga2/lists"}