Download the PHP package rzuw/icinga2 without Composer

On this page you can find all versions of the php package rzuw/icinga2. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package icinga2

Icinga2 Api Client for PHP

This is a simple api client for Icinga2 written in PHP. At the moment it has only read functions. In the future it will be capable of writing to Icinga2 too.

Installation

To use this client simply add it to your package requirements with composer:

Configuration for Client

The following settings should be set to make this client work.

Configuration for Icinga2 Backend

The complete configuration for API settings for an Icinga2 backend is available in Icinga2 Documentation. There will be to example for API configuration available one for Authentication with username and password, the other using a X509 certificate.

Configure API

To configure the Api settings you need to create the master certificates:

Copy the ca.crt to your client you will need this for your future authentications.

Then add the following configuration for the API, in /etc/icinga2/features-available/api.conf

Enable the Api settings with commandline or creating a link:

Using Username and Password

In /etc/icinga2/conf.d/api-users.conf add your new user with the given settings:

To test the settings use curl:

Using X509 Certificate

It is possible to use Icinga2 Api with certificates, to do this you need to create the needed ca certificate, a client certificate and then sign the certificate with ca. The complete documentation can be found on Icinga2 website.

In /etc/icinga2/conf.d/api-users.conf add your new user with the given settings:

Restart the Icinga2 Daemon:

Copy your-client-cn.crt and your-client-cn.key to your Api client and they can be used.

To test the clients simply use the following curl command:

Usage

To use this client simply create an instance of Icinga2Api class and load the configuration inside.

See the test cases for more examples.

Testing

To test this client you need to have phpunit installed. And the following environmental variables should be set.


All versions of icinga2 with dependencies

PHP Build Version
Package Version
Requires nategood/httpful Version *
ext-curl Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package rzuw/icinga2 contains the following files

Loading the files please wait ....