PHPackages                             idoit/checkmkwebapiclient - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. idoit/checkmkwebapiclient

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

idoit/checkmkwebapiclient
=========================

Easy-to-use, but feature-rich client library for Checkmk's Web API

0.6(5y ago)93374[4 issues](https://github.com/i-doit/checkmk-web-api-client-php/issues)[1 PRs](https://github.com/i-doit/checkmk-web-api-client-php/pulls)AGPL-3.0+PHPPHP &gt;=7.2.0CI passing

Since Jan 16Pushed 3mo ago6 watchersCompare

[ Source](https://github.com/i-doit/checkmk-web-api-client-php)[ Packagist](https://packagist.org/packages/idoit/checkmkwebapiclient)[ Docs](https://github.com/bheisig/checkmkwebapi)[ RSS](/packages/idoit-checkmkwebapiclient/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (17)Versions (9)Used By (0)

Checkmk Web API Client
======================

[](#checkmk-web-api-client)

Easy-to-use, but feature-rich client for Checkmk Web API

[![Latest Stable Version](https://camo.githubusercontent.com/149882fd784c0e8f3ecb5904cb475f3785734641cce280a25032661c1470dc5d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f69646f69742f636865636b6d6b776562617069636c69656e742e737667)](https://packagist.org/packages/idoit/checkmkwebapiclient)[![Minimum PHP Version](https://camo.githubusercontent.com/92796e239b27a6efdd63fea6f14a269cf8e109cdeee963eb967646961705e919/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253545372e34253743253545382e302d3838393242462e737667)](https://php.net/)[![Build status](https://github.com/i-doit/checkmk-web-api-client-php/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/i-doit/checkmk-web-api-client-php/actions)

**Please note: This project is not an official product by synetics GmbH. synetics GmbH doesn't provide any commercial support.**

About
-----

[](#about)

[Checkmk](https://checkmk.com/) is a software application for network monitoring. The community edition ("raw") is licensed under the GPLv2.

This client communicates with Checkmk over its Web API. It provides a simple, but powerful abstraction layer for written in PHP. Feel free to use it as a library in your own projects.

Requirements
------------

[](#requirements)

Meet these simple requirements before using the client:

- One or more Checkmk sites, version `1.4` or higher (most calls work since `1.5`)
- PHP, version `8.0` or higher (`8.1` is recommended, `7.4` should work but is deprecated)
- PHP modules `curl`, `date`, `json`, `openssl`, `spl` and `zlib`

Installation
------------

[](#installation)

It is recommended to install this client via [Composer](https://getcomposer.org/). Change to your project's root directory and fetch the latest stable version:

```
composer require idoit/checkmkwebapiclient

```

This command installs the latest stable version. Instead of sticking to a specific/minimum version you may switch to the current development branch by using `@DEV`:

```
composer require "idoit/checkmkwebapiclient=@DEV"

```

Updates
-------

[](#updates)

Composer has the great advantage (besides many others) that you can simply update the client by running:

```
composer update

```

Usage
-----

[](#usage)

Composer comes with its own autoloader. Include this line into your PHP code:

```
require_once 'vendor/autoload.php';

```

This is it. All other files will be auto-loaded on-the-fly if needed.

First call
----------

[](#first-call)

This is a simple "Hello, world!" example. It fetches all configured hosts from Checkmk:

```
use Idoit\CheckmkWebAPIClient\API;
use Idoit\CheckmkWebAPIClient\Config;
use Idoit\CheckmkWebAPIClient\Host;

$config = new Config();
$config
    ->setURL('https://monitoring.example.org/mysite/check_mk/')
    ->setUsername('automation')
    ->setSecret('abc123');

$api = new API($config);

$request = new Host($api);
$hosts = $request->getAll();

var_dump($hosts);

```

Configuration
-------------

[](#configuration)

The `API` class requires configuration settings passed to its constructor:

```
use Idoit\CheckmkWebAPIClient\API;
use Idoit\CheckmkWebAPIClient\Config;

$config = new Config();
$config
    ->setURL('https://monitoring.example.org/mysite/check_mk/')
    ->setPort(443)
    ->setUsername('automation')
    ->setSecret('abc123')
    ->enableProxy()
    //->disableProxy()
        ->useHTTPProxy()
        //->useSOCKS5Proxy()
        ->setProxyHost('proxy.example.net')
        ->setProxyPort(8080)
        ->setProxyUsername('proxyuser')
        ->setProxyPassword('verysecure');

$api = new API($config);

```

The `Config` class has public methods which must be called to configure the API:

SettingParameterRequiredDescription`setURL()`stringyesURL to Checkmk *without* entry point, for example `https://monitoring.example.com/mysite/check_mk/``setPort()`integernoPort on which the Web server listens; if not set port `80` will be used for HTTP and `443` for HTTPS`setUsername()`stringyesUser for authentication, probably `automation``setSecret()`stringyesSecret specified for user`enableProxy()`–noUse a proxy between client and server; see below for detailsOptional proxy settings:

SettingParameterRequiredDescription`disableProxy()`booleannoDisable proxy settings; this is the default`useHTTPProxy()`–yesUse a HTTP(S) proxy`useSOCKS5Proxy()`–yesUse a SOCKS5 proxy`setProxyHost()`stringyesFQDN or IP address to proxy`setProxyPort()`integeryesport on which the proxy server listens`setProxyUsername()`stringnoAuthenticate against proxy`setProxyPassword()`stringnoSpecified password for authenticationHosts
-----

[](#hosts)

Class `Host` with public methods:

API CallClass MethodDescription`get_host``get()`Read information about a host by its hostname`get_all_hosts``getAll()`Read information about all hosts`add_host``add()`Create new host with some attributes and tags`edit_host``edit()`Edit host, adds new attributes, changes attributes, or unsets attributes`delete_host``delete()`Delete a host by its hostname`discover_services``discoverServices()`Discover services of a hostSites
-----

[](#sites)

Class `Site` with public methods:

API CallClass MethodDescription`get_site``get()`Read information about a site by its identifier–`getAll()`Read information about all sitesFolders
-------

[](#folders)

Class `Folder` with public methods:

API CallClass MethodDescription`get_folder``get()`Read information about a folder by its path`get_all_folders``getAll()`Read information about all folders`add_folder``add()`Create new folder with some attributes`edit_folder``edit()`Edit a folder's attributes`delete_folder``delete()`Delete a folder by its pathGroups
------

[](#groups)

Classes `HostGroup`, `ServiceGroup` and `ContactGroup` with public methods:

API CallClass MethodDescription`get_all_*groups``getAll()`Read information about all groups–`get()`Read information about a group by its name`add_*group``add()`Create new group with name and alias`edit_*group``edit()`Change the alias of a group`delete_*group``delete()`Delete contact group by its nameHost Tags
---------

[](#host-tags)

Class `HostTag` with public methods:

API CallClass MethodDescription`get_hosttags``getAll()`Read information about all host tag groups and auxiliary tags`set_hosttags``set()`Overwrite all host tag groups and auxiliary tagsUsers
-----

[](#users)

Class `Users` with public methods:

API CallClass MethodDescription–`get()`Read information about an user by its identifier`get_all_users``getAll()`Read information about all users–`add()`Create new user with some attributes`add_users``batchAdd()`Create new users with some attributes–`delete()`Delete a user by its identifier`delete_users``batchDelete()`Delete users by their identifiersRulesets
--------

[](#rulesets)

Class `Ruleset` with public methods:

API CallClass MethodDescription`get_ruleset``get()`Read information about a ruleset by its name`get_rulesets_info``getAll()`Read information about all rulesetsAgents
------

[](#agents)

Class `Agent` with public methods:

API CallClass MethodDescription`bake_agents``bake()`Bake agents but not sign themActivate Changes
----------------

[](#activate-changes)

Class `Change` with public methods:

API CallClass MethodDescription`activate_changes``activate()`Activate changes on specific sites–`activateEverywhere`Activate changes on all sitesMetrics
-------

[](#metrics)

Class `Graph` with public method:

API CallClass MethodDescription`get_graph``get()`Get metrics as a graphInventory
---------

[](#inventory)

Checkmk can collect various information about your hardware/software inventory.

Class `Inventory` with public methods:

API CallClass MethodDescription-`getHost()`Read hardware/software inventory data for a specific host-`getHosts()`Read hardware/software inventory data for one or more hostsContribute
----------

[](#contribute)

Please, report any issues to [our issue tracker](https://github.com/i-doit/checkmk-web-api-client-php/issues). Pull requests are very welcomed. If you like to get involved see file [`CONTRIBUTING.md`](CONTRIBUTING.md) for details.

Copyright &amp; License
-----------------------

[](#copyright--license)

Copyright (C) 2022 [synetics GmbH](https://i-doit.com/)

Copyright (C) 2018-22 [Benjamin Heisig](https://benjamin.heisig.name/)

Licensed under the [GNU Affero GPL version 3 or later (AGPLv3+)](https://gnu.org/licenses/agpl.html). This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance45

Moderate activity, may be stable

Popularity23

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~202 days

Recently: every ~248 days

Total

6

Last Release

2035d ago

PHP version history (2 changes)0.1PHP &gt;=5.6.0

0.6PHP &gt;=7.2.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/771368?v=4)[idoit](/maintainers/idoit)[@idoit](https://github.com/idoit)

---

Top Contributors

[![bheisig](https://avatars.githubusercontent.com/u/1420087?v=4)](https://github.com/bheisig "bheisig (120 commits)")[![skekec-idoit](https://avatars.githubusercontent.com/u/41141260?v=4)](https://github.com/skekec-idoit "skekec-idoit (3 commits)")[![leonardfischer](https://avatars.githubusercontent.com/u/399835?v=4)](https://github.com/leonardfischer "leonardfischer (2 commits)")

---

Tags

apicheckmkinventorymonitoringphpwatoapimonitoringcheck\_mkcheckmkwatomonitoring love

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/idoit-checkmkwebapiclient/health.svg)

```
[![Health](https://phpackages.com/badges/idoit-checkmkwebapiclient/health.svg)](https://phpackages.com/packages/idoit-checkmkwebapiclient)
```

###  Alternatives

[ohdearapp/ohdear-php-sdk

An SDK to easily work with the Oh Dear API

742.6M13](/packages/ohdearapp-ohdear-php-sdk)[treblle/treblle-laravel

Stay in tune with your APIs

135204.9k](/packages/treblle-treblle-laravel)[treblle/security-headers

A collection of HTTP middleware classes to improve the security headers in your Laravel application.

9534.3k](/packages/treblle-security-headers)[muhammadsadeeq/laravel-activitylog-ui

A beautiful, modern UI for Spatie's Activity Log with advanced filtering, analytics, and real-time features.

17510.1k](/packages/muhammadsadeeq-laravel-activitylog-ui)[treblle/treblle-api-tools-laravel

A set of useful tools for building APIs in Laravel.

135.3k1](/packages/treblle-treblle-api-tools-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
