Skip to content

Everything you’ve always wanted to know about Centreon and Opsgenie but were afraid to ask

Blog Everything you’ve always wanted to know about Centreon and Opsgenie but were afraid to ask

Centreon, the reference monitoring platform, provides quality data and unparalleled aggregation and correlation capabilities, giving a holistic view from cloud to edge. In an ever-growing IT environment, new tools are designed every day to guarantee the reliability of the digital business IT system. Centreon stands as a connected monitoring solution that can interface with tools such as Opsgenie to enhance the analysis of the IT system health. Here we reveal every secret of Centreon’s interconnection with Opsgenie.

The importance of connected monitoring

Only 27% of respondents to Centreon’s State of IT Monitoring rate the visibility over IT performance levels as excellent, which might be explained by the fact that only 61% of the IT system is monitored, on average.

These figures make you realize the importance of communicating data and exploiting it within a monitoring system which should be open, adaptable, scalable and above all connected to the rest of the world. You can choose to keep your silos, but in an ultra connected digital environment, it is definitely best to interconnect tools too.

That’s why Centreon provides ITOps with a panel of tools to interface with complementary solutions to provide better visibility on the IT system and information on its health and availability, and so much more.

Why should you interface the incident management tool Opsgenie with Centreon?

Let’s learn a little about Opsgenie, an incident management platform designed to highlight critical incidents and reduce response times for the teams involved. Opsgenie receives alerts from monitoring systems and custom apps and ranks them according to importance and timing.

The tool sends alerts through various communication channels (calls, e-mails, SMS and push messages on cell phones).

It can therefore be a great option to integrate data that Centreon can reliably and accurately collect in order to gain visibility. Such an approach is possible because Opsgenie can be integrated with monitoring, ITSM and chat tools. Connect Centreon with Opsgenie in order to take full advantage of the best of both tools. 

Your master key: the Stream Connector

If you’re a Harry Potter fan, sorry to disappoint you. There’s no magic between Opsgenie and Centreon, only technology, a.k.a the Stream Connector, a valuable feature of the Centreon platform to format and transfer monitoring data (metrics or events) from Centreon to an external tool.

To interface your favorite monitoring tool with Opsgenie, Centreon provides you with a Stream Connector. Two things should be noted to find your way back home:

  • Centreon monitoring alerts become alerts in Opsgenie,
  • Application alerts in the Centreon BAM module become incidents in Opsgenie.

Let’s get down to business: let’s configure Opsgenie…

Configuration is done in two steps. 

Configuring the API for incidents

  1. Go to the Settings menu.
  2. In the Integrations section, click Integration list.
  3. Add an API integration (Rest API HTTPS over JSON). 
  4. Configure your integration by going to the Configured integrations sub-menu.
  5. Click the API integration.
  6. Check the Create and Update Access rights.
  7. Make sure you have checked Enabled.
  8. Keep your API Key, you will need it for Centreon.
  9. Save your configuration.

Configuring the API for alerts

  1. Go to the Settings menu.
  2. In the APP SETTINGS section, click API key management.
  3. Click the Add new API key button.
  4. Name your API key.
  5. Keep your API Key, you will need it for Centreon.
  6. Check the Create and update box.
  7. Click the Add API key button.

… and now let’s configure Centreon

Again, this is done in two steps: 

Installing the Stream Connector

  1. Use SSH to log in to the Centreon central server with a root user.
  2. Install the required Lua dependencies
    yum install -y lua-curl epel-release
  3. Download the Stream Connector
    wget -O /usr/share/centreon-broker/lua/opsgenie.lua
  4. Configure the rights
    chmod 644 /usr/share/centreon-broker/lua/opsgenie.lua

Configuring the Stream Connector

  1. Log in to your Centreon interface with an admin account.
  2. Go to the Configuration > Collectors menu and select Broker Configuration.
  3. Click the broker-central-broker-master configuration.
  4. Go to the Output tab.
  5. Add a new Generic – Stream connector output.
  6. Name it as you wish to do so.
  7. Enter the path of the Stream Connector /usr/share/centreon-broker/lua/opsgenie.lua
  8. Add a string parameter named app_api_token, the value of which is the API key from the alerts.
  9. Add a string parameter named integration_api_token, the value of which is the API key from the incidents.
  10. Add a string parameter named api_url, the value of which is or for Europe.
  11. Save your configuration.
  12. Go to the Configuration > Collectors menu and select Collectors.
  13. Select the Central collector.
  14. Click the Export configuration button.
  15. Check the Generate configuration files, Start debugging the monitoring engine (-v) and Move generated files boxes.
  16. Click the Export button.
  17. Use SSH to log in to the Centreon central server with a root user.
  18. Restart the cbd Daemon
    systemctl restart cbd

Well done! Your Centreon platform is now ready to send alerts to Opsgenie! 

Example of a Centreon alert being followed up in Opsgenie

Origin: Centreon

Let’s take a closer look at the itinerary of an alert. Our host Yellow-submarine is monitored by Centreon. There is an alert on the sky-of-blue service. 

Transmission: the Stream Connector

By setting an increased verbosity level for the Stream Connector logs, we get the following information:

Wed Feb 10 11:08:05 2021: INFO: EventQueue:call: request body {“message”:”2021-02-10 11:08:05 Yellow-submarine // sky-of-blue is CRITICAL”,”description”:”sky is cloudy”,”alias”:”Yellow-submarine_sky-of-blue_CRITICAL”}
Wed Feb 10 11:08:05 2021: INFO: EventQueue:call: Call url
Wed Feb 10 11:08:05 2021: INFO: EventQueue:call: HTTP Code: 202
Wed Feb 10 11:08:05 2021: INFO: EventQueue:call: Response body: {“result”:”Request will be processed”,”took”:0.007,”requestId”:”e2543449-9399-44ff-89a9-875040906a0c”}

In its basic operation, we can see the Stream Connector generates a JSON formatted for Opsgenie. The JSON is then sent to the appropriate address. 

Opsgenie indicates the alert has been received. 

Reception: Opsgenie

In Opsgenie, we can now see the alert on the sky-of-blue service.

Let’s go into the details of this alert.

We can follow up the activities of this alert in Opsgenie, corresponding to the processing done by the Centreon Stream Connector!

To go further

The Stream Connector offers numerous options to help refine the alerts sent to Opsgenie. Our documentation dedicated to the Stream Connector will provide every detail to help you customize configuration. 


Facebook picto Twitter picto Twitter picto

Similar posts

Ready to see how Centreon can transform your business?

Keep informed on our latest news