Skip to content

Commit ff67792

Browse files
committed
Prepared release 1.0.0
1 parent e0ab5f1 commit ff67792

8 files changed

Lines changed: 41 additions & 15 deletions

README.md

Lines changed: 35 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ It can be used to interact with Icinga2 from your Slack client. It uses the
117117
Icinga2 API to get Host/Service status details. Simple status filters can be
118118
used to narrow down the returned status list.
119119
120-
Version: 0.2.0 (2019-11-16)
120+
Version: 1.0.0 (2020-05-17)
121121
122122
optional arguments:
123123
-h, --help show this help message and exit
@@ -146,23 +146,39 @@ Following commands are currently implemented:
146146
>acknowledge problematic hosts or services
147147
* downtime (dt)
148148
>set a downtime for hosts/services
149+
* comment (com)
150+
>add a comment to hosts/services
151+
* reschedule (rs)
152+
>reschedule a host/service check
153+
* send notification (sn)
154+
>send a costum host/service notification
155+
* delay notification (dn)
156+
>delay host/service notifications
157+
* show (sh)
158+
>show a comment/downtime/acknowledgement
159+
* remove (rm)
160+
>remove a comment/downtime/acknowledgement
149161
* reset (abort)
150-
>abort current action (ack/dt)
162+
>abort current action (ack/dt/ena/disa/sh/rm)
151163
* icinga status (is)
152164
>print current Icinga status details
165+
* enable (ena)
166+
>enable an action
167+
* disable (disa)
168+
>disable an action
153169
154170
### Help command
155171
Each command also provides a detailed help `help <command>`
156172

157173
### Command status filter
158174
Following command filters are implemented
159-
* host status
175+
* host status (hs)
160176
* up
161177
* down
162178
* unreachable (unreach)
163179
* all
164180
* problems
165-
* service status
181+
* service status (ss)
166182
* ok
167183
* warning (warn)
168184
* critical (crit)
@@ -189,6 +205,10 @@ Also just parts of host and service names can be used to search for objects
189205
(service.state == 2) && ( match("*test*", host.name) && match("*web*", service.name) ) || ( match("*web*", host.name) && match("*test*", service.name) )
190206
`
191207

208+
**HINT:**
209+
You can also use quotes in your filter to find services containing spaces like:<br>
210+
`ss server "network interfaces"`
211+
192212
#### Using previous filter
193213
Sometime you try to tackle a problem and get tired of entering the filter every time. In this case you can use `!!` which defaults
194214
to last commands filter.
@@ -220,9 +240,9 @@ After that the bot will report if the action was successful or not.
220240
##### SORT CUT:
221241
It's also possible to short cut the whole Q/A and just issue the action in one command:
222242
```
223-
ack my-server ntp until tomorrow evening Wrong ntp config, needs update
243+
ack myserver ntp until tomorrow evening Wrong ntp config, needs update
224244
```
225-
This will acknowledge a problematic service ntp on my-server until 6pm the following day.
245+
This will acknowledge a problematic service ntp on myserver until 6pm the following day.
226246

227247
##### STRUCTURE:
228248
```
@@ -244,9 +264,9 @@ will ask for a downtime start. Here it's also possible to use a relative time fo
244264
##### SORT CUT:
245265
It's also possible to short cut the whole Q/A and just issue the action in one command:
246266
```
247-
dt my-server ntp from now until tomorrow evening NTP update
267+
dt myserver ntp from now until tomorrow evening NTP update
248268
```
249-
This will set a downtime for the service ntp on my-server until 6pm the following day.
269+
This will set a downtime for the service ntp on myserver until 6pm the following day.
250270

251271
##### STRUCTURE:
252272
```
@@ -270,14 +290,17 @@ dt <service> from <time> until <time> <comment>
270290
* ```ss warn crit ntp``` will display all services which match "ntp" and are in state CRITICAL or WARNING
271291
* ```ss``` will display all services which currently have a problem
272292

273-
* ```ack my-server ntp until tomorrow evening Wrong ntp config, will be updated tomorrow``` will acknowledge a problematic service ntp on my-server until 6pm the following day
293+
* ```ack myserver ntp until tomorrow evening Wrong ntp config, will be updated tomorrow``` will acknowledge a problematic service ntp on myserver until 6pm the following day
274294

275295
***Important:***
276296
* The [detailed](#all-problematic-services) view will only be used if there are **1 to 4** status results
277297

278298
#### Help
279299
![help example](docs/bot_help_answer.png)
280300

301+
#### Help for command enable
302+
![help enable](docs/bot_help_enable.png)
303+
281304
#### Detailed host status example
282305
![detailed host answer](docs/bot_detailed_host_answer.png)
283306

@@ -297,6 +320,9 @@ dt <service> from <time> until <time> <comment>
297320
#### Acknowledge service problem
298321
![ack_service_problem](docs/bot_ack_service.png)
299322

323+
#### Disable notifications global
324+
![disable_notifications_global](docs/bot_disable_notifications_global.png)
325+
300326
#### Icinga status
301327
![icinga_status](docs/bot_icinga_status.png)
302328

docs/bot_detailed_host_answer.png

24.9 KB
Loading
30.6 KB
Loading
35.8 KB
Loading

docs/bot_help_answer.png

83.2 KB
Loading

docs/bot_help_enable.png

168 KB
Loading

i2_slack_modules/command_definition.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -426,17 +426,17 @@
426426
"name": "enable",
427427
"shortcut": "ena",
428428
"short_description": "enable an action",
429-
"long_description": "This command will enable active or passive checks, notifications or event handlers"
430-
"globally, hosts or services.",
429+
"long_description": "This command will enable active or passive checks, notifications or event handlers\n"
430+
"either globally or for a hosts or a services.",
431431
"command_handler": "enable_disable_action",
432432
"sub_commands": enable_disable_sub_commands
433433
},
434434
{
435435
"name": "disable",
436436
"shortcut": "disa",
437437
"short_description": "disable an action",
438-
"long_description": "This command will disable active or passive checks, notifications or event handlers"
439-
"globally, hosts or services.",
438+
"long_description": "This command will disable active or passive checks, notifications or event handlers\n"
439+
"either globally or for a hosts or a services.",
440440
"command_handler": "enable_disable_action",
441441
"sub_commands": enable_disable_sub_commands
442442
}

icinga-bot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
from i2_slack_modules import slack_max_message_blocks, slack_max_message_text_length
3232

3333

34-
__version__ = "0.2.0"
35-
__version_date__ = "2019-11-16"
34+
__version__ = "1.0.0"
35+
__version_date__ = "2020-05-17"
3636
__author__ = "Ricardo Bartels <ricardo@bitchbrothers.com>"
3737
__description__ = "Icinga2 Slack Bot"
3838
__license__ = "MIT"

0 commit comments

Comments
 (0)