Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enh: ability to delete a single downtime #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
language: python
python:
- "2.7"
- "2.6"

install:
- "[ -d test ] && ./test/setup_module_test.sh || : "
Expand Down
43 changes: 23 additions & 20 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
.. _ws_daemon_module:

===================
Web Service Module
Web Service Module
===================


The ws-arbiter module is an Arbiter (or Receiver) module to treat requests from remote hosts via HTTP(s).
The ws-arbiter module is an Arbiter (or Receiver) module to treat requests from remote hosts via HTTP(s).


Configuring the Web Service Module
Configuring the Web Service Module
===================================

The module configuration is made in the ws-arbiter.cfg file, in the modules configuration directory. To enable this module, simply add the module to your Arbiter or Receiver daemon configuration.
Expand All @@ -20,7 +20,7 @@ If data is POSTed to this page, it will validate the data to determine if it is
This module listens by default on all IP interfaces, TCP port 7760 and it supports anonymous or authenticated access. This configuration may be changed in the ws-arbiter.cfg file.


Using the Web Service Module
Using the Web Service Module
=============================


Expand All @@ -36,7 +36,7 @@ The web service listens for POSTs to:

- /reload
Makes Shinken reload configuration (/etc/init.d/shinken reload)

Command:
::
curl -u user:password -d '' http://shinken-srv:7760/reload
Expand All @@ -49,15 +49,15 @@ The web service listens for POSTs to:
- action: (default = add)
add, to add an acknowledge for an host/service
delete, to remove current acknowledges on host/service

- host_name:
Host name

- service_description: (default = '' for host acknowledge only)
Service description

- time_stamp: (default = current time)

- sticky: (default = 1)

- notify: (default = 0)
Expand All @@ -68,7 +68,7 @@ The web service listens for POSTs to:

- comment: (default = 'No comment')


Command:
::
curl -u user:password -d "&host_name=host-ack&service_description=service-ack&author=Me&comment=Ack problem" http://shinken-srv:7760/acknowledge
Expand All @@ -81,19 +81,22 @@ The web service listens for POSTs to:
- action: (default = add)
add, to add an acknowledge for an host/service
delete, to remove current downtimes on host/service

- host_name:
Host name

- service_description: (default = '' for host acknowledge only)
Service description


- downtime_id: (default = '')
The downtime id to delete (all downtimes are deleted if missing)

- time_stamp: (default = current time)

- start_time: (default = current time)

- end_time: (default = current time)

- fixed: (default = 1)

- duration: (default = 86400 seconds)
Expand All @@ -104,7 +107,7 @@ The web service listens for POSTs to:

- comment: (default = 'No comment')


Command:
::
curl -u user:password -d "&host_name=host-ack&author=Me&comment=Downtime host" http://shinken-srv:7760/downtime
Expand All @@ -117,11 +120,11 @@ The web service listens for POSTs to:
curl -u user:password -d "time_stamp=$(date +%s)&host_name=host-checked&service_description=service-checked&return_code=0" --data-urlencode "output=Everything OK" http://shinken-srv:7760/push_check_result

Example with more readability:

::

curl
-u user:password
curl
-u user:password
-d "time_stamp=$(date +%s)
&host_name=host-checked
&service_description=service-checked
Expand Down
Loading