Skip to content

💬 Helper functions for the integration of Centreon with 3rd party alerting solution

License

Notifications You must be signed in to change notification settings

Transatel/api-centreon-notification-helper

Repository files navigation

api-centreon-notification-helper

Helper functions for the integration of Centreon with 3rd party alerting solution

It provides notably methods to:

  • ack / unack services and hosts
  • check whether a service or host is acked
  • check whether a service has associated metrics or not

Implementation details

It relies on Transatel/lib-eloquent-centreon for accessing Centreon's databases and calling its internal REST API.

Configuration

Copy the .env.example file into a new .env file.

There are are the keys you might want to edit (if you changed default values).

After modifying them, one might want to do a php artisan config:clear to ensure older cached values are purged.

Centreon Internal REST API

Key Description
CENTREON_INTERNAL_REST_API_URL URL of Centreon internal REST API
CENTREON_REST_API_USERNAME Username for the internal REST API
CENTREON_REST_API_PASSWORD Password for the internal REST API

Centreon DB schema (configuration)

Key Description
DB_HOST_CENTREON Domain Name or IP address to connect to the database
DB_PORT_CENTREON Port to connect to the database
DB_DATABASE_CENTREON Name of the schema
DB_USERNAME_CENTREON Username to connect to the database
DB_PASSWORD_CENTREON Password to connect to the database

Centreon Storage DB schema (volatile data)

Key Description
DB_HOST_CENTREON_STORAGE Domain Name or IP address to connect to the database
DB_PORT_CENTREON_STORAGE Port to connect to the database
DB_DATABASE_CENTREON_STORAGE Name of the schema
DB_USERNAME_CENTREON_STORAGE Username to connect to the database
DB_PASSWORD_CENTREON_STORAGE Password to connect to the database

Usage

Retrieve dependencies

$ composer update

Launch

Development mode

$ php -S 0.0.0.0:8000 -t public

Example Apache configuration

<VirtualHost *:8000>
  ServerName api-centreon-notification-helper
  DocumentRoot "/opt/api-centreon-notification-helper/public"
  <Directory "/opt/api-centreon-notification-helper/public/">
    Options Indexes FollowSymLinks
    AllowOverride all
    Require all granted
  </Directory>
</VirtualHost>

About

💬 Helper functions for the integration of Centreon with 3rd party alerting solution

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages