Skip to content

Commit

Permalink
First working version
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianCzoch committed Mar 11, 2019
1 parent b2ae6a6 commit f050447
Show file tree
Hide file tree
Showing 6 changed files with 400 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# https://editorconfig.org/

root = true

[*]
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
end_of_line = lf
charset = utf-8

[*.py]
max_line_length = 120

[*.json]
indent_size = 2
insert_final_newline = ignore

46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
icinga2-bitbar
==============

This is [Icinga2](https://icinga.com) plugin for [Bitbar](https://github.com/matryer/bitbar). It is using Icinga2 API.

## Screenshots
![screenshot](./assets/bitbar.png)

## Features
* Show list of
* Down hosts
* Critical services
* Unknown services
* Warning services
* Acknowledge host/service problem
* Remove acknowledgment of host/service problem
* Reshedule check (re-check now)

## Requirements
* Python3
* requests

## Installaton (recomended)
Clone this repository
```bash
$ git clone https://github.com/SebastianCzoch/icinga2-bitbar.git
```

Install requirements
```bash
$ pip3 install -r requirements.txt
```

Modify `bitbar.py` and apply proper:
* `icinga2_address`
* `icinga2_user`
* `icinga2_password`

and if needed other available options

Create symlink to your BitBar plugin directory and make sure that it has executable privileges
```bash
$ ln -s ./bitbar.py <bitbar plugin directory>icinga2.10s.py
$ chmod +x <bitbar plugin directory>icinga2.10s.py
```

Binary file added assets/bitbar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions assets/mock.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash
# This is used only to create plugin screenshots

echo "D: 1 C: 2 U: 1 W:1 | color=#ff0000"
echo "---"
echo "Hosts: 1024"
echo "Services: 10002934"
echo "---"
echo "Host problems"
echo "kittens-a-0.internal | color=#ff0000"
echo "-- Acknowledge | href=\"#\""
echo "-- Check now | href=\"#\""
echo "---"
echo "Service problems"
echo "kittens-mysql - mysql-a-0.internal | color=#ff0000"
echo "-- Acknowledge | href=\"#\""
echo "-- Check now | href=\"#\""
echo "kittens-memcached - memcached-a-0.internal | color=#ff0000"
echo "-- Acknowledge | href=\"#\""
echo "-- Check now | href=\"#\""
echo "web-nginx - router-a-0.internal | color=#660066"
echo "-- Acknowledge | href=\"#\""
echo "-- Check now | href=\"#\""
echo "errors-in-app - kittens-app | color=#ff9900"
echo "-- Acknowledge | href=\"#\""
echo "-- Check now | href=\"#\""
echo "---"
echo "Refresh | href=\"#\""

Loading

0 comments on commit f050447

Please sign in to comment.