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
It relies on Transatel/lib-eloquent-centreon for accessing Centreon's databases and calling its internal REST API.
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.
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 |
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 |
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 |
$ composer update
$ php -S 0.0.0.0:8000 -t public
<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>