Icinga DB Web - Module web
Find a file
Johannes Meyer a1aa4cdbda
Make command actions easier to use with curl (#863)
The routes used are the same that are used when issuing commands on
multiple objects (bulk actions). So the filter that's used in the
examples can be any other filter as well. Input data must be provided as
`multipart/form-data`.

They respond with the JSON format provided by Icinga Web and are only
accessible for non-XHR clients.

## Examples

### Adding a comment
```
curl -H "Accept: application/json" -u icingaadmin:icinga "http://localhost/icingaweb2/icingadb/hosts/add-comment?host.name=docker-master" -F "comment=kaput" -F "expire_time=2023-09-05T20:00:00" -F "expire=y" -v
*   Trying 127.0.0.1:80...
* Connected to localhost (127.0.0.1) port 80 (#0)
* Server auth using Basic with user 'icingaadmin'
> POST /icingaweb2/icingadb/api/v1/hosts/add-comment?host.name=docker-master HTTP/1.1
> Host: localhost
> Authorization: Basic aWNpbmdhYWRtaW46aWNpbmdh
> User-Agent: curl/7.81.0
> Accept: application/json
> Content-Length: 362
> Content-Type: multipart/form-data; boundary=------------------------da76739ff7328fd9
> 
* We are completely uploaded and fine
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Server: nginx/1.23.4
< Date: Tue, 05 Sep 2023 07:44:56 GMT
< Content-Type: application/json
< Transfer-Encoding: chunked
< Connection: keep-alive
< X-Powered-By: PHP/8.2.3
< X-Xdebug-Profile-Filename: /tmp/cachegrind.out.128.gz
< 
* Connection #0 to host localhost left intact
{"status":"success","data":[{"type":"success","message":"Added comment successfully"}]}
```

#### In case there's an error
```
curl -H "Accept: application/json" -u icingaadmin:icinga "http://localhost/icingaweb2/icingadb/hosts/add-comment?host.name=docker-master" -F "comment=kaput" -F "expire_time=2023-08-05T20:00:00" -F "expire=y" -v
*   Trying 127.0.0.1:80...
* Connected to localhost (127.0.0.1) port 80 (#0)
* Server auth using Basic with user 'icingaadmin'
> POST /icingaweb2/icingadb/api/v1/hosts/add-comment?host.name=docker-master HTTP/1.1
> Host: localhost
> Authorization: Basic aWNpbmdhYWRtaW46aWNpbmdh
> User-Agent: curl/7.81.0
> Accept: application/json
> Content-Length: 362
> Content-Type: multipart/form-data; boundary=------------------------53cd05bc746f90be
> 
* We are completely uploaded and fine
* Mark bundle as not supporting multiuse
< HTTP/1.1 422
< Server: nginx/1.23.4
< Date: Tue, 05 Sep 2023 07:45:31 GMT
< Content-Type: application/json
< Transfer-Encoding: chunked
< Connection: keep-alive
< X-Powered-By: PHP/8.2.3
< X-Xdebug-Profile-Filename: /tmp/cachegrind.out.129.gz
< 
* Connection #0 to host localhost left intact
{"status":"fail","data":{"comment":[],"expire":[],"expire_time":["The expire time must not be in the past"]}}
```

### Scheduling a downtime
```
curl -H "Accept: application/json" -u icingaadmin:icinga "http://localhost/icingaweb2/icingadb/hosts/schedule-downtime?host.name=docker-master" -F "comment=kaput" -F "start=2023-09-05T20:00:00" -F "end=2023-09-05T22:00:00" -F "flexible=y" -F "hours=1" -F "minutes=0" -F "all_services=n" -F "child_options=0" -v
*   Trying 127.0.0.1:80...
* Connected to localhost (127.0.0.1) port 80 (#0)
* Server auth using Basic with user 'icingaadmin'
> POST /icingaweb2/icingadb/api/v1/hosts/schedule-downtime?host.name=docker-master HTTP/1.1
> Host: localhost
> Authorization: Basic aWNpbmdhYWRtaW46aWNpbmdh
> User-Agent: curl/7.81.0
> Accept: application/json
> Content-Length: 866
> Content-Type: multipart/form-data; boundary=------------------------2222dcc7ed0e5442
> 
* We are completely uploaded and fine
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Server: nginx/1.23.4
< Date: Tue, 05 Sep 2023 07:47:10 GMT
< Content-Type: application/json
< Transfer-Encoding: chunked
< Connection: keep-alive
< X-Powered-By: PHP/8.2.3
< X-Xdebug-Profile-Filename: /tmp/cachegrind.out.129.gz
< 
* Connection #0 to host localhost left intact
{"status":"success","data":[{"type":"success","message":"Scheduled downtime successfully"}]}
```
2023-09-08 16:41:10 +02:00
.github Github Actions: Do not cancel further tests if one fails 2023-09-05 14:49:18 +02:00
application CommandForm: Don't add a submit button and CSRF token.. 2023-09-08 16:37:44 +02:00
doc Mention correct possible values for icingadb/denylist/routes 2023-05-22 09:43:57 +02:00
library/Icingadb CommandActions: Respond with JSON if requested 2023-09-08 16:37:44 +02:00
public Avoid using inline style 2023-09-08 16:25:40 +02:00
test/php Add unit tests for invalid performance data evaluation 2023-09-05 16:44:44 +02:00
.gitattributes Add .gitattributes 2020-03-13 10:36:24 +01:00
.gitignore Update .gitignore 2020-01-23 13:34:45 +01:00
.mailmap Update .mailmap 2022-11-03 17:08:28 +01:00
.phpcs.xml phpcs: Relax style checks a bit 2020-01-20 08:45:11 +01:00
AUTHORS Update AUTHORS 2022-11-03 17:08:38 +01:00
CHANGELOG.md Update CHANGELOG.md 2022-11-03 17:08:51 +01:00
configuration.php js: Animate progress bars 2023-06-22 14:51:57 +02:00
CONTRIBUTING.md Add CONTRIBUTING.md 2020-03-13 10:36:24 +01:00
LICENSE Add LICENSE 2020-03-13 10:36:24 +01:00
module.info Raise version to 1.0.2 2022-11-03 17:09:02 +01:00
phpstan-baseline.neon Utilize widgets moved to ipl-web 2023-09-08 14:54:47 +02:00
phpstan.neon Phpstan: Set level to max and add baseline file 2023-09-05 14:49:16 +02:00
phpunit.xml actions: Run PHP unit tests 2023-01-18 12:19:19 +01:00
README.md README.md: Fix wrong latest doc link 2022-07-12 09:55:22 +02:00
run.php Provide reporting hook for single host/service 2023-07-17 15:36:38 +02:00
SECURITY.md Create SECURITY.md 2022-11-22 08:58:18 +01:00

Icinga DB Web

PHP Support Build Status Github Tag

Icinga DB is a set of components for publishing, synchronizing and visualizing monitoring data in the Icinga ecosystem, consisting of:

  • Icinga DB Web which connects to both a Redis server and a database to view and work with most up-to-date monitoring data
  • Icinga 2 with its Icinga DB feature enabled, responsible for publishing the data to the Redis server, i.e. configuration and its runtime updates, check results, state changes, downtimes, acknowledgements, notifications, and other events such as flapping
  • And the Icinga DB daemon, which synchronizes the data between the Redis server and the database

Icinga DB Architecture

Documentation

Icinga DB Web documentation is available at icinga.com/docs.

Features

Icinga DB Web offers a modern and streamlined design to provide a clear and concise view of your monitoring environment, also with dark and light mode support.

Icinga DB Dashboard

Various List Layouts

The view switcher allows to control the level of detail displayed in host and service list views:

View Switcher Preview

Search with Autocomplete

The search bar in list views can be used for everything from simple searches to creating complex filters. It allows full keyboard control and also supports contextual auto-completion. In addition, there is an editor for easier filter creation.

Searchbar Completion Preview

Clean Detail Views

Host and service detail views are structured to make best use of available space. Related information is grouped and important information is at the top for instant access without having to scroll down.

Service Detail Preview

Modal Dialogs

Any interaction that requires user input, such as acknowledging problems, scheduling downtimes, etc., shows a modal dialog over the current view to preserve context and focus on interaction.

Modal Dialog Preview

Bulk Operations

Bulk interactions such as scheduling downtimes for multiple objects, acknowledging multiple problems, etc. are easily accomplished with the Continue With control that operates on filtered lists.

Continue With Preview

License

Icinga DB Web and the Icinga DB Web documentation are licensed under the terms of the GNU General Public License Version 2.